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.

Kucoin trades and closed-orders are limited until 7 days after the "since"

See original GitHub issue
  • OS: Ubuntu 18.04
  • Programming Language version: JavaScript
  • CCXT version: 1.18.880
  • Exchange: Kucoin
  • Method: fetchMyTrades, fetchClosedOrders

When the since parameter is given to the fetchMyTrades or fetchClosedOrders methods, an URL parameter called startAt is used to get data from the Kucoin API. I noticed from the returned objects that the data is limited until 7 days after the startAt.

To reproduce:

  • have a trade on any Kucoin market.
  • call fetchMyTrades on that market, with since=[trade.createdAt - (7 * 24 * 60 * 60 * 1000)] (7 days before that trade). The trade will be in the response.
  • call fetchMyTrades again, with since=[trade.createdAt - (7 * 24 * 60 * 60 * 1000) - 1000] (7 days plus 1 second before that trade). The trade is now missing.

Suggestion for solution:

Maybe the easiest solution is to always send the endAt parameter with the current datetime, whenever the startAt is used.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
frosty00commented, Jul 4, 2019

actually nvm i found a solution for the trades, using /api/v1/limit/fills not sure about the orders however.

1reaction
frosty00commented, Jul 4, 2019

unfortunately the solution you suggested doesn’t work.

 {"code":"400100","msg":"The duration between the start time and the end time should not exceed 7 days."} 

and for fetchMyTrades if the time difference is longer than a week you get

 {"code":"400100","msg":"validation.queryOrder.timeRangeInvalid"} 

so i’m not sure how to solve this. Any help would be appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Open Orders Did Not Go Through - KuCoin
The user's transactions are entirely free from interference, and the price set for each pending transaction is based on the user's input. If...
Read more >
Top Bitsleader Alternatives in 2022 - Slashdot
Find the top alternatives to Bitsleader currently available. Compare ratings, reviews, pricing, and features of Bitsleader alternatives in 2022.
Read more >
Best Kraken Review 2022 – Crypto Exchange for USA
Kraken has low rollover fees, a maximum of 0.02% per 4 hours. You can access up to $500,000 in the margin. Compare Kraken...
Read more >
Best Freqtrade Alternatives & Competitors - SourceForge
It has been live trading since February of 2019 with outstanding results. ... users to backtest their custom strategy on up to 365...
Read more >
Ultimate Beginner's Guide to Cryptocurrency - HackMD
Bitcoins are worth a ton of money right now (at present, more than $15k per coin), largely on “speculation” since the currency has...
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