Skip to navigation

Close leading position

You can only close a lead position once a time. It is required to pass subPosId which can get from Get existing leading positions.

Authentication

OK-ACCESS-KEYstring
Your API key.
OK-ACCESS-SIGNstring

Base64-encoded HMAC-SHA256 signature of the prehash string.

OK-ACCESS-TIMESTAMPstring

ISO 8601 UTC timestamp, e.g. 2020-12-08T09:08:57.715Z.

OK-ACCESS-PASSPHRASEstring
The passphrase you set when creating the API key.

Request

This endpoint expects an object.
subPosIdstringRequired
Lead position ID
instTypeenumOptional

Instrument type SPOT SWAP, the default value

Allowed values:
subPosTypeenumOptional

Sub position type. lead: lead trade; copy: copy trade. Default is lead.

Allowed values:
ordTypeenumOptional

Order type market:Market order, the default value limit:Limit order

Allowed values:
pxstringOptional

Order price. Only applicable to limit order and SPOT lead trader If the price is 0, the pending order will be canceled. It is modifying order if you set px after placing limit order.

tagstringOptional

Order tag A combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters.

Response

Successful response
codestringOptional

Result code. 0 means success; any other value is an error code.

msgstringOptional
Error message. Empty on success.
datalist of objectsOptional