0

I'm pulling tickers from Poloniex using this python API wrapper, with intervals of 1800 seconds.

I get back dictionaries that look like this (here I show two consecutive ones for 'BTC_XRP'):

{'close': '4.402e-5',
'date': 1491163200,
'high': '4.89e-5',
'low': '4.333e-5',
'open': '4.849e-5',
'quoteVolume': '51355222.751243',
'volume': '2370.18161649',
'weightedAverage': '4.615e-5'}

{'close': '4.38e-5',
'date': 1491165000,
'high': '4.6e-5',
'low': '3.888e-5',
'open': '4.492e-5',
'quoteVolume': '92451720.795809',
'volume': '3902.07294323',
'weightedAverage': '4.22e-5'}

Why is the opening price of the second one not equal to the closing price of the first one? Isn't a period ending when the next one begins?

1

For each period:

The opening price is the price of the first trade that occurs within the period.
The closing price is the price of the last trade that occurs within period.

Note that the last trade in the 1st period is not equal to the first trade in the 2nd period.
Since these trades are different, their prices can and usually are different.

In general the market price near the bid/ask spread can move around without having actual trades occur. The data feed is based on trades that occur within some period. This means there can be gaps between periods. Here is a video that covers the difference between the last price and the market price: Maket price vs Last price

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.