> For the complete documentation index, see [llms.txt](https://www.pionex.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pionex.com/docs/api-docs/futures-api/account.md).

# Account

Futures account management (private)

## Get account balances

> Query futures account asset balances. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"AccountBalance":{"type":"object","properties":{"coin":{"type":"string","description":"Currency"},"free":{"type":"string","description":"Available balance (8 decimal places)"},"frozen":{"type":"string","description":"Frozen balance (8 decimal places)"},"debts":{"type":"string","description":"Debt amount"}}},"IsolatedBalance":{"type":"object","properties":{"symbol":{"type":"string","description":"Futures symbol"},"isolatedMode":{"type":"string","description":"Isolated margin type","enum":["ISOLATED_BOTH","ISOLATED_LONG","ISOLATED_SHORT"]},"balances":{"type":"array","description":"Isolated margin balances","items":{"type":"object","properties":{"coin":{"type":"string","description":"Currency"},"free":{"type":"string","description":"Available balance"},"frozen":{"type":"string","description":"Frozen balance"},"debts":{"type":"string","description":"Debt amount"}}}}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/account/balances":{"get":{"tags":["Account"],"summary":"Get account balances","description":"Query futures account asset balances. Weight: 5.","operationId":"getAccountBalances","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"balances":{"type":"array","description":"Cross margin balance list","items":{"$ref":"#/components/schemas/AccountBalance"}},"isolates":{"type":"array","description":"Isolated margin asset list","items":{"$ref":"#/components/schemas/IsolatedBalance"}}}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Get current positions

> Query current active positions. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"Position":{"type":"object","properties":{"positionId":{"type":"string","description":"Position ID"},"symbol":{"type":"string","description":"Futures symbol (displaySymbol)"},"isolatedMode":{"type":"string","description":"Margin mode","enum":["CROSS","ISOLATED_BOTH","ISOLATED_LONG","ISOLATED_SHORT"]},"riskState":{"type":"string","description":"Risk state for isolated positions"},"positionSide":{"type":"string","description":"Position direction","enum":["LONG","SHORT"]},"netSize":{"type":"string","description":"Net position size = sizeLong + sizeShort"},"avgPrice":{"type":"string","description":"Average entry price = abs((amountLong + amountShort + amountSettled) / (sizeLong + sizeShort))"},"unrealizedPnL":{"type":"string","description":"Unrealized PnL = (markPrice - avgPrice) * netSize"},"sizeLong":{"type":"string","description":"Cumulative long size (positive)"},"sizeShort":{"type":"string","description":"Cumulative short size (negative)"},"amountLong":{"type":"string","description":"Cumulative long cost (negative)"},"amountShort":{"type":"string","description":"Cumulative short proceeds (positive)"},"amountSettled":{"type":"string","description":"Cumulative settled amount"},"markPrice":{"type":"string","description":"Mark price"},"initialMargin":{"type":"string","description":"Initial margin requirement"},"maintMargin":{"type":"string","description":"Maintenance margin requirement"},"liquidationPrice":{"type":"string","description":"Estimated liquidation price"},"leverage":{"type":"string","description":"Leverage multiplier"},"sizeLiquidated":{"type":"string","description":"Cumulative liquidated size (negative for long, positive for short)"},"amountLiquidated":{"type":"string","description":"Cumulative liquidated amount (positive for long, negative for short)"},"createTime":{"type":"integer","format":"int64","description":"Creation time in milliseconds"},"updateTime":{"type":"integer","format":"int64","description":"Last update time in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/account/positions":{"get":{"tags":["Account"],"summary":"Get current positions","description":"Query current active positions. Weight: 5.","operationId":"getPositions","parameters":[{"$ref":"#/components/parameters/Timestamp"},{"name":"symbol","in":"query","description":"Futures symbol. Returns all positions if not specified.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/Position"}}}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Get history positions

> Query historical closed or taken-over positions. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"HistoryPosition":{"type":"object","properties":{"positionId":{"type":"string","description":"Position ID"},"symbol":{"type":"string","description":"Futures symbol"},"isolatedMode":{"type":"string","description":"Margin mode","enum":["CROSS","ISOLATED_BOTH","ISOLATED_LONG","ISOLATED_SHORT"]},"positionSide":{"type":"string","description":"Position direction","enum":["LONG","SHORT"]},"sizeLong":{"type":"string","description":"Cumulative long size"},"sizeShort":{"type":"string","description":"Cumulative short size"},"amountLong":{"type":"string","description":"Cumulative long cost"},"amountShort":{"type":"string","description":"Cumulative short proceeds"},"amountSettled":{"type":"string","description":"Cumulative settled amount"},"leverage":{"type":"string","description":"Leverage multiplier"},"sizeLiquidated":{"type":"string","description":"Cumulative liquidated size (negative for long, positive for short)"},"amountLiquidated":{"type":"string","description":"Cumulative liquidated amount (positive for long, negative for short)"},"sizeTakeover":{"type":"string","description":"Taken-over size"},"createTime":{"type":"integer","format":"int64","description":"Creation time in milliseconds"},"updateTime":{"type":"integer","format":"int64","description":"Last update time in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/account/historyPositions":{"get":{"tags":["Account"],"summary":"Get history positions","description":"Query historical closed or taken-over positions. Weight: 5.","operationId":"getHistoryPositions","parameters":[{"$ref":"#/components/parameters/Timestamp"},{"name":"symbol","in":"query","description":"Futures symbol","schema":{"type":"string"}},{"name":"positionFlag","in":"query","description":"Position flag filter","schema":{"type":"string","enum":["CLOSED","TAKEOVER"]}},{"name":"startTime","in":"query","description":"Start time filter based on updateTime (milliseconds)","schema":{"type":"integer","format":"int64"}},{"name":"endTime","in":"query","description":"End time filter based on updateTime (milliseconds)","schema":{"type":"integer","format":"int64"}},{"name":"limit","in":"query","description":"Number of results to return","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"positions":{"type":"array","description":"Positions sorted by close time in descending order","items":{"$ref":"#/components/schemas/HistoryPosition"}}}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Get account detail

> Query account detail including balances, positions, and risk info. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"AccountDetail":{"type":"object","properties":{"quoteRisks":{"type":"array","description":"Risk data partitioned by quote currency","items":{"type":"object","properties":{"quote":{"type":"string","description":"Quote currency"},"riskState":{"type":"string","description":"Risk state of the partition"}}}},"balances":{"type":"array","description":"Cross margin balance list (excluding zero balances)","items":{"$ref":"#/components/schemas/AccountDetailBalance"}},"positions":{"type":"array","description":"Position list","items":{"$ref":"#/components/schemas/AccountDetailPosition"}}}},"AccountDetailBalance":{"type":"object","properties":{"coin":{"type":"string","description":"Currency"},"assets":{"type":"string","description":"Total assets = free + frozen"},"free":{"type":"string","description":"Available balance"},"frozen":{"type":"string","description":"Frozen balance"},"transferable":{"type":"string","description":"Funds available for spot trading"},"available":{"type":"string","description":"Available margin"},"unrealizedPnL":{"type":"string","description":"Total unrealized PnL"},"totalInitialMargin":{"type":"string","description":"Total initial margin"},"debts":{"type":"string","description":"Total debt"}}},"AccountDetailPosition":{"type":"object","properties":{"symbol":{"type":"string","description":"Futures symbol"},"positionId":{"type":"string","description":"Position unique identifier"},"isolatedMode":{"type":"string","description":"Margin mode","enum":["CROSS","ISOLATED_BOTH","ISOLATED_LONG","ISOLATED_SHORT"]},"positionSide":{"type":"string","description":"Position direction","enum":["LONG","SHORT"]},"netSize":{"type":"string","description":"Net position size = sizeLong + sizeShort + sizeLiquidated"},"avgPrice":{"type":"string","description":"Average entry price"},"unrealizedPnL":{"type":"string","description":"Unrealized PnL = (markPrice - avgPrice) * netSize"},"sizeLong":{"type":"string","description":"Cumulative long size (positive)"},"sizeShort":{"type":"string","description":"Cumulative short size (negative)"},"amountLong":{"type":"string","description":"Cumulative long cost (negative)"},"amountShort":{"type":"string","description":"Cumulative short proceeds (positive)"},"amountSettled":{"type":"string","description":"Cumulative settled amount"},"markPrice":{"type":"string","description":"Mark price"},"initialMargin":{"type":"string","description":"Initial margin (for hedge mode, this covers both long, short, and pending order margin)"},"maintMargin":{"type":"string","description":"Maintenance margin"},"liquidationPrice":{"type":"string","description":"Estimated liquidation price"},"leverage":{"type":"string","description":"Leverage multiplier"},"sizeLiquidated":{"type":"string","description":"Cumulative liquidated size (negative for long, positive for short)"},"amountLiquidated":{"type":"string","description":"Cumulative liquidated amount (positive for long, negative for short)"},"createdTime":{"type":"integer","format":"int64","description":"Creation time in milliseconds"},"updatedTime":{"type":"integer","format":"int64","description":"Last update time in milliseconds"},"riskState":{"type":"string","description":"Risk state for isolated positions"},"balances":{"type":"array","description":"Isolated margin balances","items":{"type":"object","properties":{"totalInitialMargin":{"type":"string","description":"Isolated initial margin"},"transferable":{"type":"string","description":"Funds available for trading or transfer"},"coin":{"type":"string","description":"Currency"},"free":{"type":"string","description":"Available balance"},"frozen":{"type":"string","description":"Frozen balance"},"debts":{"type":"string","description":"Debt amount"}}}}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/account/detail":{"get":{"tags":["Account"],"summary":"Get account detail","description":"Query account detail including balances, positions, and risk info. Weight: 5.","operationId":"getAccountDetail","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountDetail"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Transfer isolated margin

> Transfer funds in or out of isolated margin for a specific symbol. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/trade/isolateMargin":{"post":{"tags":["Account"],"summary":"Transfer isolated margin","description":"Transfer funds in or out of isolated margin for a specific symbol. Weight: 5.","operationId":"transferIsolateMargin","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["clientId","symbol","direction","isolatedMode","coin","amount"],"properties":{"clientId":{"type":"string","description":"Unique client ID per request, used for deduplication. Valid for 8 hours."},"symbol":{"type":"string","description":"Futures symbol"},"direction":{"type":"string","description":"Transfer direction","enum":["IN","OUT"]},"isolatedMode":{"type":"string","description":"Isolated margin mode","enum":["ISOLATED_BOTH","ISOLATED_LONG","ISOLATED_SHORT"]},"coin":{"type":"string","description":"Currency to transfer (USDT or BTC)","enum":["USDT","BTC"]},"amount":{"type":"string","description":"Transfer amount"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Get current leverage

> Query current leverage for a specific symbol. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/account/leverage":{"get":{"tags":["Account"],"summary":"Get current leverage","description":"Query current leverage for a specific symbol. Weight: 5.","operationId":"getLeverage","parameters":[{"$ref":"#/components/parameters/Timestamp"},{"name":"symbol","in":"query","required":true,"description":"Futures symbol","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string","description":"Futures symbol"},"leverage":{"type":"string","description":"Current leverage multiplier"}}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Update leverage

> Modify leverage for a specific symbol. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/account/leverage":{"post":{"tags":["Account"],"summary":"Update leverage","description":"Modify leverage for a specific symbol. Weight: 5.","operationId":"updateLeverage","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["symbol","leverage"],"properties":{"symbol":{"type":"string","description":"Futures symbol"},"leverage":{"type":"string","description":"Leverage multiplier"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string","description":"Futures symbol"},"leverage":{"type":"string","description":"Updated leverage multiplier"}}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Get position mode

> Query current position mode. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/account/positionMode":{"get":{"tags":["Account"],"summary":"Get position mode","description":"Query current position mode. Weight: 5.","operationId":"getPositionMode","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"positionMode":{"type":"string","description":"Position mode","enum":["BUYSELL","OPENCLOSE"]}}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Update position mode

> Modify position mode. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/account/positionMode":{"post":{"tags":["Account"],"summary":"Update position mode","description":"Modify position mode. Weight: 5.","operationId":"updatePositionMode","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["positionMode"],"properties":{"positionMode":{"type":"string","description":"Position mode: BUYSELL (one-way) or OPENCLOSE (hedge)","enum":["BUYSELL","OPENCLOSE"]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Get margin mode

> Query isolated/cross margin mode for a specific symbol. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/trade/isolatedMode":{"get":{"tags":["Account"],"summary":"Get margin mode","description":"Query isolated/cross margin mode for a specific symbol. Weight: 5.","operationId":"getIsolatedMode","parameters":[{"$ref":"#/components/parameters/Timestamp"},{"name":"symbol","in":"query","required":true,"description":"Futures symbol","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string","description":"Futures symbol"},"isolatedMode":{"type":"string","description":"Margin mode","enum":["CROSS","ISOLATED"]}}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Update margin mode

> Switch between isolated and cross margin mode for a specific symbol. Weight: 5.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Futures Open API","version":"1.0.0"},"tags":[{"name":"Account","description":"Futures account management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/uapi/v1/trade/isolatedMode":{"post":{"tags":["Account"],"summary":"Update margin mode","description":"Switch between isolated and cross margin mode for a specific symbol. Weight: 5.","operationId":"updateIsolatedMode","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["symbol","isolatedMode"],"properties":{"symbol":{"type":"string","description":"Futures symbol"},"isolatedMode":{"type":"string","description":"Margin mode: CROSS (default) or ISOLATED","enum":["CROSS","ISOLATED"]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```
