Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
Websocket
Public
Private
    Place Order ChannelCancel Order ChannelModify Order ChannelOrder ChannelFill ChannelFast Fill ChannelBatch Place Order ChannelBatch Cancel Order ChannelBatch Modify Order ChannelAccount ChannelPositions ChannelADL Notification ChannelStrategy Order Channel
Reality
SBE
Private

Place Order Channel

Description

The ACK response only indicates that the request has been successfully accepted. Please use the WebSocket order push channel to confirm the actual order status.

This endpoint allows order placement across spot, margin, or futures markets, as well as Reality (rToken) stocks, with customizable parameters, including price, quantity, and order type, etc.

  • Reality (rToken) rate limit
    User level: 5/sec/UID by default, 30/sec/UID for whitelisted users (contact your BD/RM to apply).

  • Futures
    For one-way mode, reduce-only orders are allowed to place. If a reduce only order already exists and the order quantity equals the position size, or if a new reduce only order exceeds the remaining position size, the previous reduction order will be automatically canceled and replaced. In this case, the returned orderId will be null. It is recommended to always provide a clientOid.

  • Margin
    Margin orders will automatically trigger fund borrowing.

  • Order Check

    • Futures must meet the price multiplier and be a multiple of priceMultiplier, and conform to the pricePrecision decimal places. qty must be greater than or equal to minOrderAmount and be a multiple of sizeMultiplier.
    • Spot must meet the decimal place requirement. qty must be greater than or equal to minOrderAmount.
  • Open Position Logic

    • Hedge-mode
      Open long: side=buy & posSide=long
      Open Short: side=sell & posSide=short
      Close long: side=sell & posSide=long
      Close short: side=buy & posSide=short
    • One-way-mode
      Open long: side=buy
      Open short: side=sell
      Close long: side=sell & reduceOnly=yes
      Close short: side=buy & reduceOnly=yes
  • Order Limit

    • Futures: 400 orders across all USDT, Coin-M, and USDC futures trading pairs.
    • Spot: 400 orders across all spot and margin trading pairs.
  • ClientOid Constraints Please ensure your clientOid matches the regular expression ^[0-9A-Za-z_:#\\-+\\s]{1,32}$, consisting of 1 to 32 characters, including periods (.), uppercase letters, colons (:), lowercase letters, numbers, underscores (_), and hyphens (-).

  • Request Monitor
    The API requests will be monitored. If the total number of orders for a single account (including master and sub-accounts) exceeds a set daily limit (UTC 00:00 - UTC 24:00), the platform reserves the right to issue reminders, warnings, and enforce necessary restrictions. By using the API, clients acknowledge and agree to comply with these terms.

  • Error Sample { "code":"40762", "msg":"The order size is greater than the max open size", "requestTime":1627293504612 } This error code may occur in the following scenarios.

    • Insufficient account balance.
    • The position tier for this symbol has reached its limit. Position tiers
  • Note: If the following errors occur when placing an order, please use clientOid to query the order details to confirm the final result of the operation.

  • COIN-M Futures Symbol Format Description:

    • The symbol format for the new COIN-M business line is "XXXUSD_CM". For example, the BTCUSD trading pair in COIN-M futures is formatted as BTCUSD_CM.
    • The new COIN-M business line does not support modifying orders, ADL, strategy orders,or preset take-profit/stop-loss orders.
Code
{ "code": "40010", "msg": "Request timed out", "id": 1666268894074, "event":"error" } { "code": "40725", "msg": "service return an error", "id": 1666268894071, "event":"error" } { "code": "45001", "msg": "Unknown error", "id": 1666268894071, "event":"error" }
Code
{ "op": "trade", "id": "1750034396082", "category": "spot", "topic": "place-order", "requestTime": "1750034396082", "args": [ { "orderType": "limit", "price": "100", "qty": "0.1", "side": "buy", "symbol": "BTCUSDT", "timeInForce": "gtc", } ] }

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation:
trade
idStringYesRequest identifier
topicStringYesTopic:
place-order
categoryStringYesCategory (must be lowercase)
spotSpot
margin Margin
usdt-futures USDT futures
coin-futures Coin futures
usdc-futures USDC futures
apiCodeStringNoAPI rebate identifier
requestTimeStringNoRequest time (client-side timestamp)
Used to calculate the time difference with receiveWindow
If not provided, receiveWindow will have no effect
argsList<Object>YesChannel list
> symbolStringYesSymbol name
> orderTypeStringYesOrder type
limit : Limit order
market : Market order
> qtyStringYesOrder quantity
Spot/Margin
For market buy orders,the unit is quote coin
For limit and market sell orders, the unit is base coin
USDT/USDC-Futures
The unit is base coin
COIN-Futures
The unit is quote coin
> priceStringNoOrder price
This field is required when the order type is a limit order .
This field is not applicable when the order type is a market order.
> sideStringYesOrder side
buy
sell
> posSideStringNoPosition side
long
short
This field is required in hedge-mode positions.
Available only for futures
> timeInForceStringNoTime in force
gtc: Good 'til canceled. It remains active until it is either filled or manually canceled.
ioc: Immediate or cancel. It must be executed immediately, with any unfilled portion canceled.
fok: Fill or kill. It must be fully executed immediately, or it is canceled entirely.
post_only: Post only. It will only be added to the order book as a maker.
rpi Retail Price Improvement order. A non-displayed limit order that provides price improvement for retail order flow. Only available for accounts with RPI market maker permissions.
This field is required when orderType is limit. If omitted, it defaults to gtc
> reduceOnlyStringNoReduce-only identifier
YES/NO
defaultNO; YES indicates that your position may only be reduced in size upon the activation of this order
> clientOidStringNoClient order ID
Must match the regular expression ^[0-9A-Za-z_:#\-+\s]{1,32}$, i.e. 1 to 32 characters, consisting of uppercase and lowercase letters, digits, underscores (_), hyphens (-), plus signs (+), colons (:), number signs (#), and spaces
> stpModeStringNoSTP Mode(Self Trade Prevention)
none: STP is not applied; orders are matched normally without comparing user IDs (Default)
cancel_taker: when a self-trade is detected, the taker order is canceled and the maker order remains in the order book
cancel_maker: when a self-trade is detected, the maker order is canceled and the taker order continues to execute
cancel_both: when a self-trade is detected, both the taker and maker orders are canceled
The STP action is determined by the taker order's stpMode; the maker order's existing stpMode setting is not considered.
> tpTriggerByStringNoPreset Take-Profit Trigger Type
marketMarket Price
mark Mark Price
If not specified, the default value is market price
Note: This field is only valid for the contract business lines: USDT-Futures, COIN-Futures, and USDC-Futures.
> slTriggerByStringNoPreset Stop-Loss Trigger Type
marketMarket Price
mark Mark Price
If not specified, the default value is market price
Note: This field is only valid for the contract business lines: USDT-Futures, COIN-Futures, and USDC-Futures.
> takeprofitStringNoPreset Take-Profit Trigger Price
> stoplossStringNoPreset Stop-Loss Trigger Price
> tpOrderTypeStringNoTake-Profit Trigger Strategy Order Type
limit Limit Order
market Market Order
> slOrderTypeStringNoStop-Loss Trigger Strategy Order Type
limit Limit Order
market Market Order
> tpLimitPriceStringNoTake-Profit Strategy Order Execution Price
This field is only valid for limit orders (when tpOrderType=limit); it is ignored for market orders.
> slLimitPriceStringNoStop-Loss Strategy Order Execution Price
This field is only valid for limit orders (when slOrderType=limit); it is ignored for market orders.
> marginModeStringNoMargin mode
crossed Cross margin
isolated Isolated margin
If not provided, defaults to cross margin
Available only for futures
> autoBorrowStringNoAuto borrow switch
yes Enable
no Disable (default)
Only applicable to spot orders. When enabled, if the obtained coin does not support borrowing while the consumed coin does, and the available balance of the consumed coin is insufficient, the system automatically borrows the consumed coin to make up the shortfall.
> receiveWindowStringNoValid window period (order TTL mechanism)
Unit: milliseconds. Valid range: [10, 60000]
If not specified, the order remains valid until canceled or filled
Note: receiveWindow is only effective when requestTime is also provided
Code
{ "event": "trade", "id": "1750034396082", "category": "spot", "topic": "place-order", "args": [ { "symbol": "BTCUSDT", "orderId": "xxxxxxxx", "clientOid": "xxxxxxxx", "cTime": "1750034397008", "receiveTime": "1750034396998123", "pushTime": "1750034397076456" } ], "code": "0", "msg": "success", "connId": "xxxxxxxxxx", "rateLimit": [ { "limit": "10", "remaining": "9" } ], "ts": "1750034397076" }

Response Parameters

ParametersTypeDescription
eventStringEvent
trade/error
idStringRequest identifier
topicStringTopic
place-order
categoryStringCategory
spotSpot
margin Margin
usdt-futures USDT futures
coin-futures Coin futures
usdc-futures USDC futures
argsList<Object>Channel list
> symbolStringSymbol name
> orderIdStringOrder ID
> clientOidStringClient order ID
> cTimeStringOrder creation time
Unix millisecond timestamp
> receiveTimeStringGateway receive time
Unix microsecond timestamp
> pushTimeStringGateway push time
Unix microsecond timestamp
codeStringCode
msgStringMessage
connIdStringConnection ID
rateLimitArrayRate limit balance array
> limitStringRate limit quota for this dimension
> remainingStringRemaining available quota
tsStringTimestamp
Liquidation ChannelCancel Order Channel
JSON
JSON
JSON