[BUDA] ccxt fetching wrong ohlcv values in daily candles
See original GitHub issueHi, I have the following issue, when I try to get daily candles from this exchange, ccxt fetch candles with random minutes of difference instead of 24 hours of difference.
- OS: Windows 10 x64
- Programming Language version: Python 3.9.7
- CCXT version: 1.67.71
import ccxt
import pandas as pd
import numpy as np
import keys
from datetime import datetime as dt
try:
buda_ex= ccxt.buda({
'apiKey': keys.api_key_buda,
'secret': keys.api_secret_buda,
'password' : keys.buda_pw,
'enableRateLimit': True
})
except Exception as e:
print("No se puede cargar el exchange buda, un error ha ocurrido - {}".format(e))
print(buda_ex.timeframes)
btc_clp=buda_ex.fetch_ohlcv(symbol="BTC/CLP", timeframe="1d", limit=10)
df = pd.DataFrame(btc_clp, columns = ['OPEN TIME', 'OPEN', 'HIGH', 'LOW', 'CLOSE', 'VOLUME'])
df['OPEN TIME'] = pd.to_datetime(df['OPEN TIME'], unit='ms')
df["OPEN TIME"]=df["OPEN TIME"].apply(lambda x: dt.strftime(x,'%d-%m-%y %H:%M'))
df['OPEN'] = df['OPEN'].astype(np.float64)
df['HIGH'] = df['HIGH'].astype(np.float64)
df['LOW'] = df['LOW'].astype(np.float64)
df['CLOSE'] = df['CLOSE'].astype(np.float64)
df['VOLUME'] = df['VOLUME'].astype(np.float64)
df.set_index('OPEN TIME', inplace=True)
print(df.head())
{'1m': '1', '5m': '5', '30m': '30', '1h': '60', '2h': '120', '1d': 'D', '1w': 'W'}
OPEN HIGH LOW CLOSE VOLUME
OPEN TIME
13-01-22 13:38 36626148.0 36626148.0 36381357.0 36381357.0 0.051374
13-01-22 13:41 36383854.0 36611000.0 36383854.0 36611000.0 0.002366
13-01-22 13:45 36597909.0 36597909.0 36597909.0 36597909.0 0.000473
13-01-22 13:46 36386350.0 36386350.0 36385998.0 36386350.0 0.052687
13-01-22 13:48 36589881.0 36589881.0 36387083.0 36387083.0 0.055930
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
ccxt-dev/ccxt - Gitter
if you fetch 1d-ohlcv, you will get the historical volumes by days ... you should check the corresponding timestamps (the first value of...
Read more >ccxt - npm
A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
Read more >ccxt (python) not showing all candles : r/algotrading - Reddit
Might not be the best workaround but you can just fetch the data more than one time and then remove the duplicate using...
Read more >Download Historical Data of All Cryptocoins with CCXT for free
format(exch)) print('-'*80) quit() # Check if fetching of OHLC Data is supported if exchange.has["fetchOHLCV"] != True: print('-'*36,' ERROR ...
Read more >Newest 'ccxt' Questions - Stack Overflow
Error Code: 4061 While Executing Hedge Mode Order In Binance CCXT python ... fetch the ohlcv from active candle in kucoin(current Candle) with...
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
After some research, we found that the exchange doesn’t have a consistent API endpoint for candles, and has an unplanned behavior- depending on different timespan between from-to (nevertheless the requested timeframe) the responses are different. It will need a serious rework of that implementation, to achieve a normal-functional method. This will be marked as ‘todo’ however, in the meanwhile, I’d also suggest you wrote their support (as a customer) and requested that they implemented endpoint for fetching Candles.
Hi @ttodua, this exchange is located in chile, but it works in others latam countries like peru and argentina, I didn’t know it has regional blocking, maybe using a latam ip it should allow access to api, yesterday I sent a message to buda’s TI support , but they couldn’t help me…
regards