For a better trading environment, preventing malicious API trading activity, we established following quantitative rules for API trading.
API Trading Quantitative Rules refer to a set of rules that regulate normal trading based on quantitative indicators, which currently include the following:
|Unfilled Ratio (UFR)||Unfilled value as a percentage of all orders value||1-(Filled Value/Orders Value)|
|GTC Cancel Ratio (GCR)||Invalid cancelled orders as a percentage of all GTC orders, where an invalid cancelled order is an order placed for less than 2 seconds before it is cancelled||Invalid Cancelled Orders Count/GTC Orders Count|
|IOC&FOK Expire Ratio (IFER)||Expired IOC&FOK orders count as a percentage of all IOC&FOK orders||Expired IOC&FOK Orders Count/FOK&IOC Orders Count|
|Dust Ratio (DR)||Dust orders count as a percentage of all orders count, where a dust order is an order with value less than the threshold value, which varies according to different symbols ($10 for now)||Dust Orders Count/Orders Count|
|Ban Count (BC)||Ban count within 24 hours||Ban count within 24 hours|
2. Recording and Ban Thresholds
The current system uses a retrospective calculation of the 10-minute cycle indicator and only bans the one with specific orders count above a certain threshold, as follows:
|Indicator||Recording Threshold||Ban Threshold|
|Unfilled Ratio (UFR)||All orders count within the cycle >= 10000||UFR >= 0.99|
|GTC Cancel Ratio (GCR)||GTC orders count within the cycle >=1500||GCR >= 0.99|
|IOC&FOK Expire Ratio (IFER)||FOK&IOC orders count within the cycle >=1500||IFER >= 0.99|
|Dust Ratio (DR)||All orders count within the cycle >= 10000||DR>=0.9|
|Ban Count (BC)||-||Ban count within 24 hours >=10|
For users who violate the quantitative rules, they will be restricted from opening or increasing positions on the symbols which they violate the rules, and the short-term ban time is 5 minutes, which will recover automatically upon expiration; if they violate the quantitative rules 10 times in a row within 2 hours, they will be banned for 2 hours and recover automatically upon expiration; their trading on reduce-only orders or other symbols that do not violate the rules will not be affected.
For example, if a user violates the UFR rules of BTCUSDT Perpetual Contract, he can't open or increase position in BTCUSDT Perpetual Contract within 5 minutes, but he can put reduce-only orders (orders to reduce his position); meanwhile, his trading in other products such as ETHUSDT Perpetual Contract will not be affected if he doesn't violate any rules; if he violates any rules in BTCUSDT Perpetual Contract for 10 times in 2 hours, his opening orders in BTCUSDT Perpetual Contract will be restricted for the following 2 hours.