Trade
Set TPSL
This endpoint supports the setting of take profit and stop loss (TP/SL).
HTTP Request
POST /v1/trade/set-tpsl
NOTE
Don't include trailing slash
/
at the end of the endpoint. Doing so can result in a “not found” error.Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
id | true | number | id of the position |
size | true | number | size of the position |
tpPrice | false | number | take profit price of the position |
slPrice | false | number | stop loss price of the position |
Response Parameters
Parameter | Type | Comments |
---|---|---|
statusCode | number | 200 |
result | string | Success |
message | string | TPSL set successfully! |
Parameter | Type | Comments |
---|---|---|
statusCode | number | 404 |
result | string | Not Found |
message | string | Position not found! |
INFO
The ack of tpsl indicates that the request is successfully accepted. Please use websocket order stream to confirm the status.