Giter Club home page Giter Club logo

Comments (9)

Simoliv avatar Simoliv commented on September 24, 2024 1

De nada, estoy feliz si puedo ayudar.

from ccxt.

carlosmiei avatar carlosmiei commented on September 24, 2024 1

@Simoliv A new version with the fix was not released yet, will be shortly

from ccxt.

carlosmiei avatar carlosmiei commented on September 24, 2024

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.

Simoliv avatar Simoliv commented on September 24, 2024

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.

carlosmiei avatar carlosmiei commented on September 24, 2024

@Simoliv Sorry you're completely right 🤦 , I will check it again

from ccxt.

carlosmiei avatar carlosmiei commented on September 24, 2024

@Simoliv I found an issue in the way we handle timestamps there, it will be fixed shortly; thanks once again.

from ccxt.

Simoliv avatar Simoliv commented on September 24, 2024

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.

Simoliv avatar Simoliv commented on September 24, 2024

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.

carlosmiei avatar carlosmiei commented on September 24, 2024

@Simoliv We just released, if you update it should be working now

from ccxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.