> 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-futures-trading/trading.md).

# Trading

**Trade** endpoints on this page require a valid API key and signature. See [Authentication](/authentication.md) for signing details.

{% hint style="warning" %}
⚠️ NEEDS VERIFICATION AGAINST SOURCE — several example responses below (Change position mode, Change margin mode, Change leverage, Cancel trigger order) show the API returning a Chinese-language `msg` value (`"成功"` = "success") regardless of the documentation's language. This may reflect genuine current backend behavior (the API might not localize response messages) rather than a documentation error. It is left untranslated intentionally — do not assume the live API returns English messages.
{% endhint %}

***

## Create new order

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/order`

Create a new single order.

#### Headers

| Name                                          | Type   | Description  |
| --------------------------------------------- | ------ | ------------ |
| X-CH-TS<mark style="color:red;">\*</mark>     | string | Timestamp    |
| X-CH-APIKEY<mark style="color:red;">\*</mark> | string | User API-KEY |
| X-CH-SIGN<mark style="color:red;">\*</mark>   | string | Sign         |

#### Request Body

| Name                                           | Type   | Description                                                                                                                                                                |
| ---------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| volume<mark style="color:red;">\*</mark>       | number | Order quantity. Precision-limited; the limit is set by the administrator. <mark style="color:red;">When opening a position at market price, the unit here is value.</mark> |
| price                                          | number | Order price — required for LIMIT orders. Precision-limited; the limit is set by the administrator.                                                                         |
| contractName<mark style="color:red;">\*</mark> | string | Uppercase contract name, e.g. `E-BTC-USDT`                                                                                                                                 |
| type<mark style="color:red;">\*</mark>         | string | Order type: `LIMIT/MARKET`                                                                                                                                                 |
| side<mark style="color:red;">\*</mark>         | string | Order side: `BUY/SELL`                                                                                                                                                     |
| open<mark style="color:red;">\*</mark>         | string | Position side: `OPEN/CLOSE`                                                                                                                                                |
| positionType                                   | number | Position type: `1` (Cross Margin) / `2` (Isolated Margin)                                                                                                                  |
| clientOrderId                                  | string | Client order ID, a string less than 32 characters in length                                                                                                                |
| timeInForce                                    | string | `IOC`, `FOK`, `POST_ONLY`                                                                                                                                                  |

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

```java
{
    "orderId": 256609229205684228
}
```

{% endtab %}
{% endtabs %}

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

<table><thead><tr><th>Parameter</th><th width="117">Type</th><th width="221">Example</th><th>Describe</th></tr></thead><tbody><tr><td>orderId</td><td>string</td><td><code>256609229205684228</code></td><td>Order ID</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## Create condition order

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/conditionOrder/`

#### Headers

| Name                                          | Type   | Description |
| --------------------------------------------- | ------ | ----------- |
| X-CH-TS<mark style="color:red;">\*</mark>     | string | Timestamp   |
| X-CH-APIKEY<mark style="color:red;">\*</mark> | string | API-KEY     |
| X-CH-SIGN<mark style="color:red;">\*</mark>   | string | Sign        |

#### Request Body

| Name          | Type   | Description                                                                                                                                |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| triggerType   | string | Type of condition: `1` (stop loss) / `2` (take profit) / `3` (buy on rise) / `4` (sell on fall)                                            |
| triggerPrice  | string | Trigger price                                                                                                                              |
| clientOrderId | string | Client order ID, a string less than 32 characters in length                                                                                |
| positionType  | number | Position type: `1` (Cross Margin) / `2` (Isolated Margin)                                                                                  |
| open          | string | Position side: OPEN/CLOSE                                                                                                                  |
| side          | string | Order side: BUY/SELL                                                                                                                       |
| type          | string | Order type: LIMIT/MARKET                                                                                                                   |
| contractName  | string | Uppercase contract name, e.g. E-BTC-USDT                                                                                                   |
| price         | number | Order price. Precision-limited; the limit is set by the administrator.                                                                     |
| volume        | number | Order quantity. Precision-limited; the limit is set by the administrator. When opening a position at market price, the unit here is value. |

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

```json
{
    "orderId": 256609229205684228
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
If this endpoint (`/fapi/v1/conditionOrder`) returns something that does not meet expectations, please contact the technical team for assistance.
{% endhint %}

***

## Cancel order

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/cancel`

Rate Limit: **20 times/2s**

#### Headers

