99
1010api_key = ""
1111api_secret = ""
12-
12+ market = "BTCUSDT"
1313
1414async def binance_stream (ubwa ):
1515 async def handle_socket_message (stream_id = None ):
@@ -25,17 +25,17 @@ async def handle_socket_message(stream_id=None):
2525 ubwa .api .get_server_time (stream_id = api_stream )
2626 ubwa .api .get_account_status (stream_id = api_stream )
2727 orig_client_order_id = ubwa .api .create_order (stream_id = api_stream , price = 1.0 , order_type = "LIMIT" ,
28- quantity = 15.0 , side = "SELL" , symbol = "BUSDUSDT" )
28+ quantity = 15.0 , side = "SELL" , symbol = market )
2929 ubwa .api .create_test_order (stream_id = api_stream , price = 1.2 , order_type = "LIMIT" ,
30- quantity = 12.0 , side = "SELL" , symbol = "BUSDUSDT" )
30+ quantity = 12.0 , side = "SELL" , symbol = market )
3131 ubwa .api .ping (stream_id = api_stream )
32- ubwa .api .get_exchange_info (stream_id = api_stream , symbols = [ 'BUSDUSDT' ] )
33- ubwa .api .get_order_book (stream_id = api_stream , symbol = "BUSDUSDT" , limit = 2 )
34- ubwa .api .cancel_order (stream_id = api_stream , symbol = "BUSDUSDT" , orig_client_order_id = orig_client_order_id )
35- ubwa .api .get_open_orders (stream_id = api_stream , symbol = "BUSDUSDT" )
32+ ubwa .api .get_exchange_info (stream_id = api_stream , symbols = market )
33+ ubwa .api .get_order_book (stream_id = api_stream , symbol = market , limit = 2 )
34+ ubwa .api .cancel_order (stream_id = api_stream , symbol = market , orig_client_order_id = orig_client_order_id )
35+ ubwa .api .get_open_orders (stream_id = api_stream , symbol = market )
3636 ubwa .api .get_open_orders (stream_id = api_stream )
37- ubwa .api .cancel_open_orders (stream_id = api_stream , symbol = "BUSDUSDT" )
38- ubwa .api .get_order (stream_id = api_stream , symbol = "BUSDUSDT" , orig_client_order_id = orig_client_order_id )
37+ ubwa .api .cancel_open_orders (stream_id = api_stream , symbol = market )
38+ ubwa .api .get_order (stream_id = api_stream , symbol = market , orig_client_order_id = orig_client_order_id )
3939
4040 print (f"Finished! Waiting for responses:" )
4141 await asyncio .sleep (5 )
0 commit comments