Comments (9)
Yes that's very sad, thank you.
from ccxt.
Hello @x1i4b1x2,
Which coinbase branch are you using and what's your ccxt version?
from ccxt.
It's latest version, and coinbaseexchange
from ccxt.
@x1i4b1x2 as you said the pagination can't be done using timestamps, but you can use the Ids, example:
cache = []
trades = await exchange.fetch_trades('BTC/USDT')
cache += trades
first = trades[0]
cursor = first['id']
i = 0
max_calls = 10
while cursor:
i+=1
trades = await exchange.fetch_trades('BTC/USDT', params={'after': cursor})
if len(trades) == 0:
break
cache += trades
cursor = trades[0]['id']
print('number of trades fetched:', len(cache))
if i > max_calls:
break
from ccxt.
Yes, so there is nothing missing in the docs, it can only be done with Ids right?
from ccxt.
@x1i4b1x2 Yes as you can see here, since/until
timestamps are not supported: https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_getproducttrades/
from ccxt.
That's very sad. Have you ever found a clever way to fetch in the past without having to guess the Ids?
from ccxt.
@x1i4b1x2 the ids are linear as you can see here, so you should be able to "guess" older ids
from ccxt.
Actually I just tested and does not seem to work, so disregard my suggestion pls
from ccxt.
Related Issues (20)
- Binance fetchWithdrawals sometimes give double entries HOT 14
- Hyperliquid Fetch_order by clientOrderId HOT 4
- Coinbase Advanced Trade level2 BTC-USD Subscription Exceeds max_msg_size
- How to override end points? HOT 4
- Hyperliquid fetch_balance not correct HOT 3
- Hyperliquid fetch_tickers - no prices for swap HOT 3
- watchOrderBook error after unWatchOrderBook called HOT 5
- bybit market transaction fee is wrong HOT 3
- fetchBalance() no longer works with Kucoin HOT 10
- hyperliquid fetch_ohlcv behaving wrongly HOT 3
- gateio fee is wrong HOT 2
- Hyperliquid - Couple of issues with fetch_(orders?|closed_orders|open_orders) HOT 7
- [Indodax] Cannot post limit order since 4.3.86 HOT 1
- fetchLedger Returning 404 Error on Bybit Subaccount (Standard Account, Not UTA) HOT 9
- OKX swap order uses currency size instead of contract size HOT 1
- how to disable account status check for kucoin hf trade HOT 4
- binance new unsub method forgets to decrease numSubscriptions HOT 3
- Hyperliquid - Incorrect symbol in fetch_my_trades() HOT 3
- Kraken - fetch_open_orders returns [] HOT 10
- Issue with OKX and Bitget MATIC futures HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ccxt.