| Name                                          | Type    | Description  |
| --------------------------------------------- | ------- | ------------ |
| X-CH-SIGN<mark style="color:red;">\*</mark>   | string  | Sign         |
| X-CH-APIKEY<mark style="color:red;">\*</mark> | string  | User API-KEY |
| X-CH-TS<mark style="color:red;">\*</mark>     | integer | Timestamp    |

#### Request Body

| Name                                           | Type   | Description                                |
| ---------------------------------------------- | ------ | ------------------------------------------ |
| contractName<mark style="color:red;">\*</mark> | string | Uppercase contract name, e.g. `E-BTC-USDT` |
| orderId<mark style="color:red;">\*</mark>      | string | Order ID                                   |

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

```java
{
    "orderId": 256609229205684228
}
```

{% endtab %}
{% endtabs %}

***

## Order Information

<mark style="color:blue;">`GET`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/order`

#### Query Parameters

| Name                                            | Type   | Description                              |
| ----------------------------------------------- | ------ | ---------------------------------------- |
| contractName<mark style="color:red;">\*</mark>  | string | Uppercase contract name, e.g. E-BTC-USDT |
| orderId<mark style="color:red;">\*</mark>       | string | Order ID                                 |
| clientOrderId<mark style="color:red;">\*</mark> | string | Client unique identifier, default is 0   |

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

```json
{
    "side": "BUY",
    "executedQty": 0,
    "orderId": 2006628907041292645,
    "price": 2000.0000000000000000,
    "origQty": 2.0000000000000000,
    "avgPrice": 0E-8,
    "transactTime": 1704967622000,
    "action": "OPEN",
    "contractName": "E-BTC-USDT",
    "type": "LIMIT",
    "timeInForce": "",
    "status": "NEW"
}
```

{% endtab %}
{% endtabs %}

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

<table><thead><tr><th width="173">Parameter</th><th width="88">Type</th><th width="216">Example</th><th>Describe</th></tr></thead><tbody><tr><td><code>orderId</code></td><td>long</td><td><code>150695552109032492</code></td><td>Order ID (system generated)</td></tr><tr><td><code>contractName</code></td><td>string</td><td><code>E-BTC-USDT</code></td><td>Uppercase contract name</td></tr><tr><td><code>price</code></td><td>float</td><td><code>10.50</code></td><td>Order price</td></tr><tr><td><code>origQty</code></td><td>float</td><td><code>10.50</code></td><td>Order volume</td></tr><tr><td><code>executedQty</code></td><td>float</td><td><code>10.10</code></td><td>Deal volume</td></tr><tr><td><code>avgPrice</code></td><td>float</td><td><code>10.50</code></td><td>Deal average price</td></tr><tr><td><code>status</code></td><td>string</td><td><code>NEW</code></td><td>Order Status. Possible values are: NEW (new order, no transaction), PARTIALLY_FILLED (partial transaction), FILLED (all transactions), CANCELED (cancelled) and REJECTED (order rejected)</td></tr><tr><td><code>side</code></td><td>string</td><td><code>NEW</code></td><td>Order direction: BUY (buy long) and SELL (sell short)</td></tr><tr><td><code>action</code></td><td>string</td><td><code>OPEN</code></td><td>Position side: <code>OPEN/CLOSE</code></td></tr><tr><td><code>transactTime</code></td><td>long</td><td><code>1607702400000</code></td><td>Order creation time</td></tr><tr><td>type</td><td>string</td><td>LIMIT</td><td><p>Order type:</p><p>LIMIT/MARKET</p></td></tr><tr><td>timeInForce</td><td>integer</td><td>2</td><td>Effective method of conditional order: 1 (limit), 2 (market), 3 (IOC), 4 (FOK), 5 (POST_ONLY)</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
⚠️ NEEDS VERIFICATION AGAINST SOURCE — `timeInForce` is documented as a **string** enum (`IOC`/`FOK`/`POST_ONLY`) on order creation (see above) but as an **integer** code (1–5, covering unrelated concepts including order type) in this response table. This contradiction exists in the source documentation and has not been resolved here — confirm actual behavior before writing a strict client-side type for this field. Also note the `side` field's *Example* column above shows `NEW`, which is inconsistent with its own documented values (`BUY`/`SELL`); reproduced exactly as it appears in source.
{% endhint %}

***

## Current order information

<mark style="color:blue;">`GET`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/openOrders`

Retrieves the user's current open orders, optionally filtered by contract.

#### Query Parameters

