Closed ishell closed 6 years ago
Bitmex's symbol confused me.
Please, read the Manual first, it's all explained there:
(I'd highly recommend to read the entire Manual from the very beginning to the very end, it will save you a ton of time. Actually, you won't really be able to use this library without reading the Manual first. No shortcuts here, unfortunately.)
Then, please, follow here: https://github.com/ccxt/ccxt/issues/3540
The fetch_ohlcv
seems still wrong. At this time btc price is above 6300, the data is return 235, is I used wrong?
ohlcv5 = bitmex.fetch_ohlcv('BTC/USD','5m')
@ishell we don't change the data and we return you what the exchange itself replies with, you can verify this in verbose mode:
python examples/py/cli.py bitmex fetch_ohlcv BTC/USD 5m --verbose
or by following here from your browser: https://www.bitmex.com/api/v1/trade/bucketed?symbol=XBTUSD&binSize=5m&partial=true
The verbose mode is also documented in the Manual, btw: https://github.com/ccxt/ccxt/wiki/Manual#exchange-properties
So, I guess, you should rather forward this question to BitMEX?
@ishell just to be clear, you're looking at prices from year 2015. Read the Manual on fetchOHLCV:
@ishell from the above, I'm afraid, it follows that you can't really skip reading the entire Manual first )) Let us know if you have questions left after that ;)
@kroitor Thx, i will read the ccxt doc first.
ATTENTION!!!
MUST READ THIS BEFORE SUBMITTING ISSUES:
https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-submit-an-issue
Bitmex's symbol confused me. I saw the sample python code to create order is used
symbol = 'BTC/USD'
, While the bitmex doc isXBTUSD
(try to gethttps://testnet.bitmex.com/api/v1/instrument/activeAndIndices
) But when I useexchange.fetch_ohlcv('BTC/USD', '5m')
, it seems return the worng data