question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HitBTC Order creation Failed

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:24 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
kroitorcommented, Feb 3, 2019

I will find a workaround for the thing I want to do.

That’s easy, for example (just to demonstrate it, you should override the actual mapping how you want for your needs):

import ccxt
exchange = ccxt.hitbtc2({
    'commonCurrencies': {
        'BCH': 'OLD BCH',  # rename BCH to OLD BCH
        'BCHABC': 'NEW BCH',  # rename BCHABC to NEW BCH
    },
})
# all BCH pairs will now be "OLD BCH/USDT", "OLD BCH/ETH'
# all BCHABC pairs will now be "NEW BCH/USDT", ...
# all BCH SV pairs remain as "BSV/USDT"...
1reaction
kpchandcommented, Feb 3, 2019

You are awesome for taking the time and helping!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ABOUT HitBTC API – API Documentation
Use the Streaming API for real-time updates of orders, trades, and any transaction changes. REST API Reference. HTTP Status Codes. 200 OK. Successful...
Read more >
Support : HitBTC
Tips and issues: how to create, protect and operate a HitBTC account, what is 2fa and how it works, ... This section is...
Read more >
API Documentation - ABOUT HitBTC API
Returns an active order by clientOrderId . Requires the "Orderbook, History, Trading balance" API key Access Right. Create/Update Margin Order. curl -X PUT...
Read more >
HitBTC product update: Post Only orders
Dear traders,. Today we introduce the new “Post Only” option for limit orders, also known as “Add Liquidity Only” orders.
Read more >
ABOUT Multiexchange API – API Documentation - HitBTC
Authorization is required or has been failed; 403 Forbidden. ... To create buy orders, you must have sufficient balance including fees.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found