Margin & Leverage
Futures trading on CoinSwitch is USDT-margined — you deposit USDT into your futures wallet, and that's the collateral for all positions.
Setting leverage
Leverage is set per symbol. For example, you can have 10× leverage on BTCUSDT while running 25× on DOGEUSDT.
Use Update Leverage to change leverage. Use Get Leverage to read the current setting.
body = {"symbol": "btcusdt", "exchange": "EXCHANGE_2", "leverage": 10}
headers, path = sign_request("POST", "/trade/api/v2/futures/leverage")
response = requests.post(BASE_URL + path, headers=headers, json=body)
When you can't change leverage
You cannot change leverage on a symbol while you have:
- An open position on that symbol, or
- Any open orders on that symbol.
Cancel open orders and close positions first.
Maximum leverage per symbol
Each symbol has its own min/max leverage. Read it from Get Instrument Info — the min_leverage / max_leverage fields.
{
"BTCUSDT": {
"min_leverage": "1",
"max_leverage": "25",
"leverage_step": 1
}
}
Margin
Each open position has three margin numbers, all reported in USDT:
| Field | Meaning |
|---|---|
position_margin | How much margin you currently have allocated to this position. |
maint_margin | The minimum margin required to avoid liquidation. If position_margin falls below this, the exchange forces a close. |
liquidation_price | The mark price at which position_margin would equal maint_margin. Keep mark price away from this. |
Adding margin
Add Margin tops up position_margin for an open position, pushing liquidation_price further from the mark price. Useful when a position moves against you and you want to ride it out without closing.
body = {"exchange": "EXCHANGE_2", "symbol": "dogeusdt", "margin": 16}
The margin value is in USDT and must be ≤ your available wallet balance.
Wallet balance
Use Get Wallet Balance to see total available USDT, total balance, and per-symbol breakdowns of margin currently locked in positions or open orders. The available balance is what you can use to place new orders or add margin.
Funding
Perpetual futures have a periodic funding rate payment between long and short holders, settled at the next funding timestamp. The amount you pay or receive is recorded as a FUNDING_FEE row in Get Transactions. Funding does not affect position size or entry price; only your USDT balance.
The current funding rate and next settlement timestamp are on Get Ticker (funding_rate and next_funding_timestamp fields).