[cryptocom] fetch_my_trades does not work when specifying since=
See original GitHub issue- OS: Mac OS X
- Programming Language version: Python 3.8.9
- CCXT version: 1.67.21
import time
import ccxt.async_support as ccxt
ONE_HOUR_IN_MS = 1000 * 60 * 60 * 1
def now_milliseconds():
return int(time.time() * 1000)
params = {
'apiKey': key,
'secret': secret,
'verbose': True,
}
exchange = ccxt.cryptocom(params)
trades = await exchange.fetch_my_trades(since=now_milliseconds()-ONE_HOUR_IN_MS)
File "/Volumes/Data/personal/newbot/core/exchange/exchange.py", line 69, in fetch_trades
trades = await self._exchange.fetch_my_trades(since=self._ts_last_fetch_trades)
File "/Volumes/Data/personal/newbot/venv/lib/python3.8/site-packages/ccxt/async_support/cryptocom.py", line 1023, in fetch_my_trades
response = await getattr(self, method)(self.extend(request, query))
File "/Volumes/Data/personal/newbot/venv/lib/python3.8/site-packages/ccxt/async_support/base/exchange.py", line 103, in fetch2
return await self.fetch(request['url'], request['method'], request['headers'], request['body'])
File "/Volumes/Data/personal/newbot/venv/lib/python3.8/site-packages/ccxt/async_support/base/exchange.py", line 168, in fetch
self.handle_errors(http_status_code, http_status_text, url, method, headers, http_response, json_response, request_headers, request_body)
File "/Volumes/Data/personal/newbot/venv/lib/python3.8/site-packages/ccxt/async_support/cryptocom.py", line 1725, in handle_errors
raise Exception(self.id + ' ' + message)
ccxt.base.errors.BadRequest: cryptocom INVALID_DATE_RANGE
For instance, it seems that inserting end_ts
along with start_ts
fixes the problem (in cryptocom.py).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Manual · ccxt/ccxt Wiki - GitHub
Overview. The ccxt library is a collection of available crypto exchanges or exchange classes. Each class implements the public and private API for...
Read more >Miscellaneous - Crypto.com Help Center
The error messages will pop up when there is a “Buy” transaction within 30 days before or after a “Sell” transaction with a...
Read more >Python binance fetchMyTrades gives only 3 month of personal ...
I am trying to get my trades earlier than 3 months I do it like this: #I ...
Read more >Crypto.com boss to answer questions on YouTube after ...
Singapore-based crypto exchange said its chief executive will go live on YouTube on Monday to answer questions around some transactions on ...
Read more >Crypto.com Buy BTC, ETH, Shib 4+ - App Store
The only cryptocurrency app to buy crypto at true cost. With Crypto.com you can have access to the following features:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @kroitor. I also contacted Crypto.com to understand if ours is just a workaround to a problem of their API. From the docs, it seems end_ts is not required… Let you know
@oliviera9 thx for pointing it out, fixed in CCXT 1.67.66, the new build will arrive in ~20 minutes. Please, let us know if that solves the issue for you or not.