############ WS ############ import exchange.huobi_usdt_swap_ws as huobiusdtswapws import exchange.huobi_spot_ws as huobispotws ######################## import exchange.okex_usdt_swap_ws as okexusdtswapws ######################## import exchange.binance_coin_swap_ws as binancecoinswapws import exchange.binance_usdt_swap_ws as binanceusdtswapws import exchange.binance_spot_ws as binancespotws ######################## import exchange.gate_spot_ws as gatespotws import exchange.gate_usdt_swap_ws as gateusdtswapws ######################## import exchange.kucoin_spot_ws as kucoinspotws import exchange.kucoin_usdt_swap_ws as kucoinusdtswapws ######################## import exchange.coinex_spot_ws as coinexspotws import exchange.coinex_usdt_swap_ws as coinexusdtswapws #################################### import exchange.ftx_spot_ws as ftxspotws import exchange.ftx_usdt_swap_ws as ftxswapws #################################### import exchange.bitget_usdt_swap_ws as bitgetusdtswapws #################################### import exchange.bybit_usdt_swap_ws as bybitusdtswapws #################################### #################################### import exchange.mexc_spot_ws as mexcspotws #################################### ############ REST ############ import exchange.gate_spot_rest as gate_spot_rest import exchange.gate_usdt_swap_rest as gate_usdt_swap_rest ######################## import exchange.binance_spot_rest as binance_spot_rest import exchange.binance_usdt_swap_rest as binance_usdt_swap_rest ######################## import exchange.kucoin_spot_rest as kucoin_spot_rest import exchange.kucoin_usdt_swap_rest as kucoin_usdt_swap_rest ######################## import exchange.coinex_spot_rest as coinex_spot_rest import exchange.coinex_usdt_swap_rest as coinex_usdt_swap_rest ######################## import exchange.okex_usdt_swap_rest as okex_usdt_swap_rest #################################### import exchange.bitget_usdt_swap_rest as bitget_usdt_swap_rest #################################### import exchange.bybit_usdt_swap_rest as bybit_usdt_swap_rest #################################### import exchange.mexc_spot_rest as mexcspotrest #################################### exchange_lists = [ "binance_spot","binance_usdt_swap","binance_coin_swap", "huobi_spot","huobi_usdt_swap","huobi_coin_swap", "okex_spot","okex_usdt_swap","okex_coin_swap", "gate_spot","gate_usdt_swap", "kucoin_spot","kucoin_usdt_swap", "coinex_spot","coinex_usdt_swap", "bitget_usdt_swap", "bybit_usdt_swap", "mexc_spot", ] exchange_ws_clients = dict() exchange_ws_clients['binance_usdt_swap']= binanceusdtswapws.BinanceUsdtSwapWs exchange_ws_clients['binance_coin_swap']= binancecoinswapws.BinanceCoinSwapWs exchange_ws_clients['binance_spot']= binancespotws.BinanceSpotWs exchange_ws_clients['huobi_usdt_swap']=huobiusdtswapws.HuobiUsdtSwapWs exchange_ws_clients['huobi_spot']= huobispotws.HuobiSpotWs exchange_ws_clients['okex_usdt_swap']= okexusdtswapws.OkexUsdtSwapWs exchange_ws_clients['gate_spot']= gatespotws.GateSpotWs exchange_ws_clients['gate_usdt_swap']= gateusdtswapws.GateUsdtSwapWs exchange_ws_clients['kucoin_spot']= kucoinspotws.KucoinSpotWs exchange_ws_clients['kucoin_usdt_swap']= kucoinusdtswapws.KucoinUsdtSwapWs exchange_ws_clients['coinex_spot']= coinexspotws.CoinExSpotWs exchange_ws_clients['coinex_usdt_swap']= coinexusdtswapws.CoinExUsdtSwapWs exchange_ws_clients['ftx_spot'] = ftxspotws.FtxSpotWs exchange_ws_clients['ftx_usdt_swap'] = ftxswapws.FtxUsdtSwapWs exchange_ws_clients['bitget_usdt_swap'] = bitgetusdtswapws.BitgetUsdtSwapWs exchange_ws_clients['bybit_usdt_swap'] = bybitusdtswapws.BybitUsdtSwapWs exchange_ws_clients['mexc_spot'] = mexcspotws.MexcSpotWs exchange_rest_clients = dict() exchange_rest_clients['binance_usdt_swap'] = binance_usdt_swap_rest.BinanceUsdtSwapRest exchange_rest_clients['binance_spot'] = binance_spot_rest.BinanceSpotRest exchange_rest_clients['gate_spot'] = gate_spot_rest.GateSpotRest exchange_rest_clients['gate_usdt_swap'] = gate_usdt_swap_rest.GateUsdtSwapRest exchange_rest_clients['kucoin_spot'] = kucoin_spot_rest.KucoinSpotRest exchange_rest_clients['kucoin_usdt_swap'] = kucoin_usdt_swap_rest.KucoinUsdtSwapRest exchange_rest_clients['coinex_spot'] = coinex_spot_rest.CoinExSpotRest exchange_rest_clients['coinex_usdt_swap'] = coinex_usdt_swap_rest.CoinExUsdtSwapRest exchange_rest_clients['okex_usdt_swap'] = okex_usdt_swap_rest.OkexUsdtSwapRest exchange_rest_clients['bitget_usdt_swap'] = bitget_usdt_swap_rest.BitGetUsdtSwapRest exchange_rest_clients['bybit_usdt_swap'] = bybit_usdt_swap_rest.BybitUsdtSwapRest exchange_rest_clients['mexc_spot'] = mexcspotrest.MexcSpotRest def newWs(exchange): if exchange in exchange_ws_clients: return exchange_ws_clients[exchange] else: return None def newRest(exchange): return exchange_rest_clients[exchange]