MultiversX Tracker is Live!

Can't get order status via listenkey [Binance API]

Binance

Cryptocoins Exchanges / Binance 225 Views

I created several futures orders, they were filled, and now I want to check their status through listenkey

from binance.client import Client

import websocket, json

api_key = MY_API_KEY

api_secret = MY_API_SECRET

client = Client(api_key, api_secret)

listen_key = client.futures_stream_get_listen_key()

socket = f'wss://fstream.binance.com/ws/{listen_key}'

def on_message(ws,message):

data = json.loads(message)

print(data)

def on_close(ws, close_status_code, close_msg):

print("### closed ###")

ws = websocket.WebSocketApp(socket, on_close=on_close, on_message=on_message)

ws.run_forever()

But I don't get any information what is the reason?

submitted by /u/NitroA207
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments