Guides
Guides

Create new order

Place a new market or limit order via POST /fapi/v2/futures/order (?symbol= or ?id=).

Place a new market or limit order. Pass the asset as a query parameter (?id= or ?symbol=). Leverage comes from the leverage already set for that asset (not sent in the body).

order_price, stoploss_price, and takeprofit_price are USDT price levels; quantity is in the base asset. Add "trade_currency": "INR" to draw margin from the INR futures wallet; omit it (or use "USDT") for USDT.

Request

# USDT — MARKET with stop loss
curl -X POST "https://trade.mudrex.com/fapi/v2/futures/order?symbol=BTCUSDT" \
  -H "Content-Type: application/json" \
  -H "X-Authentication: your-secret-key" \
  -d '{
    "trigger_type": "MARKET",
    "order_type": "LONG",
    "quantity": "0.001",
    "trade_currency": "USDT",
    "is_stoploss": true,
    "stoploss_price": "950",
    "client_order_id": "my-order-123"
  }'
# INR — LIMIT
curl -X POST "https://trade.mudrex.com/fapi/v2/futures/order?symbol=BTCUSDT" \
  -H "Content-Type: application/json" \
  -H "X-Authentication: your-secret-key" \
  -d '{
    "trigger_type": "LIMIT",
    "order_type": "SHORT",
    "quantity": "0.01",
    "order_price": "105",
    "trade_currency": "INR"
  }'
# By asset UUID instead of symbol
curl -X POST "https://trade.mudrex.com/fapi/v2/futures/order?id={asset_id}" \
  -H "Content-Type: application/json" \
  -H "X-Authentication: your-secret-key" \
  -d '{
    "trigger_type": "MARKET",
    "order_type": "LONG",
    "quantity": "0.001"
  }'

Parameters

ParameterTypeRequiredDescription
idstringConditionalQuery parameter. Asset UUID. Required unless symbol is given.
symbolstringConditionalQuery parameter. Trading symbol (e.g. BTCUSDT). Required unless id is given.
trigger_typestringYesMARKET or LIMIT.
order_typestringYesLONG or SHORT. If reduce_only is true, must be opposite the existing position.
quantitynumberYesOrder quantity in the base asset. Must be > 0 and a multiple of the asset's quantity step.
order_pricenumberConditionalRequired and > 0 for LIMIT. Ignored for MARKET, which uses the live price. USDT.
is_stoplossbooleanNoWhether to set a stop loss order (default: false). Ignored when reduce_only is true.
stoploss_pricenumberConditionalRequired if is_stoploss is true. USDT price. LONG: below the order price. SHORT: above it.
is_takeprofitbooleanNoWhether to set a take profit order (default: false). Ignored when reduce_only is true.
takeprofit_pricenumberConditionalRequired if is_takeprofit is true. USDT price. LONG: above the order price. SHORT: below it.
reduce_onlybooleanNoIf true, order can only decrease or close an existing position (default: false). No new margin is blocked.
trade_currencystringNoUSDT or INR (body field). Defaults to USDT. Selects the wallet the margin is debited from.
client_order_idstringNoOptional client-supplied order id (letters, digits, -, _; max 64). See Client order ID.

Response

Status: 202 Accepted

{
    "success": true,
    "data": {
        "leverage": "5",
        "quantity": "30",
        "price": "0.19887",
        "order_id": "01a0c317-61e9-7388-a2f9-474780998ebb",
        "status": "CREATED",
        "message": "OK",
        "client_order_id": "my-order-123",
        "position_id": "01a0c317-61e7-73ec-93c5-a98a7b82bbb7"
    }
}

Response fields

FieldDescription
order_idUUID of the created order. Used for CRUD operations on the order/position (SL/TP, square off, cancel).
client_order_idYour client-supplied id when set; otherwise null / omitted.
position_idUUID of the position the order belongs to. Returned before the order fills. See Order and position IDs.
priceOrder price (USDT). Live price for MARKET; the order_price sent for LIMIT.
quantityOrder quantity (base asset).
leverageLeverage used for the order, resolved from the leverage saved for this asset.
statusOrder status (e.g. CREATED).
messageStatus message.

