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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Conditional | Query parameter. Asset UUID. Required unless symbol is given. |
symbol | string | Conditional | Query parameter. Trading symbol (e.g. BTCUSDT). Required unless id is given. |
trigger_type | string | Yes | MARKET or LIMIT. |
order_type | string | Yes | LONG or SHORT. If reduce_only is true, must be opposite the existing position. |
quantity | number | Yes | Order quantity in the base asset. Must be > 0 and a multiple of the asset's quantity step. |
order_price | number | Conditional | Required and > 0 for LIMIT. Ignored for MARKET, which uses the live price. USDT. |
is_stoploss | boolean | No | Whether to set a stop loss order (default: false). Ignored when reduce_only is true. |
stoploss_price | number | Conditional | Required if is_stoploss is true. USDT price. LONG: below the order price. SHORT: above it. |
is_takeprofit | boolean | No | Whether to set a take profit order (default: false). Ignored when reduce_only is true. |
takeprofit_price | number | Conditional | Required if is_takeprofit is true. USDT price. LONG: above the order price. SHORT: below it. |
reduce_only | boolean | No | If true, order can only decrease or close an existing position (default: false). No new margin is blocked. |
trade_currency | string | No | USDT or INR (body field). Defaults to USDT. Selects the wallet the margin is debited from. |
client_order_id | string | No | Optional 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
| Field | Description |
|---|---|
order_id | UUID of the created order. Used for CRUD operations on the order/position (SL/TP, square off, cancel). |
client_order_id | Your client-supplied id when set; otherwise null / omitted. |
position_id | UUID of the position the order belongs to. Returned before the order fills. See Order and position IDs. |
price | Order price (USDT). Live price for MARKET; the order_price sent for LIMIT. |
quantity | Order quantity (base asset). |
leverage | Leverage used for the order, resolved from the leverage saved for this asset. |
status | Order status (e.g. CREATED). |
message | Status message. |
Errors
Common errors
| HTTP | Error text | Meaning / how to fix |
|---|---|---|
| 400 | invalid trade_currency | trade_currency is not USDT or INR. |
| 400 | trigger_type must be MARKET or LIMIT | trigger_type is not MARKET or LIMIT. |
| 400 | order_type must be LONG or SHORT | order_type is not LONG or SHORT. |
| 400 | order_price must be > 0 for LIMIT orders | LIMIT order sent with a zero or missing price. |
| 400 | quantity not a multiple of the quantity step | quantity is not a multiple of the asset's quantity_step. |
| 400 | order quantity out of permissible range | Quantity below the asset's min or above its max contract size. |
| 400 | price not a multiple of the price step | order_price is not a multiple of the asset's price step (LIMIT only). |
| 400 | order price out of permissible range | order_price is outside the asset's min/max price. |
| 400 | order value less than minimum required value | Notional value (quantity × price) is below the asset's min_notional_value. |
| 400 | invalid stop loss price | stoploss_price is on the wrong side of the order price. |
| 400 | invalid takeprofit price | takeprofit_price is on the wrong side of the order price. |
| 400 | leverage not found | Leverage has not been set for this asset. Set it via POST /futures/{asset_id}/leverage first. |
| 400 | insufficient balance | Available balance is less than the required margin. |
| 400 | reduce only order in new position | reduce_only is true but no open position exists. |
| 400 | reduce only order on same side of the position | reduce_only order placed on the same side as the existing position. |
| 400 | Params error | The exchange rejected the order parameters. |
| 400 | This trading pair is being delisted | The asset is being delisted; no new positions are allowed. |
| 404 | future asset not found | The asset UUID or symbol does not exist. |
| 423 | action not allowed: another user action in progress | Another order or a liquidation is in progress for the same asset. Retry shortly. |
| 500 | something went wrong | Internal 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 theposition_idwithout waiting for a fill. Theposition_iddoes not change. The position is listed in Open Positions once it isOPEN. - 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(includetrade_currencyfor INR) before placing an order, or the call returns400 leverage not found. - Order amount: Always computed as
quantity × price.actual_amountanddesired_amountare not accepted. - Order Price: Must be between the asset's min & max price for
LONG/SHORTorders (USDT). - LIMIT orders / minimum notional: A
LIMITorder must meet the asset'smin_notional_value(USDT) evaluated at the limit price. Orders below the minimum notional are rejected. - Reduce-Only Orders: If
reduce_onlyistrueand 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_takeprofitoris_stoplossistrue, 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:
423means 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
4xxcreates no order. A lookup by itsclient_order_idreturns404. - Settlement:
202 Acceptedmeans 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"
}
}Updated 11 days ago
