Skip to main content

Place Order Channel

Description

  • Ignore the tradeSide parameter when position mode is in one-way-mode
  • hedge position mode: Open long: "side"=buy, "tradeSide"=open; Close long: "side"=buy, "tradeSide"=close; Open short: "side"=sell, "tradeSide"=open; Close short: "side"=sell, "tradeSide"=close; one-way position mode: "side"=buy and sell, tradeSide: ignore;
  • Please contact your BD or RM to apply for access permissions
Request Example
{
"args":[
{
"channel":"place-order",
"id":"xxxxx-xxx-xxx-xxxx-xxxxxx",
"instId":"BTCUSDT",
"instType":"USDT-FUTURES",
"params":{
"orderType":"limit",
"side":"buy",
"size":"2",
"tradeSide":"open",
"price":"501",
"marginCoin":"USDT",
"force":"gtc",
"marginMode":"crossed",
"clientOid":"xxxxx-xxx-xxx-xxxx-xxxxxx"
}
}
],
"op":"trade"
}

Request Parameters

ParameterTypeRequiredDescription
opStringYes"trade"
argsList<Object>YesList of channels to request subscription
> idStringYesUnique Identifier
Length<= 40
("^[0-9A-Za-z_:#\-+\s]*$");
> instTypeStringYesProduct line type USDT-FUTURES
> instIdStringYesProduct ID, e.g. ETHUSDT
> channelStringYesChannel name, place-order
> paramsObjectYes
>> orderTypeStringYesOrder type
limit: Limit order
market: Market order
>> sideStringYesTrade side
buy: Buy(one-way-mode); Long position direction(hedge-mode)
sell: Sell(one-way-mode); Short position direction(hedge-mode)
>> sizeStringYesAmount (base coin)
To get the decimal places of size:Get Contract Config
>> forceStringYesExecution strategy(It will be invalid when orderType is market)
gtc:Normal limit order, good till cancelled
post_only:Post only
fok:Fill or kill
ioc:Immediate or cancel
>> priceStringNoLimit price
The decimal places of price and the price step can be returned by the Get Symbol Info interface
>> clientOidStringNoCustom order ID
>> marginCoinStringYesMargin coin(capitalized)
>> marginModeStringYesPosition mode
isolated: isolated margin
crossed: crossed margin
>> tradeSideStringNoTrade type
Only required in hedge-mode
open: Open position
close: Close position
>> reduceOnlyStringNoWhether or not to just reduce the position: YES, NO
Default: NO.
Applicable only in one-way-position mode
>> presetStopSurplusPriceStringNoTake-profit value
No take-profit is set if the field is empty.
>> presetStopLossPriceStringNoStop-loss value
No stop-loss is set if the field is empty.
>> stpModeStringNoSTP Mode(Self Trade Prevention)
none:not setting STP(default)
cancel_taker:cancel taker order
cancel_maker:cancel maker order
cancel_both:cancel both of taker and maker orders
Fail
{
"event":"trade",
"arg":[
{
"id":"xxxxx-xxx-xxx-xxxx-xxxxxx",
"instType":"USDT-FUTURES",
"channel":"place-order",
"instId":"BTCUSDT",
"params":{
"orderId":"xxxxxxxxxxx",
"clientOid":"xxxxx-xxx-xxx-xxxx-xxxxxx"
}
}
],
"code":0,
"msg":"Success"
}

Response Parameters

ParameterTypeDescription
eventStringEvent
trade
error
argObjectChannel
> idStringUnique Identifier
Length<= 40
("^[0-9A-Za-z_:#\-+\s]*$");
> instTypeStringProduct line type USDT-FUTURES
> instIdStringProduct ID, e.g. ETHUSDT
> channelStringChannel name, place-order
> paramsObject
>> orderTypeStringOrder type
limit: Limit order
market: Market order
>> OrderIdStringOrder ID.
>> sideStringTrade side
buy: Buy(one-way-mode); Long position direction(hedge-mode)
sell: Sell(one-way-mode); Short position direction(hedge-mode)
>> sizeStringAmount (base coin)
To get the decimal places of size:Get Contract Config
>> forceStringExecution strategy(It will be invalid when orderType is market)
gtc:Normal limit order, good till cancelled
post_only:Post only
fok:Fill or kill
ioc:Immediate or cancel
>> priceStringLimit price
The decimal places of price and the price step can be returned by the Get Symbol Info interface
>> clientOidStringCustom order ID
>> marginCoinStringMargin coin(capitalized)
>> marginModeStringPosition mode
isolated: isolated margin
crossed: crossed margin
>> tradeSideStringTrade type
Only required in hedge-mode
open: Open position
close: Close position
>> reduceOnlyStringWhether or not to just reduce the position: YES, NO
Default: NO.
Applicable only in one-way-position mode
>> presetStopSurplusPriceStringTake-profit value
No take-profit is set if the field is empty.
>> presetStopLossPriceStringStop-loss value
No stop-loss is set if the field is empty.
>> stpModeStringSTP Mode(Self Trade Prevention)
none:not setting STP(default)
cancel_taker:cancel taker order
cancel_maker:cancel maker order
cancel_both:cancel both of taker and maker orders
codeStringcode
msgStringmsg

How was your Reading Experience with us?