| Name         | Type   | Description                                |
| ------------ | ------ | ------------------------------------------ |
| contractName | string | Uppercase contract name, e.g. `E-BTC-USDT` |

#### Headers

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-SIGN   | string | Sign         |
| X-CH-APIKEY | string | User API-KEY |
| X-CH-TS     | string | Timestamp    |

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

```java
[
    {
       "side": "BUY",
       "executedQty": 0,
       "orderId": 259396989397942275,
       "price": 10000.0000000000000000,
       "origQty": 1.0000000000000000,
       "avgPrice": 0E-8,
       "transactTime": "1607702400000",
       "action": "OPEN",
       "contractName": "E-BTC-USDT",
       "type": "LIMIT",
       "status": "INIT"
    }
]
```

{% endtab %}
{% endtabs %}

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

<table><thead><tr><th width="179">Parameter</th><th width="92">Type</th><th width="222">Example</th><th>Describe</th></tr></thead><tbody><tr><td><code>orderId</code></td><td>long</td><td><code>150695552109032492</code></td><td>Order ID (system generated)</td></tr><tr><td><code>contractName</code></td><td>string</td><td><code>E-BTC-USDT</code></td><td>Uppercase contract name</td></tr><tr><td><code>price</code></td><td>float</td><td><code>4765.29</code></td><td>Order price</td></tr><tr><td><code>origQty</code></td><td>float</td><td><code>1.01</code></td><td>Order volume</td></tr><tr><td><code>executedQty</code></td><td>float</td><td><code>1.01</code></td><td>Quantity already filled</td></tr><tr><td><code>avgPrice</code></td><td>float</td><td><code>4754.24</code></td><td>Average price of the filled portion</td></tr><tr><td><code>type</code></td><td>string</td><td><code>LIMIT</code></td><td><p>Order type:</p><p><code>LIMIT</code>/<code>MARKET</code></p></td></tr><tr><td><code>side</code></td><td>string</td><td><code>BUY</code></td><td>Order side:<code>BUY</code>/<code>SELL</code></td></tr><tr><td><code>status</code></td><td>string</td><td><code>NEW</code></td><td>Order Status. Possible values are: NEW (new order, no transaction), PARTIALLY_FILLED (partial transaction), FILLED (all transactions), CANCELED (cancelled) and REJECTED (order rejected)</td></tr><tr><td><code>action</code></td><td>string</td><td><code>OPEN</code></td><td>Position side: <code>OPEN/CLOSE</code></td></tr><tr><td><code>transactTime</code></td><td>long</td><td><code>1607702400000</code></td><td>Order creation time</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
⚠️ NEEDS VERIFICATION AGAINST SOURCE — this endpoint's example response shows `"status": "INIT"`, a value that does not appear in the documented status list anywhere else in this API (`NEW`, `PARTIALLY_FILLED`, `FILLED`, `CANCELED`, `REJECTED`). Reproduced exactly as documented.
{% endhint %}

***

## Historical order records

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/orderHistorical`

#### Headers

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-SIGN   | string | Sign         |
| X-CH-APIKEY | string | User API-KEY |
| X-CH-TS     | string | Timestamp    |

#### Request Body

| Name         | Type   | Description                                |
| ------------ | ------ | ------------------------------------------ |
| contractName | string | Uppercase contract name, e.g. `E-BTC-USDT` |
| limit        | string | Default 100; Maximum 1000                  |
| fromId       | long   | Start searching from this record           |

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

```javascript
[
    {
        "side":"BUY",
        "clientId":"0",
        "ctimeMs":1632903411000,
        "positionType":2,
        "orderId":777293886968070157,
        "avgPrice":41000,
        "openOrClose":"OPEN",
        "leverageLevel":26,
        "type":4,
        "closeTakerFeeRate":0.00065,
        "volume":2,
        "openMakerFeeRate":0.00025,
        "dealVolume":1,
        "price":41000,
        "closeMakerFeeRate":0.00025,
        "contractId":1,
        "ctime":"2021-09-29T16:16:51",
        "contractName":"E-BTC-USDT",
        "openTakerFeeRate":0.00065,
        "dealMoney":4.1,
        "status":4
    }
]
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
If this endpoint (`/fapi/v1/orderHistorical`) returns something that does not meet expectations, please contact the technical team for assistance.
{% endhint %}

