TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/bitmart-api/llms.txt
Use this file to discover all available pages before exploring further.
FuturesClientV2 order management endpoints let you submit new futures orders, modify or cancel existing ones, and retrieve the full lifecycle of your orders and trades. All methods on this page require authentication (SIGNED).
Setup
Placing Orders
submitFuturesOrder(params)
Places a new futures order. Supports limit and market order types with cross or isolated margin modes.
Signature
Contract symbol (e.g.
BTCUSDT).Order side (determines position direction and open/close intent):
| Value | Meaning |
|---|---|
1 | buy_open_long — Open a long position |
2 | buy_close_short — Close a short position (buy back) |
3 | sell_close_long — Close a long position (sell) |
4 | sell_open_short — Open a short position |
Order type:
limit or market. Defaults to limit.Order quantity in contracts (integer).
Limit price (required when
type is limit).Leverage multiplier as a string (e.g.
"10"). Required for new positions.Margin mode:
cross or isolated.Optional client-defined order ID for idempotency (max 36 characters).
Order mode (for hedge-mode accounts):
1— GTC (Good Till Cancelled)2— FOK (Fill or Kill)3— IOC (Immediate or Cancel)4— Maker-only (Post Only)
Optional take-profit trigger price to attach to the order.
Optional stop-loss trigger price to attach to the order.
Price type for preset take-profit:
1 = last price, 2 = mark price.Price type for preset stop-loss:
1 = last price, 2 = mark price.Self-trade prevention mode. Controls behaviour when an order would match against another order from the same account.
FuturesOrderSubmitResult)
| Field | Type | Description |
|---|---|---|
order_id | number | Exchange-assigned order ID |
price | string | Executed or queued price |
updateFuturesLimitOrder(params)
Modifies the price and/or size of an existing open limit order.
Signature
Contract symbol (e.g.
BTCUSDT).Exchange order ID to modify. Required if
client_order_id is not provided.Client order ID to modify. Required if
order_id is not provided.New limit price.
New order quantity (as a string).
Cancelling Orders
cancelFuturesOrder(params)
Cancels a single open order by order ID or client order ID.
Signature
Contract symbol (e.g.
BTCUSDT).Exchange order ID to cancel.
Client order ID to cancel.
cancelAllFuturesOrders(params)
Cancels all open orders for a specific futures symbol in a single call.
Signature
Contract symbol to cancel all open orders for.
cancelAllFuturesOrdersAfter(params)
Sets a dead man’s switch timer. If not refreshed within the specified timeout, all open orders for the symbol are automatically cancelled. Set timeout: 0 to disable.
Signature
Timeout in seconds after which all orders will be cancelled. Set to
0 to disable the timer.Contract symbol.
Call this endpoint periodically (e.g. every 30 seconds) to act as a heartbeat. If your application loses connectivity and cannot refresh, orders will be cancelled automatically after the timeout expires.
Querying Orders
getFuturesAccountOrder(params)
Fetches the details of a single order by symbol and order ID.
Signature
Contract symbol.
Exchange-assigned order ID.
Account type filter:
futures or copy_trading.getFuturesAccountOrderHistory(params)
Returns completed (filled, cancelled, or expired) order history for a symbol.
Signature
Contract symbol.
Start time as Unix timestamp (ms).
End time as Unix timestamp (ms).
Account type filter.
getFuturesAccountOpenOrders(params?)
Returns all currently open (active or partially filled) orders.
Signature
Filter by contract symbol.
Filter by order type:
limit, market, or trailing.Filter by state:
all (default) or partially_filled.Maximum number of results to return.
getFuturesAccountTrades(params)
Returns a list of your trade fills (executions) with PnL and fee information.
Signature
Filter by contract symbol.
Start time as Unix timestamp (ms).
End time as Unix timestamp (ms).
Filter by a specific order ID.
Filter by client order ID.
Account type filter.
FuturesAccountTrade)
| Field | Type | Description |
|---|---|---|
trade_id | string | Unique trade ID |
order_id | string | Parent order ID |
symbol | string | Contract symbol |
side | 1|2|3|4 | Trade side |
price | string | Fill price |
vol | string | Fill quantity |
exec_type | string | Taker or Maker |
profit | boolean | Whether the trade was profitable |
realised_profit | string | Realised PnL |
paid_fees | string | Fees paid |
create_time | number | Trade time (Unix ms) |
getFuturesAccountTransactionHistory(params)
Returns a detailed ledger of all account transactions including funding settlements, fee payments, deposits, and realised PnL transfers.
Signature
Filter by contract symbol.
Transaction type filter:
0— All1— Transfer2— Realised PnL3— Funding fee4— Commission5— Liquidation
Start time as Unix timestamp (ms).
End time as Unix timestamp (ms).
Number of records per page.
Account type filter.