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

# Account & Position Endpoints

## Position Endpoints

### Get Position List

**`GET`** `/api/v1/position/list` · Auth `USER_DATA` · Weight `2`

#### Request Parameters

| Name   | Type   | Required | Description                                      |
| ------ | ------ | -------- | ------------------------------------------------ |
| symbol | STRING | NO       | Contract symbol; if empty, returns all positions |

#### Response Example

```json
{
  "code": "0",
  "data": [
    {
      "symbol": "BTCUSDC",
      "openingTimestamp": 1759458359537,
      "currentQty": "0.001",
      "posCost": "120.0164",
      "markPrice": "120009.57",
      "markValue": "120.00957",
      "realisedPnl": "-0.07200984",
      "unrealisedPnl": "-0.00683",
      "avgEntryPrice": "120016.4",
      "liquidationPrice": "100475.86",
      "settleCurrency": "USDC",
      "maintainMargin": "0.4800656",
      "posInit": "20.0027333373",
      "posMargin": "20.0027333373",
      "mmr": "0.004",
      "deleveragePercentile": "0.06"
    }
  ]
}
```

#### Response Fields

| Name                 | Type    | Description                                          |
| -------------------- | ------- | ---------------------------------------------------- |
| symbol               | STRING  | Contract symbol                                      |
| openingTimestamp     | LONG    | Position open time (ms)                              |
| currentQty           | STRING  | Current position size (base units; negative = short) |
| posCost              | DECIMAL | Position cost                                        |
| markPrice            | DECIMAL | Mark price                                           |
| markValue            | DECIMAL | Mark value                                           |
| realisedPnl          | DECIMAL | Realized PnL                                         |
| unrealisedPnl        | DECIMAL | Unrealized PnL                                       |
| avgEntryPrice        | DECIMAL | Average entry price                                  |
| liquidationPrice     | DECIMAL | Liquidation price                                    |
| settleCurrency       | STRING  | Settlement currency                                  |
| maintainMargin       | DECIMAL | Maintenance margin                                   |
| posInit              | DECIMAL | Initial margin                                       |
| posMargin            | DECIMAL | Position margin                                      |
| mmr                  | DECIMAL | Maintenance margin ratio                             |
| deleveragePercentile | DECIMAL | Auto-deleveraging (ADL) percentile (0 to 1)          |

### Get Position History

**`GET`** `/api/v1/position/history` · Auth `USER_DATA` · Weight `2`

#### Request Parameters

| Name     | Type   | Required | Description                    |
| -------- | ------ | -------- | ------------------------------ |
| symbol   | STRING | NO       | Contract symbol                |
| from     | LONG   | NO       | Close-time range start (ms)    |
| to       | LONG   | NO       | Close-time range end (ms)      |
| pageNum  | INT    | NO       | Current page; default 1        |
| pageSize | INT    | NO       | Page size; default 10, max 200 |

#### Response Example

```json
{
  "code": "0",
  "data": {
    "currentPage": 1,
    "pageSize": 10,
    "totalNum": 1,
    "totalPage": 1,
    "items": [
      {
        "closeId": "close_500000000001478576",
        "symbol": "BTCUSDC",
        "settleCurrency": "USDC",
        "leverage": 6,
        "type": "close",
        "pnl": -0.07200984,
        "realisedGrossCost": 120.0164,
        "tradeFee": 0.07200984,
        "openTime": 1759458359537,
        "closeTime": 1759458415086,
        "openPrice": 120016.4,
        "closePrice": 120009.57,
        "roe": -0.0017,
        "liquidPrice": 0,
        "side": "buy"
      }
    ]
  }
}
```

#### Response Fields

Paginated response with `currentPage` / `pageSize` / `totalNum` / `totalPage` / `items[]`. Each entry in `items[]`:

| Name              | Type    | Description                   |
| ----------------- | ------- | ----------------------------- |
| closeId           | STRING  | Close ID                      |
| symbol            | STRING  | Contract symbol               |
| settleCurrency    | STRING  | Settlement currency           |
| leverage          | DECIMAL | Leverage                      |
| type              | STRING  | Close type                    |
| pnl               | DECIMAL | Net PnL                       |
| realisedGrossCost | DECIMAL | Realized gross cost           |
| tradeFee          | DECIMAL | Trading fee                   |
| fundingFee        | DECIMAL | Funding fee                   |
| openTime          | LONG    | Open time (ms)                |
| closeTime         | LONG    | Close time (ms)               |
| openPrice         | DECIMAL | Open price                    |
| closePrice        | DECIMAL | Close price                   |
| roe               | DECIMAL | Return on equity              |
| liquidPrice       | DECIMAL | Liquidation price             |
| side              | STRING  | Position side: `buy` / `sell` |

## Account Endpoints

### Get Account Asset List

Returns the futures-account asset overview for every currency held by the current user.**`GET`** `/api/v1/account/assets` · Auth `USER_DATA` · Weight `6`

#### Request Parameters

None.

#### Response Example

```json
{
  "code": "0",
  "data": [
    {
      "currency": "USDC",
      "walletBalance": "198.733127406",
      "availableBalance": "198.733127406",
      "holdBalance": "0",
      "crossOrderMargin": "0",
      "crossPosMargin": "0",
      "crossUnPnl": "0",
      "riskRate": "0",
      "version": 1001,
      "equity": "198.733127406",
      "totalCrossMargin": "198.733127406",
      "maxWithdrawAmount": "198.733127406",
      "maintainMargin": "0",
      "leverage": "10"
    }
  ]
}
```

#### Response Fields

Returns an array; each item:

| Name              | Type   | Description                           |
| ----------------- | ------ | ------------------------------------- |
| currency          | STRING | Currency                              |
| walletBalance     | STRING | Wallet balance                        |
| availableBalance  | STRING | Available balance                     |
| holdBalance       | STRING | Held (frozen) balance                 |
| crossOrderMargin  | STRING | Cross-margin reserved for open orders |
| crossPosMargin    | STRING | Cross-margin attributed to positions  |
| crossUnPnl        | STRING | Cross-margin unrealized PnL           |
| riskRate          | STRING | Risk ratio                            |
| version           | LONG   | Version number                        |
| equity            | STRING | Account equity                        |
| totalCrossMargin  | STRING | Total cross-margin balance            |
| maxWithdrawAmount | STRING | Maximum withdrawable amount           |
| maintainMargin    | STRING | Maintenance margin                    |
| leverage          | STRING | Account leverage                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kryptox.finance/api/account-and-position-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
