I am using the function: polo.returnTicker()['BTC_ETH'] that I got from this python package https://github.com/s4w3d0ff/python-poloniex to get the current ticker from Poloniex. The function returns a json object that looks like this:
{u'last': u'0.07120000', u'quoteVolume': u'3523.11980704', u'high24hr': u'0.07170000', u'isFrozen': u'0', u'highestBid': u'0.07120026', u'percentChange': u'-0.00154256', u'low24hr': u'0.07078026', u'lowestAsk': u'0.07120370', u'id': 148, u'baseVolume': u'251.02174618'}
However, I need a array with all tickers from the past in one-minute intervals , which I don't know how to get. My function can only return the current ticker, and not past tickers, which I need. Does anyone know how to do that?
As Poloniex do not provide ticker history, you will have to request the ticker periodically then store result in a file, json or database. Then read you file, local json or database to return an array of past tickers.
You may use something like that (file version):
Then you may:
period_in_s=5toperiod_in_s=60to grab ticker in one-minute intervalsmax_history_size=xto fit your history size requirement.#do your job here sectionWhich give you :