Order API
OrderPrivateApi
POST Get Maximum Order Creation Size
POST /api/v1/private/order/getMaxCreateOrderSize
Body Request Parameters
Request Parameters
body
body
No
none
Response Example
200 Response
Response
200
default response
POST Create Order
POST /api/v1/private/order/createOrder
Body Request Parameters
Request Parameters
body
body
No
none
Response Example
200 Response
Response
200
default response
Response Data Structure
POST Cancel Order by Order ID
POST /api/v1/private/order/cancelOrderById
Body Request Parameters
Request Parameters
body
body
No
none
Response Example
200 Response
Response
200
default response
POST Cancel All Orders under Account
POST /api/v1/private/order/cancelAllOrder
Body Request Parameters
Request Parameters
body
body
No
none
Response Example
200 Response
Response
200
default response
Inline
Response Data Structure
GET Get Orders by Account ID and Order IDs (Batch)
GET /api/v1/private/order/getOrderById
Request Parameters
accountId
query
string
No
Account ID
orderIdList
query
string
No
Order IDs
Response Example
200 Response
Response
200
default response
Inline
Response Data Structure
GET Get Orders by Client Order IDs (Batch)
GET /api/v1/private/order/getOrderByClientOrderId
Request Parameters
accountId
query
string
No
Account ID
clientOrderIdList
query
string
No
Client-defined order IDs
Response Example
200 Response
Response
200
default response
Inline
GET Get Historical Orders (Paginated)
GET /api/v1/private/order/getHistoryOrderPage
Request Parameters
accountId
query
string
No
Account ID
size
query
string
No
Number of items to fetch. Must be greater than 0 and less than or equal to 100.
offsetData
query
string
No
Pagination offset. If not provided or empty, retrieves the first page.
filterCoinIdList
query
string
No
Filters by collateral coin IDs. If empty, fetches orders for all collateral coin IDs.
filterContractIdList
query
string
No
Filters by contract IDs. If empty, fetches orders for all contracts.
filterTypeList
query
string
No
Filters by order types. If empty, fetches orders of all types.
filterStatusList
query
string
No
Filters by order status. If empty, fetches orders of all statuses.
filterIsLiquidateList
query
string
No
Filters by liquidate orders. If empty, fetches all orders
filterIsDeleverageList
query
string
No
Filters by deleverage orders. If empty, fetches all orders
filterIsPositionTpslList
query
string
No
Filters by position TP/SL orders. If empty, fetches all orders
filterStartCreatedTimeInclusive
query
string
No
Filters orders created after or on this time (inclusive). If empty or 0, retrieves from the earliest.
filterEndCreatedTimeExclusive
query
string
No
Filters orders created before this time (exclusive). If empty or 0, retrieves to the latest.
Response Example
200 Response
Response
200
default response
GET Get Historical Order Fill Transactions (Paginated)
GET /api/v1/private/order/getHistoryOrderFillTransactionPage
Request Parameters
accountId
query
string
No
Account ID
size
query
string
No
Number of items to fetch. Must be greater than 0 and less than or equal to 100.
offsetData
query
string
No
Pagination offset. If not provided or empty, retrieves the first page.
filterCoinIdList
query
string
No
Filters by collateral coin IDs. If empty, fetches order fill transactions for all collateral coin IDs.
filterContractIdList
query
string
No
Filters by contract IDs. If empty, fetches order fill transactions for all contracts.
filterOrderIdList
query
string
No
Filters by order IDs. If empty, fetches order fill transactions for all orders.
filterIsLiquidateList
query
string
No
Filters by liquidate orders. If empty, fetches all orders
filterIsDeleverageList
query
string
No
Filters by deleverage orders. If empty, fetches all orders
filterIsPositionTpslList
query
string
No
Filters by position TP/SL orders. If empty, fetches all orders
filterStartCreatedTimeInclusive
query
string
No
Filters order fill transactions created after or on this time (inclusive). If empty or 0, retrieves from the earliest.
filterEndCreatedTimeExclusive
query
string
No
Filters order fill transactions created before this time (exclusive). If empty or 0, retrieves to the latest.
Response Example
200 Response
Response
200
default response
GET Get Historical Order Fill Transactions by ID (Batch)
GET /api/v1/private/order/getHistoryOrderFillTransactionById
Request Parameters
accountId
query
string
No
Account ID
orderFillTransactionIdList
query
string
No
Order fill transaction IDs
Response Example
200 Response
Response
200
default response
GET Get Historical Orders by ID (Batch)
GET /api/v1/private/order/getHistoryOrderById
Request Parameters
accountId
query
string
No
Account ID
orderIdList
query
string
No
Order IDs
Response Example
200 Response
Response
200
default response
Response Data Structure
GET Get Historical Orders by Client Order IDs (Batch)
GET /api/v1/private/order/getHistoryOrderByClientOrderId
Request Parameters
accountId
query
string
No
Account ID
clientOrderIdList
query
string
No
Order client order id
Response Example
200 Response
Response
200
default response
Response Data Structure
GET Get Active Orders (Paginated)
GET /api/v1/private/order/getActiveOrderPage
Request Parameters
accountId
query
string
No
Account ID
size
query
string
No
Number of items to fetch. Must be greater than 0 and less than or equal to 200.
offsetData
query
string
No
Pagination offset. If not provided or empty, retrieves the first page.
filterCoinIdList
query
string
No
Filters by collateral coin IDs. If empty, fetches active orders for all collateral coin IDs.
filterContractIdList
query
string
No
Filters by contract IDs. If empty, fetches active orders for all contracts.
filterTypeList
query
string
No
Filters by order types. If empty, fetches orders of all types.
filterStatusList
query
string
No
Filters by order status. If empty, fetches orders of all statuses.
filterIsLiquidateList
query
string
No
Filters by liquidate orders. If empty, fetches all orders
filterIsDeleverageList
query
string
No
Filters by deleverage orders. If empty, fetches all orders
filterIsPositionTpslList
query
string
No
Filters by position TP/SL orders. If empty, fetches all orders
filterStartCreatedTimeInclusive
query
string
No
Filters orders created after or on this time (inclusive). If empty or 0, retrieves from the earliest.
filterEndCreatedTimeExclusive
query
string
No
Filters orders created before this time (exclusive). If empty or 0, retrieves to the latest.
Response Example
200 Response
Response
200
default response
Data Models
Properties
code
string
false
none
Status code. "SUCCESS" for success, otherwise failure.
data
false
none
Successful response data.
errorParam
object
false
none
Parameter information in error messages.
requestTime
string(timestamp)
false
none
Server request receive time.
responseTime
string(timestamp)
false
none
Server response return time.
traceId
string
false
none
Call trace ID.
Order fill transaction details
id
string(int64)
false
none
Unique identifier.
userId
string(int64)
false
none
User ID.
accountId
string(int64)
false
none
Account ID.
coinId
string(int64)
false
none
Collateral coin ID.
contractId
string(int64)
false
none
Contract ID.
orderId
string(int64)
false
none
Order ID.
orderSide
string
false
none
Buy/Sell direction.
fillSize
string
false
none
Actual filled quantity.
fillValue
string
false
none
Actual filled value.
fillFee
string
false
none
Actual filled fee.
fillPrice
string
false
none
Fill price (not precise, for display purposes only).
liquidateFee
string
false
none
Liquidation fee if it's a liquidation (forced liquidation) transaction.
realizePnl
string
false
none
Realized profit and loss (only available if the fill includes closing a position).
direction
string
false
none
Actual fill direction.
isPositionTpsl
boolean
false
none
Whether this is a position take-profit/stop-loss order.
isLiquidate
boolean
false
none
Whether this is a liquidation (forced liquidation) fill.
isDeleverage
boolean
false
none
Whether this is an auto-deleverage fill.
isWithoutMatch
boolean
false
none
Whether this order was filled directly without matching.
matchSequenceId
string(int64)
false
none
Sequence ID after submitting to the matching engine.
matchIndex
integer(int32)
false
none
Index for multiple fills after submitting to the matching engine.
matchTime
string(int64)
false
none
Time after submitting to the matching engine.
matchAccountId
string(int64)
false
none
Counterparty account ID.
matchOrderId
string(int64)
false
none
Counterparty order ID.
matchFillId
string
false
none
Fill ID returned by the matching engine.
positionTransactionId
string(int64)
false
none
Associated position transaction ID.
collateralTransactionId
string(int64)
false
none
Associated collateral transaction ID.
extraType
string
false
none
Additional type for upper-layer business use.
extraDataJson
string
false
none
Additional data in JSON format. Defaults to an empty string.
censorStatus
string
false
none
Current censorship status.
censorTxId
string(int64)
false
none
Censorship processing sequence ID. Exists when censor_status
is CENSOR_SUCCESS
/CENSOR_FAILURE
/L2_APPROVED
/L2_REJECT
/L2_REJECT_APPROVED
.
censorTime
string(int64)
false
none
Censorship processing time. Exists when censor_status
is CENSOR_SUCCESS
/CENSOR_FAILURE
/L2_APPROVED
/L2_REJECT
/L2_REJECT_APPROVED
.
censorFailCode
string
false
none
Censorship failure error code. Exists when censor_status
is CENSOR_FAILURE
.
censorFailReason
string
false
none
Censorship failure reason. Exists when censor_status
is CENSOR_FAILURE
.
l2TxId
string(int64)
false
none
L2 push transaction ID. Exists when censor_status
is CENSOR_SUCCESS
/L2_APPROVED
/L2_REJECT
/L2_REJECT_APPROVED
.
l2RejectTime
string(int64)
false
none
L2 rejection time. Exists when censor_status
is L2_REJECT
/L2_REJECT_APPROVED
.
l2RejectCode
string
false
none
L2 rejection error code. Exists when censor_status
is L2_REJECT
/L2_REJECT_APPROVED
.
l2RejectReason
string
false
none
L2 rejection reason. Exists when censor_status
is L2_REJECT
/L2_REJECT_APPROVED
.
l2ApprovedTime
string(int64)
false
none
L2 batch verification time. Exists when status
is L2_APPROVED
/L2_REJECT_APPROVED
.
createdTime
string(int64)
false
none
Creation time.
updatedTime
string(int64)
false
none
Update time.
Enum Values
orderSide
UNKNOWN_ORDER_SIDE
orderSide
BUY
orderSide
SELL
orderSide
UNRECOGNIZED
direction
UNKNOWN_LIQUIDITY_DIRECTION
direction
MAKER
direction
TAKER
direction
UNRECOGNIZED
censorStatus
UNKNOWN_TRANSACTION_STATUS
censorStatus
INIT
censorStatus
CENSOR_SUCCESS
censorStatus
CENSOR_FAILURE
censorStatus
L2_APPROVED
censorStatus
L2_REJECT
censorStatus
L2_REJECT_APPROVED
censorStatus
UNRECOGNIZED
Order Fill Transaction Response
code
string
false
none
Status code. "SUCCESS" for success, otherwise failure.
data
false
none
Generic paginated response.
errorParam
object
false
none
Parameter information in error messages.
requestTime
string(timestamp)
false
none
Server request receive time.
responseTime
string(timestamp)
false
none
Server response return time.
traceId
string
false
none
Call trace ID.
Order Fill Transaction List
dataList
false
none
Data list.
nextPageOffsetData
string
false
none
Offset for retrieving the next page. Empty string if no more data available.
Order Response
code
string
false
none
Status code. "SUCCESS" for success, otherwise failure.
data
false
none
Generic paginated response.
errorParam
object
false
none
Parameter information in error messages.
requestTime
string(timestamp)
false
none
Server request receive time.
responseTime
string(timestamp)
false
none
Server response return time.
traceId
string
false
none
Call trace ID.
Order List
dataList
false
none
Data list.
nextPageOffsetData
string
false
none
Offset for retrieving the next page. Empty string if no more data available.
Perpetual contract order information
id
string(int64)
false
none
Order ID. Value greater than 0.
userId
string(int64)
false
none
User ID.
accountId
string(int64)
false
none
Account ID.
coinId
string(int64)
false
none
Collateral coin ID.
contractId
string(int64)
false
none
Contract ID.
side
string
false
none
Buy/Sell direction.
price
string
false
none
Order price (worst acceptable price), actual type is decimal.
size
string
false
none
Order quantity, actual type is decimal.
clientOrderId
string
false
none
Client-defined ID for idempotency checks.
type
string
false
none
Order type.
timeInForce
string
false
none
Order execution policy. Relevant when type
is LIMIT
/STOP_LIMIT
/TAKE_PROFIT_LIMIT
.
reduceOnly
boolean
false
none
Whether this is a reduce-only order.
triggerPrice
string
false
none
Trigger price. Relevant when type
is STOP_LIMIT
/STOP_MARKET
/TAKE_PROFIT_LIMIT
/TAKE_PROFIT_MARKET
. If 0, the field is empty. Actual type is decimal.
triggerPriceType
string
false
none
Price type: Last price, Mark price, etc. Relevant when type
is STOP_LIMIT
/STOP_MARKET
/TAKE_PROFIT_LIMIT
/TAKE_PROFIT_MARKET
.
expireTime
string(int64)
false
none
Expiration time.
sourceKey
string
false
none
Source key, UUID.
isPositionTpsl
boolean
false
none
Whether this is a position take-profit/stop-loss order.
isLiquidate
boolean
false
none
Whether this is a liquidation (forced liquidation) order.
isDeleverage
boolean
false
none
Whether this is an auto-deleverage order.
openTpslParentOrderId
string(int64)
false
none
Order ID of the opening order for a take-profit or stop-loss order.
isSetOpenTp
boolean
false
none
Whether take-profit is set for opening order.
openTp
false
none
Take-profit/stop-loss parameters for opening order.
isSetOpenSl
boolean
false
none
Whether stop-loss is set for opening order.
openSl
false
none
Take-profit/stop-loss parameters for opening order.
isWithoutMatch
boolean
false
none
Whether this order is directly filled without matching.
withoutMatchFillSize
string
false
none
Off-exchange fill quantity (valid only when is_without_match
is true).
withoutMatchFillValue
string
false
none
Off-exchange fill value (valid only when is_without_match
is true).
withoutMatchPeerAccountId
string(int64)
false
none
Off-exchange counterparty account ID (valid only when is_without_match
is true).
withoutMatchPeerOrderId
string(int64)
false
none
Off-exchange counterparty order ID (valid only when is_without_match
is true).
maxLeverage
string
false
none
Leverage used when placing the order. Actual type is decimal.
takerFeeRate
string
false
none
Taker fee rate when placing the order. Actual type is decimal.
makerFeeRate
string
false
none
Maker fee rate when placing the order. Actual type is decimal.
liquidateFeeRate
string
false
none
Liquidation fee rate when placing the order. Actual type is decimal.
marketLimitPrice
string
false
none
Limit price for submitting market orders to the matching engine (only exists for market orders, 0 otherwise). Actual type is decimal.
marketLimitValue
string
false
none
Limit value for submitting market orders to the matching engine (only exists for market orders, 0 otherwise). Actual type is decimal.
l2Nonce
string(int64)
false
none
L2 signature nonce. Takes the first 32 bits of sha256(client_order_id
).
l2Value
string
false
none
L2 signature order value (the actual filled price must be equal to or better than l2_value
/ l2_size
). May differ from price
x size
. Actual type is decimal.
l2Size
string
false
none
L2 signature order quantity. May differ from the size
field. Actual type is decimal.
l2LimitFee
string
false
none
Maximum acceptable fee for L2 signature.
l2ExpireTime
string(int64)
false
none
L2 signature expiration time in milliseconds. The hour value should be used when generating/verifying the signature, i.e. l2_expire_time
/ 3600000. Note that this value must be greater or equal to expire_time
+ 8 * 24 * 60 * 60 * 1000 (8 days).
l2Signature
false
none
L2 signature information.
extraType
string
false
none
Additional type for upper-layer business use.
extraDataJson
string
false
none
Additional data in JSON format. Defaults to an empty string.
status
string
false
none
Order status.
matchSequenceId
string(int64)
false
none
Sequence ID handled by the matching engine.
triggerTime
string(int64)
false
none
Conditional order trigger time.
triggerPriceTime
string(int64)
false
none
Conditional order trigger price time.
triggerPriceValue
string
false
none
Conditional order trigger price value.
cancelReason
string
false
none
Order cancellation reason.
cumFillSize
string(decimal)
false
none
Cumulative filled quantity after censorship. Actual type is decimal.
cumFillValue
string(decimal)
false
none
Cumulative filled value after censorship. Actual type is decimal.
cumFillFee
string(decimal)
false
none
Cumulative filled fee after censorship. Actual type is decimal.
maxFillPrice
string(decimal)
false
none
Maximum filled price for the current order after censorship. Actual type is decimal.
minFillPrice
string(decimal)
false
none
Minimum filled price for the current order after censorship. Actual type is decimal.
cumLiquidateFee
string(decimal)
false
none
Cumulative liquidation fee after censorship. Actual type is decimal.
cumRealizePnl
string(decimal)
false
none
Cumulative realized PnL after censorship. Actual type is decimal.
cumMatchSize
string(decimal)
false
none
Cumulative matched quantity. Actual type is decimal.
cumMatchValue
string(decimal)
false
none
Cumulative matched value. Actual type is decimal.
cumMatchFee
string(decimal)
false
none
Cumulative matched fee. Actual type is decimal.
cumFailSize
string
false
none
Cumulative failed/L2 rejected quantity. Actual type is decimal.
cumFailValue
string
false
none
Cumulative failed/L2 rejected value. Actual type is decimal.
cumFailFee
string
false
none
Cumulative failed/L2 rejected fee. Actual type is decimal.
cumApprovedSize
string
false
none
Cumulative quantity approved by L2.
cumApprovedValue
string
false
none
Cumulative value approved by L2.
cumApprovedFee
string
false
none
Cumulative fee approved by L2.
createdTime
string(int64)
false
none
Creation time.
updatedTime
string(int64)
false
none
Update time.
Enum Values
side
UNKNOWN_ORDER_SIDE
side
BUY
side
SELL
side
UNRECOGNIZED
type
UNKNOWN_ORDER_TYPE
type
LIMIT
type
MARKET
type
STOP_LIMIT
type
STOP_MARKET
type
TAKE_PROFIT_LIMIT
type
TAKE_PROFIT_MARKET
type
UNRECOGNIZED
timeInForce
UNKNOWN_TIME_IN_FORCE
timeInForce
GOOD_TIL_CANCEL
timeInForce
FILL_OR_KILL
timeInForce
IMMEDIATE_OR_CANCEL
timeInForce
POST_ONLY
timeInForce
UNRECOGNIZED
triggerPriceType
UNKNOWN_PRICE_TYPE
triggerPriceType
ORACLE_PRICE
triggerPriceType
INDEX_PRICE
triggerPriceType
LAST_PRICE
triggerPriceType
ASK1_PRICE
triggerPriceType
BID1_PRICE
triggerPriceType
OPEN_INTEREST
triggerPriceType
UNRECOGNIZED
status
UNKNOWN_ORDER_STATUS
status
PENDING
status
OPEN
status
FILLED
status
CANCELING
status
CANCELED
status
UNTRIGGERED
status
UNRECOGNIZED
cancelReason
UNKNOWN_ORDER_CANCEL_REASON
cancelReason
USER_CANCELED
cancelReason
EXPIRE_CANCELED
cancelReason
COULD_NOT_FILL
cancelReason
REDUCE_ONLY_CANCELED
cancelReason
LIQUIDATE_CANCELED
cancelReason
MARGIN_NOT_ENOUGH
cancelReason
SYSTEM_LIMIT_EVICTED
cancelReason
ADMIN_CANCELED
cancelReason
INTERNAL_FAILED
cancelReason
UNRECOGNIZED
L2 signature information.
r
string
false
none
Big integer as a hex string.
s
string
false
none
Big integer as a hex string.
v
string
false
none
Big integer as a hex string.
Opening order take-profit/stop-loss parameters
side
string
false
none
Buy/sell direction. This field is required.
price
string
false
none
Order price (worst acceptable price), actual type is decimal. Required, enter 0 for market orders.
size
string
false
none
Order quantity, actual type is decimal. Required.
clientOrderId
string
false
none
Client-defined ID for signature and idempotency checks. This field is required.
triggerPrice
string
false
none
Trigger price. This field is required.
triggerPriceType
string
false
none
Price type: Last price, Mark price, etc. This field is required.
expireTime
string(int64)
false
none
Expiration time.
l2Nonce
string(int64)
false
none
L2 signature nonce. Takes the first 32 bits of sha256(client_order_id
).
l2Value
string
false
none
L2 signature order value (the actual filled price must be equal to or better than l2_value
/ l2_price
). May differ from price
x size
. Actual type is decimal.
l2Size
string
false
none
L2 signature order quantity. May differ from the size
field. Actual type is decimal.
l2LimitFee
string
false
none
Maximum acceptable fee for L2 signature.
l2ExpireTime
string(int64)
false
none
L2 signature expiration time in unix hour. Must be at least 10 hours after expire_time
.
l2Signature
false
none
L2 signature information.
Enum Values
side
UNKNOWN_ORDER_SIDE
side
BUY
side
SELL
side
UNRECOGNIZED
triggerPriceType
UNKNOWN_PRICE_TYPE
triggerPriceType
ORACLE_PRICE
triggerPriceType
INDEX_PRICE
triggerPriceType
LAST_PRICE
triggerPriceType
ASK1_PRICE
triggerPriceType
BID1_PRICE
triggerPriceType
OPEN_INTEREST
triggerPriceType
UNRECOGNIZED
Order List
code
string
false
none
Status code. "SUCCESS" for success, otherwise failure.
data
false
none
Successful response data.
errorParam
object
false
none
Parameter information in error messages.
requestTime
string(timestamp)
false
none
Server request receive time.
responseTime
string(timestamp)
false
none
Server response return time.
traceId
string
false
none
Call trace ID.
Request parameters for canceling all orders under an account
accountId
string(int64)
false
none
Account ID.
filterCoinIdList
[string]
false
none
Filter to cancel active orders for specific collateral coin IDs. If empty, cancels all.
filterContractIdList
[string]
false
none
Filter to cancel active orders for specific contract IDs. If empty, cancels all.
filterOrderTypeList
[string]
false
none
Filter to cancel orders of specific types. If empty, cancels all types.
filterOrderStatusList
[string]
false
none
Filter to cancel orders of specific statuses. If empty, cancels all statuses.
filterIsPositionTpsl
[boolean]
false
none
Filter to cancel only corresponding position take-profit/stop-loss orders. If empty, cancels all contract orders.
<### Response for canceling orders by client order IDs
cancelResultMap
object
false
none
None
Enum Values
additionalProperties
UNKNOWN_ORDER_CANCEL_RESULT
additionalProperties
SUCCESS
additionalProperties
SUCCESS_ORDER_CANCELING
additionalProperties
SUCCESS_ORDER_CANCELED
additionalProperties
FAILED_ORDER_NOT_FOUND
additionalProperties
FAILED_ORDER_FILLED
additionalProperties
FAILED_ORDER_UNKNOWN_STATUS
additionalProperties
UNRECOGNIZED
Cancel Order Response
code
string
false
none
Status code. "SUCCESS" for success, otherwise failure.
data
false
none
Response for canceling orders.
errorParam
object
false
none
Parameter information in error messages.
requestTime
string(timestamp)
false
none
Server request receive time.
responseTime
string(timestamp)
false
none
Server response return time.
traceId
string
false
none
Call trace ID.
Response for canceling orders
cancelResultMap
object
false
none
None
Enum Values
additionalProperties
UNKNOWN_ORDER_CANCEL_RESULT
additionalProperties
SUCCESS
additionalProperties
SUCCESS_ORDER_CANCELING
additionalProperties
SUCCESS_ORDER_CANCELED
additionalProperties
FAILED_ORDER_NOT_FOUND
additionalProperties
FAILED_ORDER_FILLED
additionalProperties
FAILED_ORDER_UNKNOWN_STATUS
additionalProperties
UNRECOGNIZED
Request parameters for canceling an order
accountId
string(int64)
false
none
Account ID.
orderIdList
[string]
true
none
Order ID.
Creating orders Response
code
string
false
none
Status code. "SUCCESS" for success, otherwise failure.
data
false
none
Response for creating orders.
errorParam
object
false
none
Parameter information in error messages.
requestTime
string(timestamp)
false
none
Server request receive time.
responseTime
string(timestamp)
false
none
Server response return time.
traceId
string
false
none
Call trace ID.
Response for creating orders
orderId
string(int64)
false
none
Order ID.
Request parameters for creating an order
accountId
string(int64)
false
none
Account ID.
contractId
string(int64)
false
none
Contract ID.
side
string
false
none
Buy/sell direction. This field is required.
size
string
false
none
Order quantity. Actual type is decimal. This field is required.
price
string
false
none
Order price (worst acceptable price). Actual type is decimal. This field is required, enter 0 for market orders.
clientOrderId
string
false
none
Client-defined ID for idempotency checks. This field is required.
type
string
false
none
Order type. This field is required.
timeInForce
string
false
none
Order execution policy. Relevant when type
is LIMIT
/STOP_LIMIT
/TAKE_PROFIT_LIMIT
. This field is required, and should be IMMEDIATE_OR_CANCEL
for market orders.
reduceOnly
boolean
false
none
Whether this is a reduce-only order. This field is required.
triggerPrice
string
false
none
Trigger price. Relevant when type
is STOP_LIMIT
/STOP_MARKET
/TAKE_PROFIT_LIMIT
/TAKE_PROFIT_MARKET
. If 0, the field is empty. Actual type is decimal. Required for conditional orders.
triggerPriceType
string
false
none
Price type: Last price, Mark price, etc. Relevant when the order is conditional. Required for conditional orders.
expireTime
string(int64)
false
none
Expiration time.
sourceKey
string
false
none
Source key, UUID.
isPositionTpsl
boolean
false
none
Whether this is a position take-profit/stop-loss order. This field is required, defaults to false.
openTpslParentOrderId
string(int64)
false
none
Order ID of the opening order for a take-profit or stop-loss order.
isSetOpenTp
boolean
false
none
Whether to set take-profit for the opening order. This field is required.
openTp
false
none
Take-profit/stop-loss parameters for the opening order.
openSl
false
none
Take-profit/stop-loss parameters for the opening order.
l2Nonce
string(int64)
false
none
L2 signature nonce. Takes the first 32 bits of sha256(client_order_id
).
l2Value
string
false
none
L2 signature order value (the actual filled price must be equal to or better than l2_value
/ l2_price
). May differ from price
x size
. Actual type is decimal.
l2Size
string
false
none
L2 signature order quantity. May differ from the size
field. Actual type is decimal.
l2LimitFee
string
false
none
Maximum acceptable fee for L2 signature.
l2ExpireTime
string(int64)
false
none
L2 signature expiration time in milliseconds. The hour value should be used when generating/verifying the signature, i.e. l2_expire_time
/ 3600000. Note that this value must be greater or equal to expire_time
+ 8 * 24 * 60 * 60 * 1000 (8 days).
l2Signature
string
false
none
L2 signature.
extraType
string
false
none
Additional type for upper-layer business use.
extraDataJson
string
false
none
Additional data in JSON format. Defaults to an empty string.
Enum Values
side
UNKNOWN_ORDER_SIDE
side
BUY
side
SELL
side
UNRECOGNIZED
type
UNKNOWN_ORDER_TYPE
type
LIMIT
type
MARKET
type
STOP_LIMIT
type
STOP_MARKET
type
TAKE_PROFIT_LIMIT
type
TAKE_PROFIT_MARKET
type
UNRECOGNIZED
timeInForce
UNKNOWN_TIME_IN_FORCE
timeInForce
GOOD_TIL_CANCEL
timeInForce
FILL_OR_KILL
timeInForce
IMMEDIATE_OR_CANCEL
timeInForce
POST_ONLY
timeInForce
UNRECOGNIZED
triggerPriceType
UNKNOWN_PRICE_TYPE
triggerPriceType
ORACLE_PRICE
triggerPriceType
INDEX_PRICE
triggerPriceType
LAST_PRICE
triggerPriceType
ASK1_PRICE
triggerPriceType
BID1_PRICE
triggerPriceType
OPEN_INTEREST
triggerPriceType
UNRECOGNIZED
Take-profit/stop-loss parameters for opening order.
side
string
false
none
Buy/sell direction. This field is required.
price
string
false
none
Order price (worst acceptable price). Actual type is decimal. This field is required, enter 0 for market orders.
size
string
false
none
Order quantity. Actual type is decimal. This field is required.
clientOrderId
string
false
none
Client-defined ID for signature and idempotency checks. This field is required.
triggerPrice
string
false
none
Trigger price. This field is required.
triggerPriceType
string
false
none
Price type: Last price, Mark price, etc. This field is required.
expireTime
string(int64)
false
none
Expiration time.
l2Nonce
string(int64)
false
none
L2 signature nonce. Takes the first 32 bits of sha256(client_order_id
).
l2Value
string
false
none
L2 signature order value (the actual filled price must be equal to or better than l2_value
/ l2_price
). May differ from price
x size
. Actual type is decimal.
l2Size
string
false
none
L2 signature order quantity. May differ from the size
field. Actual type is decimal.
l2LimitFee
string
false
none
Maximum acceptable fee for L2 signature.
l2ExpireTime
string
false
none
L2 signature expiration time in unix hour. Must be at least 10 hours after expire_time
.
l2Signature
string
false
none
L2 signature.
Enum Values
side
UNKNOWN_ORDER_SIDE
side
BUY
side
SELL
side
UNRECOGNIZED
triggerPriceType
UNKNOWN_PRICE_TYPE
triggerPriceType
ORACLE_PRICE
triggerPriceType
INDEX_PRICE
triggerPriceType
LAST_PRICE
triggerPriceType
ASK1_PRICE
triggerPriceType
BID1_PRICE
triggerPriceType
OPEN_INTEREST
triggerPriceType
UNRECOGNIZED
Getting the maximum order size Response
code
string
false
none
Status code. "SUCCESS" for success, otherwise failure.
data
false
none
Response for getting the maximum order size.
errorParam
object
false
none
Parameter information in error messages.
requestTime
string(timestamp)
false
none
Server request receive time.
responseTime
string(timestamp)
false
none
Server response return time.
traceId
string
false
none
Call trace ID.
Getting the maximum order size Data
maxBuySize
string(decimal)
false
none
Maximum buy size.
maxSellSize
string(decimal)
false
none
Maximum sell size.
ask1Price
string(decimal)
false
none
Best ask price.
bid1Price
string(decimal)
false
none
Best bid price.
Request parameters for getting the maximum order size
accountId
string(int64)
false
none
Account ID.
contractId
string(int64)
false
none
Contract ID.
price
string
false
none
Order price.
Last updated