{% hint style="warning" %}
⚠️ NEEDS VERIFICATION AGAINST SOURCE — no response parameter table is provided in the source documentation for this endpoint; field meanings (e.g. `type: 4`, `status: 4`, `openOrClose`) are inferred only from field naming, not documented. No parameter table has been added here — inventing one would not reflect verified source content.
{% endhint %}

***

## Profit and loss record

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/profitHistorical`

#### Headers

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-SIGN   | string | Sign         |
| X-CH-APIKEY | string | User API-KEY |
| X-CH-TS     | string | Timestamp    |

#### Request Body

| Name         | Type   | Description                                |
| ------------ | ------ | ------------------------------------------ |
| contractName | string | Uppercase contract name, e.g. `E-BTC-USDT` |
| limit        | string | Default 100; Maximum 1000                  |
| fromId       | long   | Start searching from this record           |

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

```javascript
[
    {
        "side":"SELL",
        "positionType":2,
        "tradeFee":-5.23575,
        "realizedAmount":0,
        "leverageLevel":26,
        "openPrice":44500,
        "settleProfit":0,
        "mtime":1632882739000,
        "shareAmount":0,
        "openEndPrice":44500,
        "closeProfit":-45,
        "volume":900,
        "contractId":1,
        "historyRealizedAmount":-50.23575,
        "ctime":1632882691000,
        "id":8764,
        "capitalFee":0
    }
]
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
If this endpoint (`/fapi/v1/profitHistorical`) returns something that does not meet expectations, please contact the technical team for assistance.
{% endhint %}

***

## Transaction Record

<mark style="color:blue;">`GET`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/myTrades`

Rate Limit: **20 times/2s**

#### Query Parameters

| Name                                           | Type   | Description                              |
| ---------------------------------------------- | ------ | ---------------------------------------- |
| contractName<mark style="color:red;">\*</mark> | string | Uppercase contract name, e.g. E-BTC-USDT |
| limit                                          | string | Default 100; Maximum 1000                |
| fromId                                         | long   | Start retrieval from this tradeId        |

#### Headers

| Name        | Type    | Description  |
| ----------- | ------- | ------------ |
| X-CH-SIGN   | string  | Sign         |
| X-CH-APIKEY | string  | User API-KEY |
| X-CH-TS     | integer | Timestamp    |

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

```json
[
    {
        "amount": 0.30000000000000000000000000000000,
        "side": "BUY",
        "fee": "0.000075",
        "isMaker": true,
        "isBuyer": true,
        "bidId": 1874564572563538130,
        "bidUserId": 10034,
        "price": 10.0000000000000000,
        "qty": 3,
        "askId": 1954072405852309104,
        "contractName": "E-ETH-USDT",
        "time": 1701419186000,
        "tradeId": 1528,
        "askUserId": 10378
    },
    {
        "amount": 1.00000000000000000000000000000000,
        "side": "BUY",
        "fee": "0.00025",
        "isMaker": true,
        "isBuyer": true,
        "bidId": 1874564572563538059,
        "bidUserId": 10034,
        "price": 10.0000000000000000,
        "qty": 10,
        "askId": 1954072405852309104,
        "contractName": "E-ETH-USDT",
        "time": 1701419186000,
        "tradeId": 1527,
        "askUserId": 10378
    }
]
```

{% endtab %}
{% endtabs %}

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

<table><thead><tr><th width="175">Parameter</th><th width="130">Type</th><th width="212">Example</th><th>Describe</th></tr></thead><tbody><tr><td>tradeId</td><td>number</td><td>28457</td><td>Trade ID</td></tr><tr><td>bidId</td><td>long</td><td>150695552109032492</td><td>Buy side order ID</td></tr><tr><td>askId</td><td>long</td><td>150695552109032493</td><td>Sell side order ID</td></tr><tr><td>bidUserId</td><td>integer</td><td>10024</td><td>Buy side user ID</td></tr><tr><td>askUserId</td><td>integer</td><td>10025</td><td>Sell side user ID</td></tr><tr><td>price</td><td>float</td><td>4.01</td><td>Deal price</td></tr><tr><td>qty</td><td>float</td><td>12</td><td>Deal volume</td></tr><tr><td>amount</td><td>float</td><td>5.38</td><td>Deal amount</td></tr><tr><td>time</td><td>number</td><td>1499865549590</td><td>Trade timestamp</td></tr><tr><td>fee</td><td>number</td><td>0.001</td><td>Trading fee</td></tr><tr><td>side</td><td>string</td><td>buy</td><td>Order side: BUY/SELL</td></tr><tr><td>contractName</td><td>string</td><td>E-BTC-USDT</td><td>Uppercase contract name</td></tr><tr><td>isMaker</td><td>boolean</td><td>true</td><td>Maker or Taker: <code>true</code> = Maker, <code>false</code> = Taker</td></tr><tr><td>isBuyer</td><td>boolean</td><td>true</td><td>Whether the account was the buyer in this trade: <code>true</code> = buyer, <code>false</code> = seller</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## Change position mode

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/edit_user_position_model`

