ccxt: HitBTC Order creation Failed
Version: ccxt==1.18.188 Language: Python
I create an order with the following parameters:
side = buy price = 3448.59 symbol = BTC/TUSD amount = 52.7222
self.exchange.create_order(symbol, ord_type, side, amount, price=price)
The error is: ccxt.base.errors.InvalidOrder: hitbtc order was rejected by the exchange {“id”:“1548911740564”,“info”:{“orderId”:“N/A”,“latestOrderId”:“N/A”,“clientOrderId”:“1548911740564”,“orderStatus”:“rejected”,“participateDoNotInitiate”:false,“userId”:“user_3178015”,“symbol”:“BTCTUSD”,“side”:“buy”,“price”:“3448.59”,“quantity”:527222,“type”:“limit”,“timeInForce”:“GTC”,“lastQuantity”:0,“lastPrice”:“”,“leavesQuantity”:0,“cumQuantity”:0,“averagePrice”:“0”,“created”:1548911740689,“execReportType”:“rejected”,“orderRejectReason”:“orderExceedsLimit”},“timestamp”:null,“datetime”:null,“lastTradeTimestamp”:null,“status”:“rejected”,“symbol”:“BTC/TUSD”,“type”:“limit”,“side”:“buy”,“price”:3448.59,“cost”:181817.251698,“amount”:52.7222,“filled”:52.7222,“remaining”:0.0,“fee”:{“cost”:null,“currency”:“TUSD”,“rate”:null}}
As can be been that the quanity is being sent as 52722 instead of 52.722. I am assuming that it’s dividing/multiplying by the lots? If so, the new version of HitBTC API docs doesn’t mention this.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24 (13 by maintainers)
Commits related to this issue
- hitbtc v1 / v2 BCH → Bitcoin Cash fix #4587 — committed to ccxt/ccxt by kroitor 5 years ago
- hitbtc BCC outdated mapping removed #4587 — committed to ccxt/ccxt by kroitor 5 years ago
That’s easy, for example (just to demonstrate it, you should override the actual mapping how you want for your needs):
You are awesome for taking the time and helping!
HitBTC has BCH/USDT for historical reasons – the rest of the world, including CoinMarketCap and others have by now migrated to BCH ABC, so everybody now calls the new BCH ABC simply BCH.
Compare volumes here:
So, nobody really trades BCH/USDT anymore. This is a HitBTC-specific issue, and you might want to add a few overrides to the constructor to overcome this, we may add a workaround to not overwrite it, but it’s pretty much useless at this point.
Use the search to avoid duplicates ) This has been answered already:
It did solve it for me. Along with that I also noticed that some symbols like BCCHTUSD are missing from the v1 AP in ccxt but available in v2.
Thanks a lot for the help.