Câu hỏi thường gặp | Binance FAQ
Bài viết này không hỗ trợ ngôn ngữ của bạn. Bạn nên dùng bộ dịch tự động sang tiếng Anh.
Trang chủ
Trung tâm trợ giúp
Câu hỏi thường gặp | Binance FAQ
Phái sinh tiền mã hoá
Lựa chọn
Binance Options
Binance Options Auto-Cancel All Open Orders (Kill-Switch)

Binance Options Auto-Cancel All Open Orders (Kill-Switch)

2022-11-07 08:43

What is the Auto-Cancel All Open Orders (Kill-Switch) feature?

The Auto-Cancel All Open Orders function, also known as “Kill-Switch,” protects Options Market Makers from having open orders in the event of a network disconnection.
Please note that a similar feature is already in place for Coin-M Futures on Binance: "Auto-Cancel All Open Orders".
This feature is only applicable to Options Market Makers, enabling market makers to provide tighter bid-ask spreads, larger quote sizes, and maintain more time in the market. All of these features would increase the liquidity of the European options product on Binance.

How Does the Auto-Cancel All Open Orders (Kill-Switch) feature work?

The Auto-cancel feature will remove all open orders, for both Market Maker Protection (MMP) and non-MMP order types, when it detects a network disconnection. This feature will activate when Market Maker sets a countdown time period per underlying option. Once the timer reaches zero, the server will automatically cancel all open orders of that underlying symbol if it did not receive a heartbeat message.
Once the system receives a heartbeat message from the Market Maker, it will reset the countdown time. In the absence of a heartbeat message, the system will interpret this as a disconnection from the server
1. Market Maker inputs an underlying (e.g. ETHUSDT) and a countdown time parameter in milliseconds (e.g. 120000 for 120s)
2. Market Maker will send a "heartbeat" message by calling the endpoint (specifying the underlying symbol) at specific intervals (ex. every 30 seconds) to the server.
3. The server will respond with a heartbeat confirmation message specifying the underlying symbol for which the countdown time has been reset.
4. The system will cancel or maintain the Market Maker’s open orders following the rules outlined below:
  • Current Time - Heartbeat Timestamp > Countdown Time: All outstanding orders are canceled.
  • Current Time - Heartbeat Timestamp <= Countdown Time: All existing orders are left in the order book

What is the difference between Auto-Cancel All Open Orders (Kill-Switch) and MMP?

The Auto-Cancel All Open Orders (Kill-Switch) feature will work in conjunction with the existing Market Maker Protection (MMP) function on Binance Options. The key differences are:
  • MMP will remove only MMP order types on fills (ie. MMP is triggered by order fills, meaning that orders will stay in the order book until there's a fill that breaks the qtyLimit or deltaLimit) and can be automatically reset.
  • Auto-Cancel All Open Orders (Kill-Switch) will remove all order types on disconnection (ie. Kill-Switch will remove orders from the order book based on connectivity)
API Interface
There are three API endpoints available. Please refer to the API documents for more information.
1. Endpoint to set the parameters of the Auto-Cancel All Open Orders (Kill-Switch) (POST)
POST /eapi/v1/countdownCancelAll (HMAC SHA256)
Weight: 1
Parameters:
NameTypeMandatoryDescription
underlyingSTRINGYESUnderlying Option symbol (e.g. ETHUSDT, BTCUSDT)
countdownTimeLONGYESCountdown time in milliseconds (ex. 1,000 for 1 second). 0 to disable the timer. Does not accept negative values. Minimum acceptable value is 5,000.
recvWindowLONGNOSpecifies the number of milliseconds after the timestamp parameter the request is valid for. If recvWindow is not sent, it defaults to 5000.
timestampLONGYESA SIGNED endpoint also requires a timestamp parameter to be sent which should be the millisecond timestamp of when the request was created and sent.
Response:
{
"underlying": "ETHUSDT",
"countdownTime": 100000
}
2. Endpoint retrieving the "Kill-Switch" parameters (GET)
GET /eapi/v1/countdownCancelAll (HMAC SHA256)
Weight: 1
Parameters:
NameTypeMandatoryDescription
underlyingSTRINGYESUnderlying Option symbol (e.g. ETHUSDT, BTCUSDT)
recvWindowLONGNOSpecifies the number of milliseconds after the timestamp parameter the request is valid for. If recvWindow is not sent, it defaults to 5000.
timestampLONGYESA SIGNED endpoint also requires a timestamp parameter to be sent which should be the millisecond timestamp of when the request was created and sent.
Response:
{
"underlying": "ETHUSDT",
"countdownTime": 100000
}
*countdownTime = 0 means the function is disabled.
3. Endpoint notifying the server the connection is still alive (POST)
POST /eapi/v1/countdownCancelAllHeartBeat (HMAC SHA256)
Weight: 10
Parameters:
NameTypeMandatoryDescription
underlyingsLISTYESUnderlying Option symbol (e.g. ETHUSDT, BTCUSDT)
recvWindowLONGNOSpecifies the number of milliseconds after the timestamp parameter the request is valid for. If recvWindow is not sent, it defaults to 5000.
timestampLONGYESA SIGNED endpoint also requires a timestamp parameter to be sent which should be the millisecond timestamp of when the request was created and sent.
Response:
{
"underlyings":["BTCUSDT","ETHUSDT"]
}
*The response will only include underlying symbols for which the heartbeat has been successfully updated.
Please note that you are able to specify a list of underlying symbols in one "heartbeat" message to help reduce messages sent to the server for this function.