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.

kucoin2: fetchOrder() return zero result of price and cost of a order

See original GitHub issue

ATTENTION!!!

MUST READ THIS BEFORE SUBMITTING ISSUES:

https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-submit-an-issue

  • OS: Windows 10
  • Programming Language version: python
  • CCXT version: 1.18.437
  • Exchange: kucoin2
  • Method: fetchOrder()

fetchOrder() method returns, as a result:
{“id”: “5cab45ea054b46124e0761ea”, “symbol”: “ETH/USDT”, “type”: “market”, “side”: “buy”, “amount”: 0.11574, “price”: 0.0, “cost”: 0.0, “filled”: 0.11574, “remaining”: 0.0, “timestamp”: 1554728426000, “datetime”: “2019-04-08T13:00:26.000Z”, “fee”: {“currency”: “USDT”, “cost”: 0.0203088978}, “status”: “closed”, “info”: {“symbol”: “ETH-USDT”, “hidden”: false, “opType”: “DEAL”, “fee”: “0.0203088978”, “channel”: “API”, “feeCurrency”: “USDT”, “type”: “market”, “isActive”: false, “createdAt”: 1554728426000, “visibleSize”: “0”, “price”: “0”, “iceberg”: false, “stopTriggered”: false, “funds”: “0”, “id”: “5cab45ea054b46124e0761ea”, “timeInForce”: “GTC”, “side”: “buy”, “dealSize”: “0.11574”, “cancelAfter”: 0, “dealFunds”: “20.3088978”, “stp”: “”, “postOnly”: false, “stopPrice”: “0”, “size”: “0.11574”, “stop”: “”, “cancelExist”: false, “clientOid”: “fa721e3b-2ffb-47b9-86b0-8e933fbdd3ce”}}

With "price": 0.0, "cost": 0.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
xplcommented, Apr 9, 2019

@DmitryVil The fix should be already there (since 1.18.450). Let us know if that doesn’t help.

3reactions
MarcelBeiningcommented, Apr 9, 2019

This was a market order and for market orders the price and cost always returns zero because you could have filled different prices with your market order. Use fetchMyTrades to find the prices and costs for your executed market order and build the average of it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pricing for returns, refunds, and exchanges - IBM
When a customer returns an item for a refund or an exchange, Sterling Selling and Fulfillment Suite can determine the price of the...
Read more >
Not able to fetch the price for market order - Stack Overflow
Taken from the manual: $orderbook = $exchange->fetch_order_book ($exchange->symbols[0]); $bid = count ($orderbook['bids']) ?
Read more >
CCXT Crypto Exchange Order Book Data [Example Tutorial]
Results. The request will return the bid and ask orders which are currently available on the exchange for the BTC/USDT trading pair. The...
Read more >
Price Source - Hummingbot Docs
Users can also use a different order book such as an external exchange supported ... of maker order prices from external sources would...
Read more >
Explaining the Exchange Rate Pass-Through in Different Prices
production or distribution channels can dampen the effect of exchange rate ... import and export prices tends to be somewhere between zero and...
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