We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is the code about get klines
class BitgetBot(): def __init__(self, symbol, interval, start_time, end_time): self.marketApi = market.MarketApi(API_KEY, SECRET_KEY, PASS_PHRASE, use_server_time=False, first=True); self.publicApi = public.PublicApi(API_KEY, SECRET_KEY, PASS_PHRASE, use_server_time=True, first=False); self.symbol = symbol self.interval = interval self.start_time = start_time self.end_time = end_time def get_coin_klines(self): klines = self.marketApi.candles(self.symbol, self.interval, self.start_time, self.end_time, 100) print(klines) if __name__ == '__main__': delta = pd.Timedelta(hours=6) end_time = pd.Timestamp(datetime.now()) start_time = end_time-delta bot = BitgetBot('BTCUSDT_UMCBL', '300', str(int(start_time.timestamp())), str(int(end_time.timestamp()))) bot.get_coin_klines()
the infomation:
url: https://api.bitget.com/api/mix/v1/market/candles?symbol=BTCUSDT_UMCBL&granularity=300&startTime=1684893324&endTime=1684914924&limit=100 method: GET body: headers: {'Content-Type': 'application/json', 'ACCESS-KEY': '*****', 'ACCESS-SIGN': *****', 'ACCESS-TIMESTAMP': '***', 'ACCESS-PASSPHRASE': '****'} response : [] status: 200 []
The text was updated successfully, but these errors were encountered:
I see the same issue - no klines/candlestick data:
payload = {"symbol":"BTCUSDT_UMCBL", "granularity": '1H', "startTime":start_time, "endTime":end_time, "limit": 100} r = requests.get("https://api.bitget.com/api/mix/v1/market/candles", params=payload) print(r.status_code) print(r.url) print(r.text)
Output:
200 https://api.bitget.com/api/mix/v1/market/candles?symbol=BTCUSDT_UMCBL&granularity=1H&startTime=1684800000&endTime=1685102856&limit=100 []
Sorry, something went wrong.
No branches or pull requests
this is the code about get klines
the infomation:
The text was updated successfully, but these errors were encountered: