gateio / gateapi-python

247 stars 92 forks source link

Possible Issue with .last price in list_tickers return values (full set) #83

Open simplexx opened 2 years ago

simplexx commented 2 years ago

I am not sure if this is an issue or a feature, but is it normal that .last prices of different tickers in the return value (full set) of list_tickers are quite old? For example, in my test application, a ticker still returned old price, even though price jumped 40% in 10 minutes. So basically returned .last price can be at least 10 minutes old. Is this correct?

revilwang commented 2 years ago

Full ticker is expensive, so it has a longer cache time. Get ticker with currency pair specified is recommended

simplexx commented 2 years ago

How long is the cache time aprox?

simplexx commented 2 years ago

any info on this? I need this functionality and it would be very useful to know the oldest possible price of these tickers

revilwang commented 2 years ago

Sorry for the late reply.

last field can have a 10-20 second cache time, depending on trading frequency of the trading market.

simplexx commented 2 years ago

No problem, thanks for the answer. However, this seems incorrect. As I said, I had data inside older than 10 minutes, as described in my initial post.

revilwang commented 2 years ago

Can you provide some logs telling which market has such price delay and at what time