#### Headers

| Name                                          | Type    | Description  |
| --------------------------------------------- | ------- | ------------ |
| X-CH-SIGN<mark style="color:red;">\*</mark>   | String  | Sign         |
| X-CH-TS<mark style="color:red;">\*</mark>     | Integer | Timestamp    |
| X-CH-APIKEY<mark style="color:red;">\*</mark> | String  | User API-KEY |

#### Request Body

| Name                                            | Type    | Description                                                 |
| ----------------------------------------------- | ------- | ----------------------------------------------------------- |
| contractName<mark style="color:red;">\*</mark>  | String  | Uppercase contract name, e.g. E-BTC-USDT                    |
| positionModel<mark style="color:red;">\*</mark> | Integer | Position mode: `1` (Net position) or `2` (Two-way position) |

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

```json
{
    "code": "0",
    "msg": "成功",
    "data": null
}
```

{% endtab %}
{% endtabs %}

***

## Change margin mode

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/edit_user_margin_model`

#### Headers

| Name                                          | Type    | Description  |
| --------------------------------------------- | ------- | ------------ |
| X-CH-SIGN<mark style="color:red;">\*</mark>   | String  | Sign         |
| X-CH-TS<mark style="color:red;">\*</mark>     | Integer | Timestamp    |
| X-CH-APIKEY<mark style="color:red;">\*</mark> | String  | User API-KEY |

#### Request Body

| Name                                           | Type    | Description                                                  |
| ---------------------------------------------- | ------- | ------------------------------------------------------------ |
| contractName<mark style="color:red;">\*</mark> | String  | Uppercase contract name, e.g. E-BTC-USDT                     |
| marginModel<mark style="color:red;">\*</mark>  | integer | Margin mode: `1` (Cross position) or `2` (Isolated position) |

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

```json
{
    "code": "0",
    "msg": "成功",
    "data": null
}
```

{% endtab %}
{% endtabs %}

***

## Change leverage

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/edit_lever`

#### Headers

| Name                                          | Type   | Description  |
| --------------------------------------------- | ------ | ------------ |
| X-CH-SIGN<mark style="color:red;">\*</mark>   | String | Sign         |
| X-CH-TS<mark style="color:red;">\*</mark>     | String | Timestamp    |
| X-CH-APIKEY<mark style="color:red;">\*</mark> | String | User API-KEY |

#### Request Body

| Name                                           | Type   | Description                               |
| ---------------------------------------------- | ------ | ----------------------------------------- |
| contractName<mark style="color:red;">\*</mark> | String | Uppercase contract name, e.g. E-BTC-USDT  |
| nowLevel<mark style="color:red;">\*</mark>     | String | Leverage multiple to be modified, e.g. 50 |

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

```json
{
    "code": "0",
    "msg": "成功",
    "data": null
}
```

{% endtab %}
{% endtabs %}

***