Errors

❕Common errors
HTTPError textMeaning / how to fix
400invalid trade_currencytrade_currency is not USDT or INR.
400trigger_type must be MARKET or LIMITtrigger_type is not MARKET or LIMIT.
400order_type must be LONG or SHORTorder_type is not LONG or SHORT.
400order_price must be > 0 for LIMIT ordersLIMIT order sent with a zero or missing price.
400quantity not a multiple of the quantity stepquantity is not a multiple of the asset's quantity_step.
400order quantity out of permissible rangeQuantity below the asset's min or above its max contract size.
400price not a multiple of the price steporder_price is not a multiple of the asset's price step (LIMIT only).
400order price out of permissible rangeorder_price is outside the asset's min/max price.
400order value less than minimum required valueNotional value (quantity × price) is below the asset's min_notional_value.
400invalid stop loss pricestoploss_price is on the wrong side of the order price.
400invalid takeprofit pricetakeprofit_price is on the wrong side of the order price.
400leverage not foundLeverage has not been set for this asset. Set it via POST /futures/{asset_id}/leverage first.
400insufficient balanceAvailable balance is less than the required margin.
400reduce only order in new positionreduce_only is true but no open position exists.
400reduce only order on same side of the positionreduce_only order placed on the same side as the existing position.
400Params errorThe exchange rejected the order parameters.
400This trading pair is being delistedThe asset is being delisted; no new positions are allowed.
404future asset not foundThe asset UUID or symbol does not exist.
423action not allowed: another user action in progressAnother order or a liquidation is in progress for the same asset. Retry shortly.
500something went wrongInternal error; retry with backoff.

Leverage not set

{
    "success": false,
    "errors": [
        { "code": 400, "text": "leverage not found" }
    ]
}

Status: 400 Bad Request

Notes

  • Position id: Placing an order creates its position immediately, with status INITIATED, and returns the position_id without waiting for a fill. The position_id does not change. The position is listed in Open Positions once it is OPEN.
  • Client order id: Optional body field client_order_id. See Client order ID for lookup and cancel by client id.
  • Leverage: Not accepted in the request body. Set it once per asset with POST /futures/{asset_id}/leverage (include trade_currency for INR) before placing an order, or the call returns 400 leverage not found.
  • Order amount: Always computed as quantity × price. actual_amount and desired_amount are not accepted.
  • Order Price: Must be between the asset's min & max price for LONG/SHORT orders (USDT).
  • LIMIT orders / minimum notional: A LIMIT order must meet the asset's min_notional_value (USDT) evaluated at the limit price. Orders below the minimum notional are rejected.
  • Reduce-Only Orders: If reduce_only is true and a position is open, the order type must be opposite the existing position. Stop loss and take profit fields are ignored.
  • Stop Loss/Take Profit: If is_takeprofit or is_stoploss is true, you must define the corresponding price. The stop loss price is not validated against the liquidation price — check it yourself.
  • Available balance: Unsettled PnL is not counted towards available balance, so a margin check can fail here where it would have passed on POST /fapi/v1/futures/{asset_id}/order.
  • Concurrent actions: 423 means another order or liquidation holds the lock for the same user and asset. Retry after a short delay rather than resubmitting immediately.
  • Rejected requests: a request rejected with 4xx creates no order. A lookup by its client_order_id returns 404.
  • Settlement: 202 Accepted means the order was created and handed to the exchange. Fills and settlement are applied asynchronously — poll the order to follow its progress.

Place order (v1)

POST /fapi/v1/futures/{asset_id}/order is supported. Prefer the v2 path (?symbol= or ?id=) for lower latency. The v1 response has the same fields as v2, plus amount (order value, USDT).

Status: 202 Accepted

{
    "success": true,
    "data": {
        "leverage": "5",
        "amount": "6.038",
        "quantity": "4",
        "price": "1.5095",
        "order_id": "01a0f1ca-8e86-7b1d-8616-ce6f8a10eb8e",
        "status": "CREATED",
        "message": "OK",
        "client_order_id": null,
        "position_id": "01a0f1ca-8e83-7c9f-b3e6-d51b34cba2e3"
    }
}

Did this page help you?