Skip to main content

Close Martingale Bot

Close a running futures Martingale trading bot. The bot will cancel all pending orders and close the position.

info

HTTP Request

POST/v5/fmartingalebot/close

Request Parameters

ParameterRequiredTypeComments
bot_idtruestringBot ID to close, obtained from Create Futures Martingale Bot response

Response Parameters

ParameterTypeComments
status_codeinteger0 = success, non-zero = error
debug_msgstringDebug message (testnet only)

Request Example

POST /v5/fmartingalebot/close HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672211928338
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"bot_id": "612335280740902531"
}

Response Example

{
"retCode": 0,
"retMsg": "success",
"result": {
"status_code": 0,
"debug_msg": ""
},
"retExtInfo": {},
"time": 1774510066757
}