## Obtain the current trigger order

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/fapi/v1/trigger_order_list`

#### Headers

| Name                                          | Type    | Description  |
| --------------------------------------------- | ------- | ------------ |
| X-CH-SIGN<mark style="color:red;">\*</mark>   | String  | Sign         |
| X-CH-TS<mark style="color:red;">\*</mark>     | Integer | Timestamp    |
| X-CH-APIKEY<mark style="color:red;">\*</mark> | String  | User API-KEY |

#### Request Body

| Name                                           | Type    | Description                              |
| ---------------------------------------------- | ------- | ---------------------------------------- |
| contractName<mark style="color:red;">\*</mark> | String  | Uppercase contract name, e.g. E-BTC-USDT |
| page                                           | Integer | Current page number, Default 1           |
| limit                                          | Integer | Total data per page, Default 1000        |

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

```json
{
    "code":"0",
    "msg":"成功",
    "data":{
        "count":2,
        "trigOrderList":[
            {
                "mtime":1706513208000,
                "price":0,
                "ctime":1706513208000,
                "contractName":"BTCUSDT",
                "id":"895",
                "triggerOrderId":"1322738336974712829",
                "pricePrecision":3,
                "side":"BUY",
                "triggerPrice":11111,
                "multiplier":0.0001,
                "marginCoin":"USDT",
                "volume":100,
                "expireTime":1707722808000,
                "contractId":127,
                "triggerType":4,
                "open":"OPEN",
                "status":0
            },
            {
                "mtime":1705978532000,
                "price":0,
                "ctime":1705978532000,
                "contractName":"BTCUSDT",
                "id":"782",
                "triggerOrderId":"1322738336974712828",
                "pricePrecision":3,
                "side":"SELL",
                "triggerPrice":10000,
                "multiplier":0.0001,
                "marginCoin":"USDT",
                "volume":10,
                "expireTime":1707188132000,
                "contractId":127,
                "triggerType":1,
                "open":"CLOSE",
                "status":0
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

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

<table><thead><tr><th width="161">Parameter</th><th width="109">Type</th><th width="205">Example</th><th>Describe</th></tr></thead><tbody><tr><td>id</td><td>long</td><td>782</td><td>Internal record ID for this trigger order entry</td></tr><tr><td>triggerOrderId</td><td>long</td><td>1322738336974712828</td><td>Trigger order ID</td></tr><tr><td>contractId</td><td>long</td><td>127</td><td>Contract id</td></tr><tr><td>contractName</td><td>string</td><td>BTCUSDT</td><td>Contract name</td></tr><tr><td>marginCoin</td><td>string</td><td>USDT</td><td>Margin currency</td></tr><tr><td>multiplier</td><td>float</td><td>0.0001</td><td>Contract value</td></tr><tr><td>triggerPrice</td><td>float</td><td>10000</td><td>Trigger price</td></tr><tr><td>price</td><td>float</td><td>0</td><td>Order price</td></tr><tr><td>pricePrecision</td><td>integer</td><td>3</td><td>Price accuracy</td></tr><tr><td>volume</td><td>float</td><td>100</td><td>Order volume</td></tr><tr><td>open</td><td>string</td><td>OPEN</td><td>Direction of opening and closing positions (OPEN/CLOSE)</td></tr><tr><td>side</td><td>string</td><td>BUY</td><td>Order side (BUY/SELL)</td></tr><tr><td>status</td><td>integer</td><td>0</td><td>Validity status: 0 (valid), 1 (invalid)</td></tr><tr><td>expireTime</td><td>long</td><td>1707722808000</td><td>Order expiration time</td></tr><tr><td>ctime</td><td>long</td><td>1705978532000</td><td>Create time</td></tr><tr><td>mtime</td><td>long</td><td>1705978532000</td><td>Modify time</td></tr><tr><td>triggerType</td><td>integer</td><td>1</td><td>Trigger order type: 1 (stop loss), 2 (take profit), 3 (stop loss limit), 4 (take profit limit)</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Note: `contractName` in this endpoint's example (`BTCUSDT`) does not follow the `E-BTC-USDT` uppercase-contract-name format used everywhere else on this page. Reproduced exactly as documented.
{% endhint %}

***

## Cancel trigger order

<mark style="color:green;">`POST`</mark> `https://futuresopenapi.nagaexchange.co.id/v1/inner/trigger_order_cancel`

{% hint style="warning" %}
⚠️ NEEDS VERIFICATION AGAINST SOURCE — this endpoint's path prefix (`/v1/inner/...`) differs from every other Futures endpoint on this page (`/fapi/v1/...`). Reproduced exactly as documented in source; confirm this is intentional before integrating.
{% endhint %}

#### Headers

| Name                                          | Type    | Description  |
| --------------------------------------------- | ------- | ------------ |
| X-CH-SIGN<mark style="color:red;">\*</mark>   | String  | Sign         |
| X-CH-TS<mark style="color:red;">\*</mark>     | Integer | Timestamp    |
| X-CH-APIKEY<mark style="color:red;">\*</mark> | String  | User API-KEY |

#### Request Body

| Name                                           | Type   | Description                                                   |
| ---------------------------------------------- | ------ | ------------------------------------------------------------- |
| contractName<mark style="color:red;">\*</mark> | String | Uppercase contract name, e.g. E-BTC-USDT                      |
| orderId<mark style="color:red;">\*</mark>      | long   | ID of the trigger order to cancel, e.g. `1322738336974712828` |

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

```json
{
    "code": "0",
    "msg": "成功",
    "data": null
}
```

{% 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-futures-trading/trading.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.
