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)
- MEXC InvalidNonce HOT 1
- Bitget - increase speed limit on createOrder HOT 1
- add safetrade exchange
- New Exchange Request: BTCC
- CCXT.Pro watchOrders sending incorrect order events HOT 4
- Bitmart error fetching tickers HOT 2
- Revert exchange name "Coinbase Advanced" back to "Coinbase" for backward compatibility... HOT 4
- kraken fetch_ohlcv since parameter broken HOT 3
- request poloniex private api show 400 Bad Request HOT 4
- Coinbase: Implementing fetch_trading_fees? HOT 5
- ccxt pro bingX watchTrades in swap market return empty list in python HOT 3
- Binance watch_order_book silently hangs indefinitely HOT 1
- Parsing the unrealized P&L from fetchBalance
- Basic commands from USD market not functional with USDT
- BitMart fetch_tickers() all 'percentage' values are non-negative HOT 1
- Kraken: trading fee is returned as percentage and not as ratio
- phemex watchOrders exception HOT 1
- Cannot import functions HOT 2
- Bybit CreateOrderWs with bound IP Address HOT 3
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.