TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/kucoin-api/llms.txt
Use this file to discover all available pages before exploring further.
FuturesClient provides full position and margin lifecycle management for KuCoin Futures. You can retrieve live position data, switch between isolated and cross margin modes (individually or in batch), adjust cross-margin leverage, manually add or remove isolated margin, query and update risk limit levels, and control whether the account operates in one-way or hedge mode. All methods in this section require authentication.
Query Positions
getPosition(params)
Returns position details for a single symbol using the v1 endpoint.
getPosition is deprecated. Prefer getPositionV2 for new integrations.The futures contract symbol, e.g.
XBTUSDTM.Position ID.
Contract symbol.
Current margin mode for this position.
Position size in lots (negative = short).
Average entry price.
Current mark price.
Unrealised profit/loss.
Unrealised PnL as a fraction.
Return on equity percentage.
Accumulated realised PnL.
Estimated liquidation price.
Bankruptcy price.
Current leverage.
Whether the position is currently open.
Position side;
BOTH for one-way mode.Settlement currency.
getPositionV2(params)
Returns position details for a single symbol using the v2 endpoint (recommended).
The futures contract symbol.
FuturesPosition shape as getPosition. See response fields above.
getPositions(params?)
Returns a list of all currently open positions, optionally filtered by settlement currency.
Filter positions by settlement currency, e.g.
USDT (optional).getHistoryPositions(params?)
Returns paginated historical (closed) position records.
Filter by contract symbol (optional).
Start time (Unix ms, optional).
End time (Unix ms, optional).
Maximum records per page (optional).
Page cursor for pagination (optional).
Current page.
Page size.
Total closed position records.
Total pages.
Margin Mode
getMarginMode(params)
Returns the current margin mode (ISOLATED or CROSS) for the specified symbol.
Futures contract symbol.
updateMarginMode(params)
Switches the margin mode for a specified symbol between ISOLATED and CROSS.
Futures contract symbol.
Target margin mode.
batchSwitchMarginMode(params)
Switches the margin mode for multiple symbols at once.
Target margin mode for all listed symbols.
Array of futures contract symbols to update.
Map of
{ symbol: marginMode } for each successfully updated symbol.Array of error objects for any symbols that failed, each with
code, msg, and symbol.Position Mode
getPositionMode()
Returns the current position mode for the account: one-way (0) or hedge (1).
0 = one-way mode (single BOTH-side position per symbol). 1 = hedge mode (separate LONG and SHORT positions).updatePositionMode(params)
Switches the account-wide position mode between one-way and hedge mode.
"0" = one-way mode. "1" = hedge mode.Switching position mode affects all futures trading pairs. Ensure all positions and open orders are closed before switching.
Open Size
getMaxOpenSize(params)
Returns the maximum number of contracts that can be opened at the given price and leverage.
Futures contract symbol.
Order price as a string.
Intended leverage multiplier.
Contract symbol.
Maximum lots available for a long position.
Maximum lots available for a short position.
Isolated Margin Operations
getMaxWithdrawMargin(params)
Returns the maximum amount of margin that can be manually withdrawn from the current isolated margin position.
Futures contract symbol.
depositMargin(params)
Manually adds isolated margin to the specified position.
Futures contract symbol.
Amount of margin to add (in settlement currency).
Unique business number for idempotency (client-generated).
Position ID.
Contract symbol.
Updated total position margin.
Amount of manually added margin.
Actual leverage after deposit.
Updated liquidation price.
withdrawMargin(params)
Manually removes isolated margin from the specified position.
Futures contract symbol.
Amount of margin to remove as a string.
Cross Margin Leverage
getCrossMarginLeverage(params)
Returns the current cross-margin leverage multiple for the specified symbol.
Futures contract symbol.
changeCrossMarginLeverage(params)
Updates the cross-margin leverage multiple for the specified symbol.
Futures contract symbol.
New leverage value as a string, e.g.
"10".Risk Limits
getRiskLimitLevel(params)
Returns the isolated margin risk limit levels available for the specified contract. Each level defines margin rates and maximum leverage.
Futures contract symbol.
Contract symbol.
Risk limit level index.
Maximum position value for this level.
Minimum position value for this level.
Maximum allowed leverage at this level.
Initial margin rate.
Maintenance margin rate.
updateRiskLimitLevel(params)
Adjusts the isolated margin risk limit level for the specified symbol. Changing levels may cancel open orders.
Futures contract symbol.
Target risk limit level number.
true on successful submission.
Cross Margin Requirements & Risk
getCrossMarginRequirement(params)
Queries the cross-margin initial and maintenance margin requirements for a given position value.
Futures contract symbol.
Hypothetical position value in quote currency.
Leverage to apply (optional).
Contract symbol.
Initial margin rate.
Maintenance margin rate.
Computed position size in lots.
Input position value.
Reference price used for calculation.
getCrossMarginRiskLimit(params)
Batch-fetches cross-margin risk limit data for a symbol across different margin and leverage combinations. Unlike isolated margin, cross-margin risk limits form a smooth curve rather than fixed tiers.
Futures contract symbol.
Total margin to evaluate against (optional).
Leverage to evaluate (optional).
Contract symbol.
Maximum open position size.
Maximum open position value.
Total margin used in the calculation.
Leverage used.
Maintenance margin rate.
Initial margin rate.
Settlement currency.