> 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/marketdata-endpoints.md).

# Marketdata Endpoints

### Get Server Timestamp

**`GET`** `/api/v1/timestamp` · Auth `NONE` · Weight `2`

#### Request Parameters

None.

#### Response Example

```json
{
  "code": "0",
  "data": 1742457600000
}
```

#### Response Fields

| Name | Type | Description                   |
| ---- | ---- | ----------------------------- |
| data | LONG | Current server timestamp (ms) |

### Get Instruments Info

**`GET`** `/api/v1/market/instruments-info` · Auth `NONE` · Weight `3`Pass `symbol` to query a specific contract, or omit it to return all active contracts. `data` is always an array regardless of whether `symbol` is provided; when `symbol` is passed the array contains only that contract.

#### Request Parameters

| Name   | Type   | Required | Description                                          |
| ------ | ------ | -------- | ---------------------------------------------------- |
| symbol | STRING | NO       | Contract symbol; omit to return all active contracts |

#### Response Example

```json
{
  "code": "0",
  "data": [
    {
      "symbol": "BTCUSDC",
      "type": "FFWCSX",
      "firstOpenDate": 1718762400000,
      "settleDate": null,
      "baseCurrency": "BTC",
      "quoteCurrency": "USDC",
      "settleCurrency": "USDC",
      "maxOrderQty": 1000,
      "maxPrice": 1000000.0000000000,
      "tickSize": 0.1,
      "sizeStep": 0.001,
      "indexSymbol": ".KBTCUSDC",
      "status": "Open",
      "maxLeverage": 100.0000000000,
      "orderPriceRange": 0.0500000000,
      "k": 162.0000000000,
      "m": 100.0000000000,
      "f": 1.3,
      "mmrLimit": 0.3
    },
    {
      "symbol": "XAUUSDC",
      "type": "FFWCSX",
      "firstOpenDate": 1771753479000,
      "settleDate": null,
      "baseCurrency": "XAU",
      "quoteCurrency": "USDC",
      "settleCurrency": "USDC",
      "maxOrderQty": 1000,
      "maxPrice": 1000000.0000000000,
      "tickSize": 0.01,
      "sizeStep": 0.001,
      "indexSymbol": ".KXAUUSDC",
      "status": "Open",
      "maxLeverage": 100.0000000000,
      "orderPriceRange": 0.1000000000,
      "k": 61.0000000000,
      "m": 40.0000000000,
      "f": 1.3,
      "mmrLimit": 0.3
    }
  ]
}
```

#### Response Fields

| Name            | Type    | Description                                                                                  |
| --------------- | ------- | -------------------------------------------------------------------------------------------- |
| symbol          | STRING  | Contract symbol (trading pair)                                                               |
| type            | STRING  | Contract type (e.g. `PERPETUAL`)                                                             |
| firstOpenDate   | LONG    | First listing time (ms)                                                                      |
| settleDate      | LONG    | Settlement date (ms); `null` for perpetual contracts                                         |
| baseCurrency    | STRING  | Base currency                                                                                |
| quoteCurrency   | STRING  | Quote currency                                                                               |
| settleCurrency  | STRING  | Settlement currency                                                                          |
| maxOrderQty     | DECIMAL | Maximum order quantity for limit orders                                                      |
| maxPrice        | DECIMAL | Maximum order price                                                                          |
| tickSize        | DECIMAL | Minimum price increment                                                                      |
| sizeStep        | DECIMAL | Minimum order size increment                                                                 |
| status          | STRING  | Contract status: `Init`, `Open`, `BeingSettled`, `Settled`, `Paused`, `Closed`, `CancelOnly` |
| maxLeverage     | DECIMAL | Maximum leverage                                                                             |
| orderPriceRange | DECIMAL | Allowed price deviation from mark price (ratio)                                              |
| k               | DECIMAL | Risk constant `k`                                                                            |
| m               | DECIMAL | Risk constant `m`                                                                            |
| f               | DECIMAL | Risk constant `f`                                                                            |
| mmrLimit        | DECIMAL | Upper bound of the maintenance margin ratio                                                  |

### Order Book Depth

**`GET`** `/api/v1/market/order-book/depth-{limit}` · Auth `NONE` · Weight `5 when limit=20; 10 when limit=100`

#### Path Parameters

| Name  | Type | Required | Description                                                   |
| ----- | ---- | -------- | ------------------------------------------------------------- |
| limit | INT  | YES      | Number of price levels per side. Allowed values: `20`, `100`. |

#### Request Parameters

| Name   | Type   | Required | Description     |
| ------ | ------ | -------- | --------------- |
| symbol | STRING | YES      | Contract symbol |

