Comments (9)
De nada, estoy feliz si puedo ayudar.
from ccxt.
@Simoliv A new version with the fix was not released yet, will be shortly
from ccxt.
Hello @Simoliv,
I think the problem here is that you're not providing the timestamp in milliseconds
(that's the unit accepted by ccxt), if you do the filtering works as expected, example:
p kraken fetchOHLCV "BTC/USDT" 1h 1716523348000
Python v3.11.7
CCXT v4.3.29
kraken.fetchOHLCV(BTC/USDT,1h,1716523348000)
[[1716526800000, 67692.8, 67692.8, 67132.0, 67307.3, 20.92610534],
[1716530400000, 67307.4, 67578.4, 66885.3, 66919.2, 21.12324464],
[1716534000000, 66885.4, 67264.5, 66885.3, 67146.2, 9.26828411],
[1716537600000, 67164.0, 67185.3, 66624.9, 67185.3, 7.58390828],
[1716541200000, 67185.3, 67405.3, 67045.0, 67363.6, 14.83360952],
[1716544800000, 67363.6, 67484.7, 67316.4, 67341.9, 10.62040474],
[1716548400000, 67353.6, 67394.9, 67353.6, 67394.9, 0.09642151]]
from ccxt.
Hey thanks for taking care !
I think I tried that before, all different kinds of timestamps (s, ms) but as far as I see when running in DEBUG mode, it always pulls the maximum of Krakens API of 720 ohlcv data but only shows the 10 candles.
from ccxt.
@Simoliv Sorry you're completely right 🤦 , I will check it again
from ccxt.
@Simoliv I found an issue in the way we handle timestamps there, it will be fixed shortly; thanks once again.
from ccxt.
Heyo I tested immediately, but I am afraid it still does it ?
I still get 719 items :
718 2024-05-24 13:43:00: Open=3414.21, High=3415.55, Low=3412.58, Close=3415.55, Volume=7.95294316 719 2024-05-24 13:44:00: Open=3416.43, High=3416.43, Low=3416.43, Close=3416.43, Volume=0.0056
Following code + output
current_timestamp = int(time.time()) timestamp_minus_10_seconds = current_timestamp - 10 print("Aktueller Timestamp:", current_timestamp) print("Timestamp vor 10 Sekunden:", timestamp_minus_10_seconds) ohlcv_data = await exchange.fetch_ohlcv(symbol, timeframe, timestamp_minus_10_seconds) print (timestamp_minus_10_seconds) print(len(ohlcv_data)) await exchange.close() exit(0)
Output:
.. 4","3412.55","19.46872018",13],[1716558420,"3413.46","3414.14","3410.80","3412.67","3413.21","0.39661594",16],[1716558480,"3411.95","3411.95","3411.02","3411.22","3411.18","0.75549451",5]],"last":1716558420}} 1716558478 720
CCXT Pro version 4.3.30
DEBUG:asyncio:Using selector: EpollSelector
Aktueller Timestamp: 1716558609
Timestamp vor 10 Sekunden: 1716558599
Just cant see the URL in DEBUG output anymore, now just
DEBUG:ccxt.base.exchange:GET https://api.kraken.com/0/public/Assets, Response: 200
from ccxt.
I thought after seeing 4.3.30 this was the new one, since I had 4.3.28 before. And according to pypi it was released just today, so I thought its included already, apologies.
from ccxt.
@Simoliv We just released, if you update it should be working now
from ccxt.
Related Issues (20)
- Error with BingX (Place order) HOT 5
- watchBidsAsks for gate.io and fetchBidsAsks for others HOT 3
- Bybit - exchange.fetch_position_history(symbol) does not work properly HOT 1
- Hyperliquid decimal_to_precision not working properly HOT 12
- bitbank applied ACCESS-TIME-WINDOW method
- "amount can't be in decimal" error on INDODAX HOT 2
- How to generate implicit methods? HOT 2
- BinanceUs - rate limits issue in websocket subscriptions HOT 2
- fetchBalance returning nothing with crypto.com HOT 4
- Bitmart Futures - watch_orders fails on KeyError HOT 2
- LCX exchange add request
- Lbank watchOrderBook breaks on second ping-pong HOT 4
- ByBit `watch_liquidations` returns `List[List[Liquidation]]` instead of `List[Liquidation]` HOT 1
- Binance fetchWithdrawals terribly slow HOT 6
- Kucoin merge hf accounts HOT 11
- BingX - error: bingx {"code":100400,"msg":"Key: 'OrdersQueryPendingOrdersRequest.Symbol' Error:Field validation for 'Symbol' failed on the 'endswith=-USDT HOT 9
- lbank exchange :Order failed: Invalid Trading Pair HOT 5
- Binance futures quuotes HOT 4
- ModuleNotFoundError: No module named 'importlib.metadata' HOT 2
- Binance fetchWithdrawals sometimes give double entries HOT 14
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.