This is my code: OUTPUT and that is not what I wanted, This is what I wanted it to look like: 2013.44000000, only the digits Answer You need to define which object you want from the response, for this case we have two options: or So, for your need we can define it like this: Output:
Tag: binance
How to get the price of a crypto at a given time in the past?
Is there any way I can use ccxt to extract the price of a crypto currency at a given time in the past? Example: get price of BTC on binance at time 2018-01-24 11:20:01 Answer You can use the fetch_ohlcv method on the binance class in CCXT def fetch_ohlcv(self, symbol, timeframe=’1m’, since=None, limit=None, params={}): You’ll need the date as a
Python: get crypto pair prices from Binance API, loop pairs from file
I’m trying to get prices of crypto pairs that are on text file. The pairs are written only one pair by line, so every new line has one pair. my code is: When i run this code only first pair in file is printed and then I get a lot of errors from Binance client.py, the last error is: APIError(code=-1100):
Get order parameters from Python-Binance
I’m trying to get some parameters of my orders from Python-Binance API. In this case, I would like to get only the ‘status’ of an order and save it into a variable. I used this to get my last order : And I get this result: Tried to print just the status: But it returns an error: Answer Try this:
How to get ALL (or multiple) pair’s historical klines from Binance API in ONE request?
I have a trading bot that trades multiple pairs (30-40). It uses the previous 5m candle for the price input. Therefore, I get 5m history for ALL pairs one by one. Currently, the full cycle takes about 10 minutes, so the 5m candles get updated once in 10m, which is no good. Any ideas on how to speed things up?