#### Response Example

```json
{
  "code": "0",
  "data": {
    "sequence": 1697895963339,
    "symbol": "BTCUSDC",
    "bids": [
      [
        "66968",
        "2"
      ],
      [
        "66964.8",
        "25596"
      ]
    ],
    "asks": [
      [
        "66968.1",
        "13501"
      ],
      [
        "66968.7",
        "2032"
      ]
    ],
    "ts": 1729168101216000000
  }
}
```

#### Response Fields

| Name     | Type                    | Description                                            |
| -------- | ----------------------- | ------------------------------------------------------ |
| sequence | LONG                    | Message sequence number                                |
| symbol   | STRING                  | Contract symbol                                        |
| bids     | `LIST<[STRING,STRING]>` | Bid levels, each `[price, size]` (descending by price) |
| asks     | `LIST<[STRING,STRING]>` | Ask levels, each `[price, size]` (ascending by price)  |
| ts       | LONG                    | Snapshot timestamp (nanoseconds)                       |

The full snapshot returned here is typically used as the initial baseline for a local order book, combined with the incremental updates from `Order Book - Level 2 Incremental`. See Maintaining a Local Order Book for the full procedure.

### Recent Trades

**`GET`** `/api/v1/market/trades` · Auth `NONE` · Weight `5`

#### Request Parameters

| Name   | Type   | Required | Description     |
| ------ | ------ | -------- | --------------- |
| symbol | STRING | YES      | Contract symbol |

* Returns the most recent 100 trades only.

#### Response Example

```json
{
  "code": "0",
  "data": [
    {
      "sequence": 1697915257909,
      "symbol": "BTCUSDC",
      "tradeId": "1697915257909",
      "makerOrderId": "236679665752801280",
      "takerOrderId": "236679667975745536",
      "ts": 1729242032152000000,
      "size": "0.001",
      "price": "67878",
      "side": "sell"
    },
    {
      "sequence": 1697915257749,
      "symbol": "BTCUSDC",
      "tradeId": "1697915257749",
      "makerOrderId": "236679660971245570",
      "takerOrderId": "236679665400492032",
      "ts": 1729242031535000000,
      "size": "0.001",
      "price": "67867.8",
      "side": "sell"
    }
  ]
}
```

#### Response Fields

| Name         | Type   | Description                         |
| ------------ | ------ | ----------------------------------- |
| sequence     | LONG   | Message sequence number             |
| symbol       | STRING | Contract symbol                     |
| tradeId      | STRING | Trade ID                            |
| makerOrderId | STRING | Maker order ID                      |
| takerOrderId | STRING | Taker order ID                      |
| ts           | LONG   | Trade time (nanoseconds)            |
| size         | STRING | Trade size (in base contract units) |
| price        | STRING | Trade price                         |
| side         | STRING | Taker side: `buy` / `sell`          |

### Klines / Candles

**`GET`** `/api/v1/market/candles` · Auth `NONE` · Weight `3`Each entry is returned as an array: `[timestamp, open, high, low, close, volume, turnover]`.

#### Request Parameters

| Name        | Type   | Required | Description            |
| ----------- | ------ | -------- | ---------------------- |
| symbol      | STRING | YES      | Contract symbol        |
| granularity | ENUM   | YES      | Granularity in minutes |
| from        | LONG   | YES      | Start time (ms)        |
| to          | LONG   | YES      | End time (ms)          |

#### Response Example

```json
{
  "code": "0",
  "data": [
    [
      1757659080000,
      115328.4,
      115328.4,
      115284.2,
      115284.2,
      602,
      69424.9528
    ],
    [
      1757659140000,
      115273.0,
      115273.1,
      115273.0,
      115273.0,
      114,
      13141.1236
    ]
  ]
}
```

#### Response Fields

| Index | Field     | Type    | Description                          |
| ----- | --------- | ------- | ------------------------------------ |
| 0     | timestamp | LONG    | Candle open time (ms)                |
| 1     | open      | DECIMAL | Open price                           |
| 2     | high      | DECIMAL | High price                           |
| 3     | low       | DECIMAL | Low price                            |
| 4     | close     | DECIMAL | Close price                          |
| 5     | volume    | STRING  | Traded size (in base contract units) |
| 6     | turnover  | DECIMAL | Turnover (in quote currency)         |

### Latest index and markprice

**`GET`** `/api/v1/market/mark-price` · Auth `NONE` · Weight `3`

#### Request Parameters

| Name   | Type   | Required | Description     |
| ------ | ------ | -------- | --------------- |
| symbol | STRING | YES      | Contract symbol |

#### Response Example

