wnz99 / tvcd

A JS module to fetch realtime candles data from various crypto exchanges. Created to feed TradingView chart.
11 stars 6 forks source link

Option to fetch 4H candles from Bitfinex #52

Closed hems closed 1 year ago

hems commented 1 year ago

Currently Bitfinex won't allow us to fetch 4H candles directly form their API.

It would be great to add this option and have tvcd consolidate the last 4x1H candles into 1x4H candles by calculating the highest high, lowest low, open, close, and summed volume of those candles.

hems commented 1 year ago

Funny enough their own UI supports 4H candles now, so i'm wondering if they're consolidating it themselves or if they're using a timeframe parameter of the API that isn't documented.

https://trading.bitfinex.com/t/ETH:USD?type=margin

wnz99 commented 1 year ago

hmm, I think that TradingView is able to create 4H candles from 1H one. So it will call the available 1H endpoint and internally build the 4H.

Need to double-check this, but I think I read on TV docs about this.

wnz99 commented 1 year ago

Done here for bitfinex only for now: https://github.com/wnz99/tvcd/releases/tag/v1.7.1