> For the complete documentation index, see [llms.txt](https://openapi-docs.nagaexchange.co.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openapi-docs.nagaexchange.co.id/rest-api-spot-trading/market-data.md).

# Market Data

## Public

{% hint style="info" %}
**Public** section can be accessed freely without requiring any API-key or signatures. See [Authentication](/authentication.md) for signing details.
{% endhint %}

***

## Test Connectivity

<mark style="color:blue;">`GET`</mark> `https://openapi.nagaexchange.co.id/sapi/v1/ping`

This endpoint checks connectivity to the host.

{% tabs %}
{% tab title="200 Successfully connected" %}

```
{}
```

{% endtab %}
{% endtabs %}

***

## Check Server Time

<mark style="color:blue;">`GET`</mark> `https://openapi.nagaexchange.co.id/sapi/v1/time`

This endpoint checks connectivity to the server and retrieves the server timestamp.

{% tabs %}
{% tab title="200  Successfully obtained server time" %}

```java
{
    "timezone": "Western Indonesia Time",
    "serverTime": 1595563624731
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response" %}

<table><thead><tr><th>Parameter</th><th width="113">Type</th><th>Example</th><th>Describe</th></tr></thead><tbody><tr><td>timezone</td><td>string</td><td>Western Indonesia Time</td><td>Server time zone</td></tr><tr><td>serverTime</td><td>long</td><td>1705039779880</td><td>Server timestamp</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## Symbol Pair List

<mark style="color:blue;">`GET`</mark> `https://openapi.nagaexchange.co.id/sapi/v1/symbols`

The supported symbol pair collection which in the exchange.

{% tabs %}
{% tab title="200 Successfully obtain symbol pair list" %}

```java
{
    "symbols": [
        {
            "quantityPrecision": 3,
            "limitVolumeMin":0.0001,
            "symbol": "sccadai",
            "pricePrecision": 6,
            "marketBuyMin":0.0001,
            "marketSellMin":0.0001,
            "baseAsset": "SCCA",
            "limitPriceMin":0.001,
            "quoteAsset": "DAI",
        },
        {
            "quantityPrecision": 8,
            "limitVolumeMin":0.0001,
            "symbol": "btcusdt",
            "pricePrecision": 2,
            "marketBuyMin":0.0001,
            "marketSellMin":0.0001,
            "baseAsset": "BTC",
            "limitPriceMin":0.001,
            "quoteAsset": "USDT"
        },
        {
            "quantityPrecision": 3,
            "limitVolumeMin":0.0001,
            "symbol": "bchusdt",
            "pricePrecision": 2,
            "marketBuyMin":0.0001,
            "marketSellMin":0.0001,
            "baseAsset": "BCH",
            "limitPriceMin":0.001,
            "quoteAsset": "USDT"
        },
        {
            "quantityPrecision": 2,
            "limitVolumeMin":0.0001,
            "symbol": "etcusdt",
            "pricePrecision": 2,
            "marketBuyMin":0.0001,
            "marketSellMin":0.0001,
            "baseAsset": "ETC",
            "limitPriceMin":0.001,
            "quoteAsset": "USDT"
        },
        {
            "quantityPrecision": 2,
            "limitVolumeMin":0.0001,
            "symbol": "ltcbtc",
            "pricePrecision": 6,
            "marketBuyMin":0.0001,
            "marketSellMin":0.0001,
            "baseAsset": "LTC",
            "limitPriceMin":0.001,
            "quoteAsset": "BTC"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response:" %}

<table><thead><tr><th>Parameter</th><th>Type</th><th width="135">Exmaple</th><th>Describe</th></tr></thead><tbody><tr><td>symbol</td><td>string</td><td>btcusdt</td><td>Lower case symbol name</td></tr><tr><td>baseAsset</td><td>string</td><td><code>BTC</code></td><td>Underlying asset for the symbol</td></tr><tr><td>quoteAsset</td><td>string</td><td><code>USDT</code></td><td>Quote asset for the symbol</td></tr><tr><td>pricePrecision</td><td>integer</td><td><code>2</code></td><td>Price accuracy</td></tr><tr><td>quantityPrecision</td><td>integer</td><td><code>6</code></td><td>Quantity accuracy</td></tr><tr><td>limitVolumeMin</td><td>BigDecimal</td><td>0.00001</td><td>Minimum quantity limit for limit order</td></tr><tr><td>marketBuyMin</td><td>BigDecimal</td><td>0.00001</td><td>Minimum purchase quantity for market order</td></tr><tr><td>marketSellMin</td><td>BigDecimal</td><td>0.00001</td><td>Minimum selling quantity for market orders</td></tr><tr><td>limitPriceMin</td><td>BigDecimal</td><td>0.00001</td><td>Minimum price limit for limit orders</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## Market

{% hint style="info" %}
**Market** section can be accessed freely without requiring any API-key or signatures. See [Authentication](/authentication.md) for signing details.
{% endhint %}

***

## Depth

<mark style="color:blue;">`GET`</mark> `https://openapi.nagaexchange.co.id/sapi/v1/depth`

Market depth data.

#### Query Parameters

| Name                                     | Type    | Description                       |
| ---------------------------------------- | ------- | --------------------------------- |
| limit<mark style="color:red;">\*</mark>  | integer | Default 100; Maximum 100          |
| symbol<mark style="color:red;">\*</mark> | string  | Uppercase symbol name E.g.BTCUSDT |

{% tabs %}
{% tab title="200  Successfully obtain market depth data" %}

```java
{
  "bids": [
    [
      "3.90000000",   // Price
      "431.00000000"  // Vol
    ],
    [
      "4.00000000",
      "431.00000000"
    ]
  ],
  "asks": [
    [
      "4.00000200",  // Price
      "12.00000000"  // Volume
    ],
    [
      "5.10000000",
      "28.00000000"
    ]
  ],
  "time": 1701658276000
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response:" %}

<table><thead><tr><th width="130">Parameter</th><th width="75">Type</th><th width="206">Example</th><th>Describe</th></tr></thead><tbody><tr><td>time</td><td>long</td><td><code>1595563624731</code></td><td>Current timestamp (ms)</td></tr><tr><td>bids</td><td>array</td><td>[[1.3200,2.04],[0.2,0.4]]</td><td>Order book buying information, the array length is 2, subscript one is the price, type is float; subscript two is the quantity corresponding to the current price, type is float</td></tr><tr><td>asks</td><td>array</td><td>[[1.3200,2.04],[0.2,0.4]]</td><td>Order book selling information, the array length is 2, subscript one is the price, type is float; subscript two is the quantity corresponding to the current price, type is float</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
The information corresponding to bids and asks represents all the prices in the order book and the quantity information corresponding to the prices, arranged from top to bottom from the best price.
{% endhint %}

***

## 24hrs ticker

<mark style="color:blue;">`GET`</mark> `https://openapi.nagaexchange.co.id/sapi/v1/ticker`

24-hour price change data.

#### Query Parameters

| Name                                     | Type   | Description                       |
| ---------------------------------------- | ------ | --------------------------------- |
| symbol<mark style="color:red;">\*</mark> | string | Uppercase symbol name E.g.BTCUSDT |

{% tabs %}
{% tab title="200  Successfully obtained ticker data" %}

```java
{
    "amount":"23.20",
    "high": "9279.03",
    "vol": "1302.00",
    "last": "9200.00",
    "low": "9279.03",
    "buy":130.00,
    "sell":0.00,
    "rose": "+0.05",
    "time": 1595563624731
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response:" %}

<table><thead><tr><th width="139">Parameter</th><th width="154">Type</th><th width="176">Example</th><th>Describe</th></tr></thead><tbody><tr><td>time</td><td>long</td><td><code>1595563624731</code></td><td>Timestamp (ms)</td></tr><tr><td>high</td><td>float</td><td><code>9900</code></td><td>Highest price</td></tr><tr><td>low</td><td>float</td><td><code>8800.34</code></td><td>Lowest price</td></tr><tr><td>last</td><td>float</td><td><code>8900</code></td><td>Latest deal price</td></tr><tr><td>vol</td><td>float</td><td><code>4999</code></td><td>Trade volume</td></tr><tr><td>amount</td><td>float</td><td>23.20</td><td>Trade amount</td></tr><tr><td>buy</td><td>float</td><td>130</td><td>The price in the buying book order at the first one</td></tr><tr><td>sell</td><td>float</td><td>120</td><td>The price in the selling book order at the first one</td></tr><tr><td>rose</td><td>string</td><td>+0.05</td><td>Range of increase and decrease, + is increase, - is decrease, +0.05 means increase by 5%</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## Recent Trades List

<mark style="color:blue;">`GET`</mark> `https://openapi.nagaexchange.co.id/sapi/v1/trades`

#### Query Parameters

| Name                                     | Type   | Description                       |
| ---------------------------------------- | ------ | --------------------------------- |
| symbol<mark style="color:red;">\*</mark> | string | Uppercase symbol name E.g.BTCUSDT |
| limit<mark style="color:red;">\*</mark>  | string | Default 100; Maximum 1000         |

{% tabs %}
{% tab title="200 " %}

```java
[
    {
        "side": "buy",
        "price": 130.0000000000000000,
        "qty": 0.1000000000000000,
        "time": 1704788645416
    },
    {
        "side": "buy",
        "price": 130.0000000000000000,
        "qty": 0.1000000000000000,
        "time": 1704788282332
    }
]
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response:" %}

<table><thead><tr><th width="150">Parameter</th><th width="115">Type</th><th width="181">Example</th><th>Describe</th></tr></thead><tbody><tr><td><code>price</code></td><td>float</td><td><code>0.055</code></td><td>Trade price</td></tr><tr><td><code>time</code></td><td>long</td><td><code>1537797044116</code></td><td>Timestamp(ms)</td></tr><tr><td><code>qty</code></td><td>float</td><td><code>5</code></td><td>The quantity traded</td></tr><tr><td><code>side</code></td><td>string</td><td><code>buy/sell</code></td><td>Taker side</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## Kline/candlestick data

<mark style="color:blue;">`GET`</mark> `https://openapi.nagaexchange.co.id/sapi/v1/klines`

#### Query Parameters

| Name                                       | Type    | Description                                                                                                   |
| ------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------- |
| symbol<mark style="color:red;">\*</mark>   | string  | Uppercase symbol name E.g.BTCUSDT                                                                             |
| interval<mark style="color:red;">\*</mark> | string  | Interval of the Kline. Possible values include: `1min`,`5min`,`15min`,`30min`,`60min`,`1day`,`1week`,`1month` |
| limit                                      | integer | Default 100; Maximum 300                                                                                      |

{% tabs %}
{% tab title="200 " %}

```java
[
    {
        "high": "6228.77",
        "vol": "111",
        "low": "6228.77",
        "idx": 1594640340,
        "close": "6228.77",
        "open": "6228.77"
    },
    {
        "high": "6228.77",
        "vol": "222",
        "low": "6228.77",
        "idx": 1587632160,
        "close": "6228.77",
        "open": "6228.77"
    },
    {
        "high": "6228.77",
        "vol": "333",
        "low": "6228.77",
        "idx": 1587632100,
        "close": "6228.77",
        "open": "6228.77"
    }
]
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Response:" %}

<table><thead><tr><th width="165">Parameter</th><th width="127">Type</th><th width="167">Example</th><th>Describe</th></tr></thead><tbody><tr><td><code>idx</code></td><td>long</td><td><code>1538728740000</code></td><td>Open time (timestamp,ms)</td></tr><tr><td><code>open</code></td><td>float</td><td><code>36.00</code></td><td>Open price</td></tr><tr><td><code>close</code></td><td>float</td><td><code>33.00</code></td><td>Close price</td></tr><tr><td><code>high</code></td><td>float</td><td><code>36.00</code></td><td>Highest price</td></tr><tr><td><code>low</code></td><td>float</td><td><code>30.00</code></td><td>Lowest price</td></tr><tr><td><code>vol</code></td><td>float</td><td><code>2456.11</code></td><td>Trade volume</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


---

# 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, and the optional `goal` query parameter:

```
GET https://openapi-docs.nagaexchange.co.id/rest-api-spot-trading/market-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
