What API did you actually use to place an order? Comparison and analysis of Binance USDS-M futures order interface and API order parameters#
Request Parameter Description#
Parameter Name | Type | Required | Description |
---|---|---|---|
symbol | STRING | YES | Trading pair |
side | ENUM | YES | Buy/Sell direction SELL, BUY |
positionSide | ENUM | NO | Position direction, not required in one-way position mode, default and can only be filled with BOTH; required in two-way position mode, and can only choose LONG or SHORT |
type | ENUM | YES | Order type LIMIT, MARKET, STOP, TAKE_PROFIT, STOP_MARKET, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET |
reduceOnly | STRING | NO | true, false; default false in non-double opening mode; not accepted in double opening mode; using closePosition does not support this parameter. |
quantity | DECIMAL | NO | Order quantity, using closePosition does not support this parameter. |
price | DECIMAL | NO | Order price |
newClientOrderId | STRING | NO | User-defined order number, cannot appear repeatedly in pending orders. If missing, the system will automatically assign a value. Must meet the regex rule ^[.A-Z:/a-z0-9_-]{1,36}$ |
stopPrice | DECIMAL | NO | Trigger price, only STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET require this parameter |
closePosition | STRING | NO | true, false; all positions will be closed after triggering, only supports STOP_MARKET and TAKE_PROFIT_MARKET; cannot be used with quantity; inherently only has a closing effect, cannot be used with reduceOnly |
activationPrice | DECIMAL | NO | Trailing stop activation price, only TRAILING_STOP_MARKET requires this parameter, defaults to the current market price at the time of order (supports different workingType) |
callbackRate | DECIMAL | NO | Trailing stop callback rate, can take values in the range [0.1, 10], where 1 represents 1%, only TRAILING_STOP_MARKET requires this parameter |
timeInForce | ENUM | NO | Valid methods GTC/IOC/FOK/GTX/GTD, required for LIMIT orders |
workingType | ENUM | NO | stopPrice trigger type: MARK_PRICE (mark price), CONTRACT_PRICE (latest contract price). Default is CONTRACT_PRICE |
priceProtect | STRING | NO | Conditional order trigger protection: "TRUE","FALSE", default "FALSE". Only STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET require this parameter |
newOrderRespType | ENUM | NO | "ACK", "RESULT", default "ACK" |
priceMatch | ENUM | NO | OPPONENT/ OPPONENT_5/ OPPONENT_10/ OPPONENT_20/QUEUE/ QUEUE_5/ QUEUE_10/ QUEUE_20; cannot be passed with price at the same time |
selfTradePreventionMode | ENUM | NO | EXPIRE_TAKER/ EXPIRE_MAKER/ EXPIRE_BOTH; default NONE |
goodTillDate | LONG | NO | Automatic cancellation time of the order when TIF is GTD, must be passed when timeInforce is GTD; the passed timestamp retains only second-level precision, the millisecond part will be automatically ignored, the timestamp must be greater than the current time + 600s and less than 253402300799000 |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Parameter Option Details#
type (Order Type)#
API Parameter | Binance Chinese Interface | Description |
---|---|---|
LIMIT | Limit Order | Requires specifying a price, executed at the specified price or better |
MARKET | Market Order | Executed immediately at the current market price |
STOP | Limit Stop Loss/Take Profit | When the price reaches stopPrice, a limit order is placed at the specified price |
TAKE_PROFIT | Limit Stop Loss/Take Profit | When the price reaches stopPrice, a limit order is placed at the specified price |
STOP_MARKET | Market Stop Loss/Take Profit | When the price reaches stopPrice, a market order is placed |
TAKE_PROFIT_MARKET | Market Stop Loss/Take Profit | When the price reaches stopPrice, a market order is placed |
TRAILING_STOP_MARKET | Trailing Order | Dynamically adjusts the stop loss price based on price changes |
Other Binance interface function correspondences:
- Only Maker =
timeInForce=GTX
- Conditional Order = STOP/TAKE_PROFIT type orders
- Time-weighted Order =
timeInForce=GTD
+goodTillDate
- Segmented Orders = Combination of multiple orders, not a single API parameter
Binance APP order interface "Take Profit/Stop Loss" parameters:
- Take Profit Price =
stopPrice
(when choosing TAKE_PROFIT type) - Stop Loss Price =
stopPrice
(when choosing STOP type) - Take Profit and Stop Loss Method Selection:
- Limit Price =
TAKE_PROFIT
orSTOP
+price
parameter - Market Price =
TAKE_PROFIT_MARKET
orSTOP_MARKET
- Limit Price =
- Trigger Condition =
workingType
(mark price/latest price)
Important Note: Setting Take Profit and Stop Loss simultaneously on the Binance APP = Multiple Orders
When you select the take profit and stop loss function in the APP:
- Main Order: Opening order (LIMIT or MARKET)
- Take Profit Order: TAKE_PROFIT or TAKE_PROFIT_MARKET order
- Stop Loss Order: STOP or STOP_MARKET order
In fact, it is equivalent to calling the API 3 times, creating 3 independent orders. When one of the take profit or stop loss orders is triggered, the other will be automatically canceled (OCO mechanism).
Practical Example: Market Order + Take Profit and Stop Loss
The following is a real API call to set take profit and stop loss on the market order interface:
// 1. Main Order: Market Buy
{
"type": "MARKET",
"side": "BUY",
"quantity": "0.014",
"price": "0" // Market order has no price
}
// 2. Take Profit Order: Market Take Profit (automatically generated)
{
"type": "TAKE_PROFIT_MARKET",
"side": "SELL",
"stopPrice": "3700", // Key: Take profit trigger price
"reduceOnly": true, // Key: Only reduce position
"price": "0" // Market execution
}
// 3. Stop Loss Order: Market Stop Loss (automatically generated)
{
"type": "STOP_MARKET",
"side": "SELL",
"stopPrice": "3300", // Key: Stop loss trigger price
"reduceOnly": true, // Key: Only reduce position
"price": "0" // Market execution
}
Key Features:
- Take profit and stop loss orders automatically set
reduceOnly=true
(only reduce position) - All three orders have the same quantity (0.014)
- Take profit and stop loss orders are automatically created after the main order is executed
reduceOnly (Only Reduce Position)#
true
- Can only reduce existing positions, cannot increase positions or open new positionsfalse
- Can increase positions or open new positions (default value)- Note: Not accepted in two-way position mode; not supported when using closePosition
Use Cases:
- Partial Closing: Already have a long position and want to partially close but do not want to open a short position
- Risk Control: Ensure that the order will only reduce risk exposure, not increase it
- Take Profit and Stop Loss: When setting take profit and stop loss orders, only want to close positions without opening short positions
- Capital Management: When the position is close to the liquidation price, only allow reduction operations
Practical Examples:
Scenario 1 - Programmatic Trading:
- Holding 100 BTC long contracts
- The program automatically places an order to sell 150 BTC (possibly based on signals or algorithms)
- Set
reduceOnly=true
as a safety measure - The order will only close 100 BTC, and the remaining 50 will be rejected, avoiding accidental short positions
Scenario 2 - Stop Loss Order:
- Holding 50 BTC short contracts
- Set a stop loss order: buy 100 BTC,
reduceOnly=true
- When triggered, it will only close 50 BTC short, and the remaining 50 will be rejected
- Prevent the stop loss order from turning into a long position
Scenario 3 - Batch Closing:
- Simultaneously holding multiple contract positions
- When placing batch closing orders, a certain contract's position may have already been partially closed by other orders
reduceOnly=true
ensures that there will be no excessive closing
Core Function:
- Mainly for safety protection, preventing accidental excessive trading
- Especially suitable for programmatic trading and automated strategies
Difference from Regular Orders:
- Regular Orders: If the sell quantity exceeds the position, the excess part will queue up waiting
reduceOnly=true
: The excess part will be directly rejected, ensuring no accidental overselling
Restrictions:
- One-way position mode: can be used
- Two-way position mode: does not support this parameter
- Mutually exclusive with
closePosition=true
, cannot be used simultaneously
closePosition (Close Position Flag)#
true
- Close all positions after triggeringfalse
- Do not close positions (default value)- Only supports: STOP_MARKET and TAKE_PROFIT_MARKET
- Cannot be used with quantity; inherently only has a closing effect, cannot be used with reduceOnly
Corresponding Exchange Interface Settings:
When you set stop loss on the Binance APP:
- Quantity Selection → Choose "All" or "100%"
- Execution Method → Choose "Market Execution" (instead of "Limit Execution")
- Trigger Condition → Choose "Mark Price" or "Latest Price" (this is the
workingType
parameter) - At this time, the API will automatically set
closePosition=true
Practical Scenario:
- Position: 100 BTC long
- Set stop loss in the APP, quantity selection "All", type selection "Market"
- Corresponding API:
type=STOP_MARKET, closePosition=true
- When triggered: Automatically close all 100 BTC, no need to specify a specific quantity
Difference from Manually Entering Quantity:
- Manually entering quantity:
quantity=100
- Selecting to close all positions:
closePosition=true
(more convenient, no need to calculate specific quantity)
priceMatch (Price Matching Mode)#
In the exchange APP, you may see a parameter BBO (Best Bid and Offer), which actually sets this parameter
OPPONENT
- Opponent price (best buy/sell price)OPPONENT_5
- Opponent price plus 5 ticksOPPONENT_10
- Opponent price plus 10 ticksOPPONENT_20
- Opponent price plus 20 ticksQUEUE
- Queue price (buy/sell price)QUEUE_5
- Queue price plus 5 ticksQUEUE_10
- Queue price plus 10 ticksQUEUE_20
- Queue price plus 20 ticks- Note: Cannot be used with price parameter at the same time
What is a tick (minimum price unit)?
- Each contract has a minimum price movement unit
- For example: The tick for BTCUSDT futures = 0.1 USDT
- Plus 5 ticks = price + (5 × 0.1) = price + 0.5 USDT
Practical Example:
Assuming the current BTCUSDT price:
- Buy price: 50000.0
- Sell price: 50000.1
- Tick size: 0.1
Then:
OPPONENT
= 50000.1 (sell price)OPPONENT_5
= 50000.1 + (5×0.1) = 50000.6QUEUE
= 50000.0 (buy price)QUEUE_5
= 50000.0 + (5×0.1) = 50000.5
selfTradePreventionMode (Self-Trade Prevention Mode)#
NONE
- No self-trade protection (default value)EXPIRE_TAKER
- When acting as a taker, cancel the new orderEXPIRE_MAKER
- When acting as a maker, cancel the old orderEXPIRE_BOTH
- Cancel both new and old orders
Distinction between Maker and Taker:
- Maker: Orders that are placed on the order book waiting to be executed, providing liquidity
- Taker: Orders that immediately match and execute with existing orders on the order book, consuming liquidity
- Distinction Standard: Based on the timing of order execution, not the buy/sell direction
- Orders placed first = Maker
- Orders placed later = Taker
- Both buy and sell orders can be either Maker or Taker
Specific Example:
Assuming you have a trading account and the following situation on the BTC/USDT trading pair:
- You placed a sell order at the price of 50,000 USDT (first placed order = Maker order)
- Then you want to place a buy order at the price of 50,000 USDT (later executed order = Taker order)
Behavior of Different Modes:
-
NONE (default):
- Your buy order will directly execute your own sell order
- Result: Self-trade occurs, you pay the fee but your position remains unchanged
-
EXPIRE_TAKER:
- The system detects that a self-trade will occur
- The new buy order (taker) is canceled
- The original sell order (maker) remains unchanged
-
EXPIRE_MAKER:
- The system detects that a self-trade will occur
- The original sell order (maker) is canceled
- The new buy order (taker) will seek to execute with other orders
-
EXPIRE_BOTH:
- The system detects that a self-trade will occur
- Both new and old orders are canceled
- No transactions occur
Practical Application Scenario:
- Quantitative trading robots often encounter this situation
- Particularly common in grid trading strategies
- Using
EXPIRE_TAKER
can protect existing order strategies
timeInForce (Order Validity Time)#
GTC
- Good Till Cancel, valid until canceledIOC
- Immediate or Cancel, executed immediately, unexecuted part is canceledFOK
- Fill or Kill, either fully executed or fully canceledGTX
- Good Till Crossing, passive orders, only make maker (displayed as "Only Maker" in the Binance APP)GTD
- Good Till Date, canceled at a specified time (must be used with goodTillDate) (displayed as "Time-weighted Order" in the Binance APP)
Applicable Order Types:
LIMIT
- Required, supports all timeInForce optionsSTOP
- Optional, default GTC, supports all timeInForce optionsTAKE_PROFIT
- Optional, default GTC, supports all timeInForce options
Not Supporting timeInForce:
MARKET
- Not supported, market orders are executed immediatelySTOP_MARKET
- Not supported, executed as market orders immediately after triggeringTAKE_PROFIT_MARKET
- Not supported, executed as market orders immediately after triggeringTRAILING_STOP_MARKET
- Not supported, executed immediately after trailing stop triggers
workingType (Conditional Price Type)#
CONTRACT_PRICE
- Latest contract price (default value)MARK_PRICE
- Mark price
Meaning of "Conditional Price Type":
- The "condition" here refers to the trigger condition, not the ordinary buy/sell price
- Only applicable to conditional orders: STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET
- Determines what price to use to judge whether the
stopPrice
trigger condition has been reached
Difference Between the Two Prices:
CONTRACT_PRICE (Latest Contract Price):
- The latest price of actual transactions, based on real buy/sell orders
- May be quickly influenced by large orders
- More volatile, easier to manipulate
MARK_PRICE (Mark Price):
- The "fair price" calculated by the exchange
- Usually calculated based on spot price + funding rate and other factors
- More stable, less prone to manipulation, used for calculating unrealized profits and losses and liquidation prices
Practical Example:
Setting a stop loss order: stopPrice = 49,000
- CONTRACT_PRICE mode: Triggered when the latest contract transaction price falls below 49,000 (may be triggered by a sudden spike)
- MARK_PRICE mode: Triggered when the mark price falls below 49,000 (more stable, less prone to manipulation)
Usage Recommendations:
- CONTRACT_PRICE: Suitable for short-term trading, sensitive to price
- MARK_PRICE: Suitable for avoiding being triggered by sudden spikes, more stable and reliable
priceProtect (Price Protection)#
TRUE
- Enable price protection to prevent excessive price deviation (over 5%)FALSE
- Disable price protection (default value)- Only applicable to: STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET
Understanding priceProtect (Price Protection):
Core Function:
- Prevent conditional orders from being executed at excessively deviated prices in extreme market conditions
- After the order has been triggered, check whether the current market price is reasonable
Working Mechanism:
- Trigger Judgment: Determine whether the
stopPrice
has been reached based onworkingType
- Order Trigger: If conditions are met, prepare to place an order
- Price Protection: If
priceProtect=TRUE
is enabled, check the current market price - Execution Decision: Execute if the price is reasonable, reject if unreasonable
Specific Scenario:
Assuming you set a stop loss order: stopPrice = 49,000
, type = STOP_MARKET
Without Price Protection (FALSE):
- When the price falls below 49,000, immediately place a market order
- May execute at 48,000, 47,000, or even lower prices (if market liquidity is poor)
With Price Protection (TRUE):
- When the price falls below 49,000, the system checks the current market price
- If the current price is 48,500 (not too far off), it executes normally
- If the current price is 45,000 (too far off), the order is rejected
Protection Goal:
- Prevent transactions at extreme prices during market crashes
- Avoid significant slippage losses due to insufficient liquidity
- Give users a chance to "reconsider"
Applicable Scenarios:
- Especially suitable for large orders
- During periods of high market volatility
- Trading pairs with poor liquidity
Notes:
- Enabling may cause stop loss orders to fail to execute, requiring a balance between protection and execution efficiency
- Independent of the
workingType
parameter, can be used in any combination
positionSide (Position Direction)#
BOTH
- Default value in one-way position modeLONG
- Go long in two-way position modeSHORT
- Go short in two-way position mode
Position Mode Description:
One-way Position Mode (Default):
- Only one direction of net position can be held for the same trading pair
- Buy operation: If there is a short position, close it first, the remaining part opens a long position
- Sell operation: If there is a long position, close it first, the remaining part opens a short position
- Simple and intuitive, suitable for beginners
- API parameter:
positionSide=BOTH
Two-way Position Mode:
- Can hold both long and short positions for the same trading pair simultaneously
- Must explicitly specify whether to go long or short
- Can implement more complex hedging strategies
- Risk management is more complex, requiring separate management of long and short positions
- API parameters:
positionSide=LONG
orpositionSide=SHORT
Switching Position Modes in the Binance APP:
- Click the three dots in the upper right corner of the futures trading page
- Find the "Position Mode" option
- Switch from "One-way Position" to "Two-way Position"
- Note: All positions must be closed before switching
Interface Display Differences:
- One-way Position: Only shows "Buy/Sell" buttons
- Two-way Position: Shows "Go Long/Go Short" selection, or "Open Long/Open Short/Close Long/Close Short" buttons
Notes:
- The
reduceOnly
parameter is not supported in two-way position mode - The
positionSide
parameter must be specified in two-way position mode - In one-way position mode, the
positionSide
parameter is optional, defaulting toBOTH
newOrderRespType (Response Type)#
ACK
- Confirmation information, returns basic order information (default value)RESULT
- Order result, returns detailed order information and transaction information
Response Example:
ACK Response (Basic Information):
{
"orderId": 28,
"symbol": "BTCUSDT",
"status": "NEW",
"clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
"price": "0.1",
"avgPrice": "0.00000",
"origQty": "10",
"executedQty": "0",
"cumQty": "0",
"timeInForce": "GTC",
"type": "LIMIT",
"reduceOnly": false,
"closePosition": false,
"side": "SELL",
"positionSide": "SHORT",
"stopPrice": "0",
"workingType": "CONTRACT_PRICE",
"priceProtect": false,
"origType": "LIMIT",
"time": 1499827319559,
"updateTime": 1499827319559
}
RESULT Response (Detailed Information):
{
"orderId": 28,
"symbol": "BTCUSDT",
"status": "FILLED",
"clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
"price": "0.1",
"avgPrice": "0.10000",
"origQty": "10",
"executedQty": "10",
"cumQty": "10",
"timeInForce": "GTC",
"type": "LIMIT",
"reduceOnly": false,
"closePosition": false,
"side": "SELL",
"positionSide": "SHORT",
"stopPrice": "0",
"workingType": "CONTRACT_PRICE",
"priceProtect": false,
"origType": "LIMIT",
"time": 1499827319559,
"updateTime": 1499827319559,
"fills": [
{
"price": "0.10000000",
"qty": "5.00000000",
"commission": "0.00000500",
"commissionAsset": "USDT",
"tradeId": 56
},
{
"price": "0.10000000",
"qty": "5.00000000",
"commission": "0.00000500",
"commissionAsset": "USDT",
"tradeId": 57
}
]
}
Main Differences:
- ACK: Only returns basic order status, does not include transaction details
- RESULT: Includes detailed transaction information (the
fills
array) and fee details - Performance: ACK response is faster, RESULT response is more detailed but slightly slower
Detailed Explanation of Each Order Type Parameter#
1. Limit Order#
When selecting "Limit Order" in the Binance APP, the corresponding API parameters are:
Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "BUY", // Required: Buy/Sell direction
"type": "LIMIT", // Required: Order type - Key parameter
"timeInForce": "GTC", // Required: Valid time - Key parameter
"quantity": "0.1", // Required: Order quantity
"price": "3450.00", // Required: Order price - Key parameter
// Optional parameters
"positionSide": "BOTH", // Position direction (default BOTH in one-way position)
"reduceOnly": false, // Whether to only reduce position
"newClientOrderId": "my_order_001", // Custom order ID
"newOrderRespType": "ACK" // Response type
}
2. Market Order#
When selecting "Market Order" in the Binance APP, the corresponding API parameters are:
Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "BUY", // Required: Buy/Sell direction
"type": "MARKET", // Required: Order type - Key parameter
"quantity": "0.1", // Required: Order quantity
// Optional parameters
"positionSide": "BOTH", // Position direction (default BOTH in one-way position)
"reduceOnly": false, // Whether to only reduce position
"newClientOrderId": "my_order_002", // Custom order ID
"newOrderRespType": "ACK" // Response type
// Note: Market orders do not require price parameter - Key feature
}
3. Limit Stop Loss/Take Profit#
When selecting Stop Loss/Take Profit in the Binance APP and choosing "Limit" as the execution method, the corresponding API parameters are:
Stop Loss Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "SELL", // Required: Buy/Sell direction
"type": "STOP", // Required: Order type - Key parameter
"quantity": "0.1", // Required: Order quantity
"price": "3400.00", // Required: Execution price after trigger - Key parameter
"stopPrice": "3420.00", // Required: Trigger price - Key parameter
// Optional parameters
"timeInForce": "GTC", // Valid time (default GTC)
"workingType": "MARK_PRICE", // Trigger condition: mark price/latest price - Key parameter
"priceProtect": false, // Price protection
"positionSide": "BOTH", // Position direction
"reduceOnly": false, // Whether to only reduce position
"newClientOrderId": "my_stop_001", // Custom order ID
"newOrderRespType": "ACK" // Response type
}
Take Profit Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "SELL", // Required: Buy/Sell direction
"type": "TAKE_PROFIT", // Required: Order type - Key parameter
"quantity": "0.1", // Required: Order quantity
"price": "3600.00", // Required: Execution price after trigger - Key parameter
"stopPrice": "3580.00", // Required: Trigger price - Key parameter
// Optional parameters
"timeInForce": "GTC", // Valid time (default GTC)
"workingType": "MARK_PRICE", // Trigger condition: mark price/latest price - Key parameter
"priceProtect": false, // Price protection
"positionSide": "BOTH", // Position direction
"reduceOnly": false, // Whether to only reduce position
"newClientOrderId": "my_tp_001", // Custom order ID
"newOrderRespType": "ACK" // Response type
}
4. Market Stop Loss/Take Profit#
When selecting Stop Loss/Take Profit in the Binance APP and choosing "Market" as the execution method, the corresponding API parameters are:
Stop Loss Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "SELL", // Required: Buy/Sell direction
"type": "STOP_MARKET", // Required: Order type - Key parameter
"stopPrice": "3420.00", // Required: Trigger price - Key parameter
// Quantity parameter (one of two options)
"quantity": "0.1", // Specify quantity
// "closePosition": true, // Or close all positions - Key parameter
// Optional parameters
"workingType": "MARK_PRICE", // Trigger condition: mark price/latest price - Key parameter
"priceProtect": false, // Price protection
"positionSide": "BOTH", // Position direction
"newClientOrderId": "my_stop_market_001", // Custom order ID
"newOrderRespType": "ACK" // Response type
// Note: Market stop loss does not require price parameter, executed at market price after trigger - Key feature
}
Take Profit Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "SELL", // Required: Buy/Sell direction
"type": "TAKE_PROFIT_MARKET", // Required: Order type - Key parameter
"stopPrice": "3580.00", // Required: Trigger price - Key parameter
// Quantity parameter (one of two options)
"quantity": "0.1", // Specify quantity
// "closePosition": true, // Or close all positions - Key parameter
// Optional parameters
"workingType": "MARK_PRICE", // Trigger condition: mark price/latest price - Key parameter
"priceProtect": false, // Price protection
"positionSide": "BOTH", // Position direction
"newClientOrderId": "my_tp_market_001", // Custom order ID
"newOrderRespType": "ACK" // Response type
// Note: Market take profit does not require price parameter, executed at market price after trigger - Key feature
}
5. Trailing Order#
When selecting "Trailing Order" in the Binance APP, the corresponding API parameters are:
Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "SELL", // Required: Buy/Sell direction
"type": "TRAILING_STOP_MARKET", // Required: Order type - Key parameter
"quantity": "0.1", // Required: Order quantity
"activationPrice": "3500.00", // Required: Activation price - Key parameter
"callbackRate": "1.0", // Required: Callback rate (1.0=1%) - Key parameter
// Optional parameters
"workingType": "CONTRACT_PRICE", // Price type: mark price/latest contract price
"positionSide": "BOTH", // Position direction
"newClientOrderId": "my_trailing_001", // Custom order ID
"newOrderRespType": "ACK" // Response type
// Note: Trailing orders do not require price and stopPrice parameters - Key feature
// Activation condition: The sell order's activationPrice must be greater than the current price
}
6. Only Maker#
When selecting "Only Maker" in the Binance APP, the corresponding API parameters are:
Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "BUY", // Required: Buy/Sell direction
"type": "LIMIT", // Required: Order type
"timeInForce": "GTX", // Required: Valid time - Key parameter (must be GTX)
"quantity": "0.1", // Required: Order quantity
"price": "3450.00", // Required: Order price
// Optional parameters
"positionSide": "BOTH", // Position direction (default BOTH in one-way position)
"reduceOnly": false, // Whether to only reduce position
"newClientOrderId": "my_gtx_001", // Custom order ID
"newOrderRespType": "ACK" // Response type
// Key feature: If the order will be executed immediately (becoming a taker), the system will reject the order
// Ensure only to provide liquidity and enjoy maker fees
}
7. Conditional Order#
Conditional orders are a general term for STOP and TAKE_PROFIT type orders; please refer to the "Limit Stop Loss/Take Profit" and "Market Stop Loss/Take Profit" sections for detailed parameters.
Key Features of Conditional Orders:
- Includes: STOP, TAKE_PROFIT, STOP_MARKET, TAKE_PROFIT_MARKET
- All have
stopPrice
trigger price - Key parameter - Can choose limit or market execution
- Supports
workingType
(trigger condition) andpriceProtect
(price protection) parameters - Only activated when the trigger condition is met
8. Time-weighted Order (TWAP)#
When selecting "Time-weighted Order" in the Binance APP, the corresponding API parameters are:
Complete Parameter Example:
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "BUY", // Required: Buy/Sell direction
"type": "LIMIT", // Required: Order type
"timeInForce": "GTD", // Required: Valid time - Key parameter (must be GTD)
"quantity": "0.1", // Required: Order quantity
"price": "3450.00", // Required: Order price
"goodTillDate": 1640995200000, // Required: Expiration timestamp - Key parameter
// Optional parameters
"positionSide": "BOTH", // Position direction (default BOTH in one-way position)
"reduceOnly": false, // Whether to only reduce position
"newClientOrderId": "my_twap_001", // Custom order ID
"newOrderRespType": "ACK" // Response type
// Key feature: The system will split large orders into multiple small market orders
// Executed in batches over a specified time period to achieve time-weighted average price
}
9. Segmented Orders#
Segmented orders are not a single API parameter but a combination of multiple orders:
Implementation Method:
- Split large orders into multiple small orders
- Each small order is placed independently
- Can be a combination of limit orders at different prices
- Or a sequence of orders executed over time
Complete Parameter Example (Multiple Independent Orders):
// Order 1 - Higher Price
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "BUY", // Required: Buy/Sell direction
"type": "LIMIT", // Required: Order type
"timeInForce": "GTC", // Required: Valid time
"quantity": "0.05", // Required: Order quantity
"price": "3450.00", // Required: Order price - Key parameter
"newClientOrderId": "batch_001_1" // Custom order ID
}
// Order 2 - Lower Price
{
"symbol": "ETHUSDT", // Required: Trading pair
"side": "BUY", // Required: Buy/Sell direction
"type": "LIMIT", // Required: Order type
"timeInForce": "GTC", // Required: Valid time
"quantity": "0.05", // Required: Order quantity
"price": "3440.00", // Required: Order price - Key parameter
"newClientOrderId": "batch_001_2" // Custom order ID
}
// Key feature: Achieve layered buying/selling strategies through multiple orders at different prices
Summary of Parameter Dependencies#
Price-Related Parameters#
LIMIT
type: Must provideprice
MARKET
type: Does not require price parameterSTOP
/TAKE_PROFIT
type: Requiresprice
andstopPrice
STOP_MARKET
/TAKE_PROFIT_MARKET
type: Only requiresstopPrice
TRAILING_STOP_MARKET
type: RequiresactivationPrice
andcallbackRate
Quantity-Related Parameters#
- Most order types require
quantity
STOP_MARKET
/TAKE_PROFIT_MARKET
can useclosePosition=true
insteadTRAILING_STOP_MARKET
does not need to explicitly specify quantity
Time Validity Parameters#
LIMIT
orders: Must specifytimeInForce
STOP
/TAKE_PROFIT
orders: OptionaltimeInForce
, default GTC- Other order types: Typically do not require this parameter
Notes#
Judging Maker and Taker#
Many people mistakenly believe that order type determines the Maker/Taker role; in fact:
Key Judgment Standard:
- Whether the order immediately executes existing orders on the order book, rather than the order type itself
Market Orders:
- Usually Taker: Because market orders will immediately execute at the current best price
- Rare Exceptions: In extreme cases of insufficient liquidity, market orders may partially become Makers
Limit Orders:
- May be Maker: If the limit order price cannot be executed immediately, it will hang on the order book waiting
- May also be Taker: If the limit order price can immediately match and execute with existing orders
Specific Example:
Limit Order as Taker:
- Current sell price: 50,000 USDT
- You place a limit buy order: 50,000 USDT (executed immediately)
- Result: Your limit order is Taker
Limit Order as Maker:
- Current sell price: 50,000 USDT
- You place a limit buy order: 49,950 USDT (cannot be executed immediately)
- Result: Your limit order hangs on the order book, becoming Maker
Market Order as Taker (Common):
- You place a market buy order
- Immediately executes at the current best sell price
- Result: You are Taker
Impact on selfTradePreventionMode:
- The system will apply protection rules based on the actual Maker/Taker roles
- Not based on order type, but on the final execution role
How to Ensure Being a Maker#
Since Makers enjoy lower fees, many traders want to ensure their orders become Makers:
1. Use timeInForce=GTX
- GTX (Good Till Crossing): Passive orders, only make makers
- If the order will be executed immediately (becoming a taker), the system will directly reject the order
- This is the most direct and safest method
2. Price Strategy
- Buy Orders: Set price below the current best buy price
- Sell Orders: Set price above the current best sell price
- This way, the order will hang on the order book waiting for execution
3. Use priceMatch's Queue Price
QUEUE
: Queue price (buy/sell price)QUEUE_5/10/20
: Slightly optimized based on queue price- Although not 100% guaranteed, it is likely to become a maker
Practical Example:
Assuming the current BTCUSDT: best buy price 49,950, best sell price 50,000
Ensuring to be a maker:
// Buy order to be a maker
{
"side": "BUY",
"price": "49,940", // Below the best buy price
"timeInForce": "GTX"
}
// Sell order to be a maker
{
"side": "SELL",
"price": "50,010", // Above the best sell price
"timeInForce": "GTX"
}
Safest Combination:
Using timeInForce=GTX
+ Appropriate price strategy, even if the price judgment is wrong, the system will reject the order instead of letting you accidentally become a taker.