```json
{
  "code": "0",
  "data": {
    "symbol": "BTCUSDC",
    "granularity": 1000,
    "timestamp": 1729254307000,
    "markPrice": 67687.08,
    "indexPrice": 67683.58
  }
}
```

#### Response Fields

| Name        | Type    | Description      |
| ----------- | ------- | ---------------- |
| symbol      | STRING  | Contract symbol  |
| granularity | LONG    | Granularity (ms) |
| timestamp   | LONG    | Time point (ms)  |
| markPrice   | DECIMAL | Mark price       |
| indexPrice  | DECIMAL | Index price      |

### Latest Funding Rate

**`GET`** `/api/v1/market/funding-rate` · Auth `NONE` · Weight `2`

#### Request Parameters

| Name   | Type   | Required | Description     |
| ------ | ------ | -------- | --------------- |
| symbol | STRING | YES      | Contract symbol |

#### Response Example

```json
{
  "code": "0",
  "data": {
    "symbol": "BTCUSDC",
    "granularity": 28800000,
    "timestamp": 1729254307000,
    "value": 0.0001,
    "dailyInterestRate": 0.0003,
    "upperLimit": 0.003,
    "lowerLimit": -0.003,
    "nextSettleTimestamp": 1729281600000
  }
}
```

#### Response Fields

| Name                | Type    | Description                                           |
| ------------------- | ------- | ----------------------------------------------------- |
| symbol              | STRING  | symbol                                                |
| granularity         | LONG    | Granularity (ms)                                      |
| timestamp           | LONG    | Time point (ms), update the funding vaule per minute. |
| value               | DECIMAL | Funding-rate value                                    |
| dailyInterestRate   | DECIMAL | Daily interest rate                                   |
| upperLimit          | DECIMAL | Upper bound of the funding rate                       |
| lowerLimit          | DECIMAL | Lower bound of the funding rate                       |
| nextSettleTimestamp | LONG    | Next funding settlement timestamp (ms)                |

### Latest Ticker Price

**`GET`** `/api/v1/market/ticker` · Auth `NONE` · Weight `2`

#### Request Parameters

| Name   | Type   | Required | Description     |
| ------ | ------ | -------- | --------------- |
| symbol | STRING | YES      | Contract symbol |

#### Response Example

```json
{
  "code": "0",
  "data": {
    "sequence": 1697895100310,
    "symbol": "BTCUSDC",
    "side": "sell",
    "size": "0.001",
    "tradeId": "1697901180000",
    "price": "67158.4",
    "bestBidPrice": "67169.6",
    "bestBidSize": "0.123",
    "bestAskPrice": "67169.7",
    "bestAskSize": "0.045",
    "ts": 1729163001780000000
  }
}
```

#### Response Fields

| Name         | Type   | Description                                  |
| ------------ | ------ | -------------------------------------------- |
| sequence     | LONG   | Message sequence number                      |
| symbol       | STRING | Contract symbol                              |
| side         | STRING | Taker side of the last trade: `buy` / `sell` |
| size         | STRING | Size of the last trade (base units)          |
| tradeId      | STRING | Last trade ID                                |
| price        | STRING | Last trade price                             |
| bestBidPrice | STRING | Best bid price                               |
| bestBidSize  | STRING | Best bid size (base units)                   |
| bestAskPrice | STRING | Best ask price                               |
| bestAskSize  | STRING | Best ask size (base units)                   |
| ts           | LONG   | Timestamp (nanoseconds)                      |

### All Contracts Latest Ticker

**`GET`** `/api/v1/market/tickers` · Auth `NONE` · Weight `5`

#### Request Parameters

None.

#### Response Example

```json
{
  "code": "0",
  "data": [
    {
      "sequence": 1697895100310,
      "symbol": "BTCUSDC",
      "side": "sell",
      "size": "0.001",
      "tradeId": "1697901180000",
      "price": "67158.4",
      "bestBidPrice": "67169.6",
      "bestBidSize": "0.123",
      "bestAskPrice": "67169.7",
      "bestAskSize": "0.045",
      "ts": 1729163001780000000
    },
    {
      "sequence": 1697895200420,
      "symbol": "XAUUSDC",
      "side": "buy",
      "size": "0.5",
      "tradeId": "1697901280000",
      "price": "3280.5",
      "bestBidPrice": "3280.4",
      "bestBidSize": "2.0",
      "bestAskPrice": "3280.6",
      "bestAskSize": "1.5",
      "ts": 1729163101780000000
    }
  ]
}
```

#### Response Fields

Returns an array; each item uses the same fields as Latest Ticker Price.


---

# 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/marketdata-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.
