Published: April 1, 2023
20
62
400

1/ Many of you have asked for specific latency tricks on different exchanges, since infrastructure optimization is the foundation of a profitable crypto HFT strategy. Here are some lesser known insights: filtering retail flow on Upbit and bypassing the risk engine on Binance ๐Ÿงต

2/ First up is the counterparty feed trick on Upbit. It's my favorite way to understand autocorrelated retail flow. Though this trick is not technically related to decreasing latency, it comes from a similar source of deeply understanding the exchange technology stack.

3/ Upbit labels trades with "sequential_id". The last two digits of this number are the fee tiers of the maker and taker respectively. Fee tiers are strongly correlated with sophistication of the account. And as we know, retail flow is one of the best inputs for quant signals.

4/ Up next, the Binance futures non-liquidation flag for order entry. This setting allows you to bypass the liquidation engine altogether. Set "nl": true in the order JSON you send and the order gets routed straight to the matching engine, shaving a few ms off round trip latency

5/ There's an agreement between exchange and API user to not abuse this feature, so obviously make sure you are running a profitable, high sharpe strategy. The non-liquidation flag is understandably not documented, because if abused the exchange could become insolvent.

6/ However, for HFT as long as you do the margin checks on your side, saving this latency on server-side risk checks can drastically improve your place in queue and improve your fill rate. Of course, measure for your own infra setup before using.

7/ Hope these tips were helpful for people. The devil is in the details with crypto HFT, and it's important to understand all the little details that could be setting back an otherwise profitable strategy. Let me know how they work on your live trading systems.

Image in tweet by jeff.hl

@chameleon_jeff ๐Ÿ˜‚

@chameleon_jeff Nice...now delete

@chameleon_jeff lol, just caught myself on a thought that it could be a fools' day joke

@chameleon_jeff another great thread. what kinda roundtrip latency (including network) (i.e you->cloudflare->matching engine->cloudflare->you) do you see on average for order placement and cancels on binanace?

@chameleon_jeff Just tried the Upbit thing, it doesn't look like it's true. Sequential id seems to be timestamp + 3 digits denoting probably different makers from 000-999

@chameleon_jeff Is there any risk that binance will suspend your account for using not documented fields in API requests? Is it even legal according to API terms of use?

@chameleon_jeff smhw i thought this thread is abt mev

@chameleon_jeff What learning resources would you recommend for hft?

Share this thread

Read on Twitter

View original thread

Navigate thread

1/23