Hey
I have done my code for spot market.
Now I wanted to change it for futures trading, but I am unsure what to change.
def get_price():
#Return the current price for all coins on binance
initial_price = {}
prices = binance_client.get_all_tickers()
for coin in prices:
if PAIR_WITH in coin["symbol"] and all(item not in coin["symbol"] for item in FIATS):
initial_price[coin["symbol"]] = { "price": coin["price"], "time": datetime.now()}
return initial_price
def get_price24hrs():
lowest_price = {}
prices1 = binance_client.get_ticker()
for coin in prices1:
if PAIR_WITH in coin["symbol"] and all(item not in coin["symbol"] for item in FIATS):
lowest_price[coin["symbol"]] = {"lowPrice": coin["lowPrice"], "time": datetime.now() - timedelta(minutes=1)}
return lowest_price
Could you help me please?