Hist api route doesn't return data
javiervargas opened this issue · 3 comments
javiervargas commented
Hi,
This is my config
keepWeeks=50
exchanges=bitfinex coinbase kraken
currencies=usd
interval=5
exchange_limit=24
averaging_time=4
This is the api call:
http://localhost:5000/hist/usd/coinbase/1601951584000/1601961584000
Return data:
[{"columns":["id","timestamp","datetime","currency_pair","open","high","low","close","close","vol"],"data":[]} ]
Regards.
J.
watersnake1 commented
When running a local instance of spotbit, you may not have enough historical data to have anything to return.
Does this happen for other exchanges (eg bitfinex)?
And if you request to /now/USD/coinbase, what does the "id" field say? If it says "on_demand", then there isn't enough / no historical data present in the database. If there is a number there instead, then there is some historical data but there may not be enough.
javiervargas commented
This is the now output:
{"close":11402.15,"currency_pair":"BTC-USD","datetime":"2020-10-11 21:20:24","high":0.0,"id":1927,"low":0.0,"open":0.0,"timestamp":1602444024,"vol":0.0}
What amount of data is "enough" to be showed?
nochiel commented
Fixed in master and with updated API.