Hello to all coders,
I'm trying to make a trading bot using php which also uses some indicators for custom strategies. I would like to know how to calculate/compute a OHLCV Data-Array from today current History. I'm using CEX.io API for my first trials as some time ago I already was using it and I think the functions provided should be adoptable to other exchanges as well.
I'm currently trying to understand this:I've already studied what OHLCV data represents:
https://www.kaiko.com/collections/ohlcvCEX.io API has API method for OHLCV, but only historical (only until yesterday, but no live data for today)
This are the API Requests I'm trying to use:
https://cex.io/rest-api#historical-1m-ohlcv-charthttps://cex.io/rest-api#trade-historyOHLCV Feed Result for yesterday
https://cex.io/api/ohlcv/hd/20210530/ATOM/EURCurrent Feed Result for TradeHistory
https://cex.io/api/trade_history/ATOM/EURI would like to record all trade-data history and append today's recent trade history as OHLCV on top. I think the trade-history feed has all data required, but I don't know how to compute reduced f.e. data1m array from trade-history data.
Does anyone how such chart-data is generated? Thanks in advice.