Kucoin / kucoin-python-sdk

MIT License
46 stars 16 forks source link

How could HF market order be slower than another packages normal market order? #110

Closed ihtishamaliktk closed 1 month ago

ihtishamaliktk commented 9 months ago

I initially implemented a market buy and sell mechanism using a third party package python-kucoin. Then a bit unsatisfied with the speed. I then implemented the HF trading method with the official kucoin-python package. Both tests were done one after another on a WIFI using everything almost the same. How can the HF order placement be slower than the normal market order function from a third-party package? There is little room to make mistake here (since the function is straighforward) but maybe I am doing something wrong?

with kucoin-python package buy_order = self.client.create_hf_market_order(symbol=symbol, side='buy', funds=self.trading_balance_hf) Execution time for QRDO: 1135.9696000000004 milli Execution time for QRDO: 1190.1537000000008 milli

with python-kucoin package buy_order = self.client.create_market_order(symbol=symbol, side=Client.SIDE_BUY, funds=self.trading_balance) Execution time for QRDO: 376.860200000001 milli Execution time for QRDO: 336.01530000000093 milli

ISAAC-XXYYZZ commented 1 month ago

Different implementations may indeed have varying performance. Currently, we are designing a better, faster, and more robust next-generation API. Stay tuned!