> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monochrome.exchange/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger, stop and track orders

> Futures API: trigger, stop and track orders.

## Create Trigger Orders

`POST` `/future/trade/v1/entrust/create-plan`

Content-Type = application/x-www-form-urlencoded && application/json

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| clientOrderId | string | false | N/A | Client order ID | |
| symbol | string | true | | Trading pair | |
| orderSide | string | true | N/A | Order side:BUY;SELL | BUY;SELL |
| entrustType | string | true | N/A | Order type:TAKE\_PROFIT(Take Profit Limit Order);STOP(Stop Limit Order);TAKE\_PROFIT\_MARKET(Take Profit Market Order);STOP\_MARKET(Stop Loss Market Order) | TAKE\_PROFIT;STOP;TAKE\_PROFIT\_MARKET;STOP\_MARKET |
| origQty | number | true | N/A | Quantity (Cont) | |
| price | number | false | N/A | Price | |
| stopPrice | number | true | N/A | Trigger price | |
| timeInForce | string | true | N/A | Valid way:GTC;IOC;FOK;GTX, Market orders only support IOC | GTC;IOC;FOK;GTX |
| triggerPriceType | string | true | N/A | Trigger price type:INDEX\_PRICE(Index price)；MARK\_PRICE(Mark price)；LATEST\_PRICE(latest price) | INDEX\_PRICE;MARK\_PRICE;LATEST\_PRICE |
| positionSide | string | true | N/A | Position side:LONG;SHORT | LONG;SHORT |

### Limit Flow Rules

200/s/apikey

```text theme={null}
{
    "error": {
    "code": "",
    "msg": ""
    },
    "msgInfo": "",
    "result": {},
    "returnCode": 0
}
title: Response
language: json
```

## Cancel Trigger Orders

`POST` `/future/trade/v1/entrust/cancel-plan`

Content-Type = application/x-www-form-urlencoded && application/json

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| entrustId | integer | true | N/A | Trigger order ID | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {},
  "returnCode": 0
}
```

## Cancel All Trigger Orders

`POST` `/future/trade/v1/entrust/cancel-all-plan`

Content-Type = application/x-www-form-urlencoded && application/json

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | true | | Trading pair. e.g. btc\_usdt | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": true,
  "returnCode": 0
}
```

## See Trigger Orders

`GET` `/future/trade/v1/entrust/plan-list`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | true | N/A | Trading pairs (queries all trading pairs if not passed) | |
| page | integer | false | 1 | Page | |
| size | integer | false | 10 | Quantity of a single page | |
| startTime | integer | false | N/A | Start time | |
| endTime | integer | false | N/A | End time | |
| state | string | true | N/A | Order status NOT\_TRIGGERED：New order (not triggered);TRIGGERING:Triggering;TRIGGERED:Triggered;USER\_REVOCATION:User revocation;PLATFORM\_REVOCATION:Platform revocation (rejection);EXPIRED:expired;UNFINISHED:Unfinished;HISTORY:(History) | NOT\_TRIGGERED;TRIGGERING;TRIGGERED;USER\_REVOCATION;PLATFORM\_REVOCATION;EXPIRED;UNFINISHED;HISTORY |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {
    "items": [
      {
        "clientOrderId": "", //Client order ID
        "closePosition": false, //Whether triggered to close all
        "createdTime": 0, //Create time
        "entrustId": 0, //Order ID
        "entrustType": "", //Order type
        "marketOrderLevel": 0, //Best market price
        "orderSide": "", //Order side
        "ordinary": true,
        "origQty": 0, //Quantity (Cont)
        "positionSide": "", //osition side
        "price": 0, //Order price
        "state": "", //Order state:NOT_TRIGGERED：New order (not triggered);TRIGGERING:Triggering;TRIGGERED:Triggered;USER_REVOCATION:User revocation;PLATFORM_REVOCATION:Platform revocation (rejection);EXPIRED:expired;UNFINISHED:Unfinished;HISTORY:(History)
        "stopPrice": 0, //Trigger price
        "symbol": "", //Trading pair
        "timeInForce": "", //Valid way
        "triggerPriceType": "" //Trigger price type
      }
    ],
    "page": 0,
    "ps": 0,
    "total": 0
  },
  "returnCode": 0
}
```

## See Trigger Orders base on EntrustId

`GET` `/future/trade/v1/entrust/plan-detail`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| entrustId | integer | true | N/A | Order ID | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {
    "closePosition": false, //Whether triggered to close all
    "createdTime": 0, //Create time
    "entrustId": 0, //Order ID
    "entrustType": "", //Order type
    "marketOrderLevel": 0, //Best market price
    "orderSide": "", //Order side
    "ordinary": true,
    "origQty": 0, //Quantity (Cont)
    "positionSide": "", //Position side
    "price": 0, //Order price
    "state": "", //Order state:NOT_TRIGGERED：New order (not triggered);TRIGGERING:Triggering;TRIGGERED:Triggered;USER_REVOCATION:User revocation;PLATFORM_REVOCATION:Platform revocation (rejection);EXPIRED:expired;UNFINISHED:Unfinished;HISTORY:(History)
    "stopPrice": 0, //Trigger price
    "symbol": "", //Trading pair
    "timeInForce": "", //有效方式
    "triggerPriceType": "" //触发价格类型
  },
  "returnCode": 0
}
```

## See Trigger Orders History

`GET` `/future/trade/v1/entrust/plan-list-history`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | true | N/A | Trading pairs (queries all trading pairs if not passed) | |
| direction | string | false | NEXT | Direction（PREV:Previous page；NEXT:Next page） | PREV;NEXT |
| id | integer | false | N/A | id | |
| limit | integer | false | 10 | Limit | |
| startTime | integer | false | N/A | Start time | |
| endTime | integer | false | N/A | End time | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {
    "hasNext": false, //Is there a next page
    "hasPrev": false, //Is there a previous page
    "items": [ //Datasheets
      {
        "clientOrderId": "", //Client order ID
        "closePosition": false, //Whether triggered to close all
        "createdTime": 0, //Create time
        "entrustId": 0, //Order ID
        "entrustType": "", //Order type
        "marketOrderLevel": 0, //Best market price
        "orderSide": "", //Order side
        "ordinary": true,
        "origQty": 0, //Quantity (Cont)
        "positionSide": "", //Position side
        "price": 0, //Order price
        "state": "", //Order state:NOT_TRIGGERED：New order (not triggered);TRIGGERING:Triggering;TRIGGERED:Triggered;USER_REVOCATION:User revocation;PLATFORM_REVOCATION:Platform revocation (rejection);EXPIRED:expired
        "stopPrice": 0, //Trigger price
        "symbol": "", //Trading pair
        "timeInForce": "", //Valid way
        "triggerPriceType": "" //Trigger price type
      }
    ]
  },
  "returnCode": 0
}
```

## Create Stop Limit

`POST` `/future/trade/v1/entrust/create-profit`

Content-Type = application/x-www-form-urlencoded && application/json

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | false | N/A | Trading pair | |
| origQty | integer | true | | Quantity (Cont) | |
| triggerProfitPrice | integer | true | | TP trigger price | |
| triggerStopPrice | integer | true | | SL trigger price | |
| expireTime | integer | true | | Expiration time | |
| positionSide | string | true | | Position side:LONG;SHORT | LONG;SHORT |

### Limit Flow Rules

200/s/apikey

```text theme={null}
{
    "error": {
    "code": "",
    "msg": ""
    },
    "msgInfo": "",
    "result": {},
    "returnCode": 0
}
title: Response
language: json
```

## Cancel Stop Limit

`POST` `/future/trade/v1/entrust/cancel-profit-stop`

Content-Type = application/x-www-form-urlencoded && application/json

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| profitId | integer | true | N/A | Stop limit ID | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": true,
  "returnCode": 0
}
```

## Cancel All Stop Limit

`POST` `/future/trade/v1/entrust/cancel-all-profit-stop`

Content-Type = application/x-www-form-urlencoded && application/json

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | true | N/A | Trading pair, e.g. btc\_usdt | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": true,
  "returnCode": 0
}
```

## See Stop Limit

`GET` `/future/trade/v1/entrust/profit-list`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| symbol | string | true | N/A | Trading pairs (queries all trading pairs if not passed) | |
| page | integer | false | 1 | Page | |
| size | integer | false | 10 | Quantity of a single page | |
| startTime | integer | false | N/A | Start time | |
| endTime | integer | false | N/A | End time | |
| state | string | true | N/A | Order state:NOT\_TRIGGERED：New order (not triggered);TRIGGERING:Triggering;TRIGGERED:Triggered;USER\_REVOCATION:User revocation;PLATFORM\_REVOCATION:Platform revocation (rejection);EXPIRED:expired;UNFINISHED:Unfinished;HISTORY:(History) | NOT\_TRIGGERED;TRIGGERING;TRIGGERED;USER\_REVOCATION;PLATFORM\_REVOCATION;EXPIRED;UNFINISHED;HISTORY |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {
    "items": [
      {
        "createdTime": 0, //Time
        "entryPrice": 0, //Open position average price
        "executedQty": 0, //Actual transaction
        "isolatedMargin": 0, //Isolated Margin
        "origQty": 0, //Quantity (Cont)
        "positionSide": "", //Position side
        "positionSize": 0, //Position quantity (Cont)
        "profitId": 0, //Order ID
        "state": "", //Order state:NOT_TRIGGERED：New order (not triggered);TRIGGERING:Triggering;TRIGGERED:Triggered;USER_REVOCATION:User revocation;PLATFORM_REVOCATION:Platform revocation (rejection);EXPIRED:expired;
        "symbol": "", //Trading pair
        "triggerProfitPrice": 0, //Stop profit price
        "triggerStopPrice": 0 //Stop loss price
      }
    ],
    "page": 0,
    "ps": 0,
    "total": 0
  },
  "returnCode": 0
}
```

## See Stop Limit base on Profitld

`GET` `/future/trade/v1/entrust/profit-detail`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| profitId | integer | true | N/A | Stop limit ID | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {
    "createdTime": 0, //Time
    "entryPrice": 0, //Open position average price
    "executedQty": 0, //Actual transaction
    "isolatedMargin": 0, //Isolated Margin
    "origQty": 0, //Quantity (Cont)
    "positionSide": "", //Position side
    "positionSize": 0, //Position quantity (Cont)
    "profitId": 0, //Order ID
    "state": "", //Order state:NOT_TRIGGERED：New order (not triggered);TRIGGERING:Triggering;TRIGGERED:Triggered;USER_REVOCATION:User revocation;PLATFORM_REVOCATION:Platform revocation (rejection);EXPIRED:expired;
    "symbol": "", //Trading pair
    "triggerProfitPrice": 0, //Stop profit price
    "triggerStopPrice": 0 //Stop loss price
  },
  "returnCode": 0
}
```

## Alter Stop Limit

`POST` `/future/trade/v1/entrust/update-profit-stop`

Content-Type = application/x-www-form-urlencoded && application/json

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| profitId | integer | true | N/A | Stop limit ID | |
| triggerProfitPrice | number | false | N/A | TP trigger price | |
| triggerStopPrice | number | false | N/A | SL trigger price | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {},
  "returnCode": 0
}
```

## Create track

`POST` `/future/trade/v1/entrust/create-track`

Content-Type = application/x-www-form-urlencoded

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| callback | string | true | N/A | Callback range configuration | FIXED;PROPORTION |
| callbackVal | number | true | N/A | Callback value | Greater than 0 |
| orderSide | string | true | N/A | Order side | BUY;SELL |
| origQty | number | true | N/A | Original quantity(count) | |
| positionSide | string | true | N/A | Position side:LONG;SHORT | BOTH;LONG;SHORT |
| positionType | string | true | N/A | Position type | CROSSED;ISOLATED |
| symbol | string | true | N/A | Trading pair | |
| triggerPriceType | string | true | N/A | Trigger price type:INDEX\_PRICE(Index price)；MARK\_PRICE(Mark price)；LATEST\_PRICE(latest price) | INDEX\_PRICE;MARK\_PRICE;LATEST\_PRICE |
| activationPrice | number | false | N/A | Activation price | |
| clientMedia | string | false | N/A | Client media | |
| clientMediaChannel | string | false | N/A | Client media channel | |
| clientOrderId | string | false | N/A | client order id | |
| expireTime | integer | false | N/A | expire time | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {},
  "returnCode": 0
}
```

## Cancel single track

`POST` `/future/trade/v1/entrust/cancel-track`

Content-Type = application/x-www-form-urlencoded

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| trackId | integer | true | N/A | track id | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {},
  "returnCode": 0
}
```

## Get single track detail

`GET` `/future/trade/v1/entrust/track-detail`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| trackId | integer | true | N/A | track id | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {
    "activationPrice": 0,      //Activation price
    "avgPrice": 0,             //Average price
    "callback": "",            //Callback range configuration 1:PROPORTION 2:FIXED
    "callbackVal": 0,          //Callback value
    "configActivation": false, //Whether to configure activation price
    "createdTime": 0,          //Creat time
    "currentPrice": 0,         //Real-time price, compared with the activation price and order price, to determine the direction of the activation price
    "desc": "",                //Describe
    "executedQty": 0,          //Actual transaction quantity
    "orderSide": "",           //Order side
    "ordinary": true,          //
    "origQty": 0,              //Quantity (Cont)
    "positionSide": "",        //Position side
    "price": 0,                //Order price
    "state": "",               //Order state: NOT_ACTIVATION:inactivated;NOT_TRIGGERED:not triggered;TRIGGERING:triggering;TRIGGERED:triggered;USER_REVOCATION:user revocation;PLATFORM_REVOCATION:platform rejects;EXPIRED:expired;DELEGATION_FAILED:delegation failed
    "stopPrice": 0,            //Trigger price
    "symbol": "",              //Symbol
    "trackId": 0,              //Track id
    "triggerPriceType": "",    //Trigger price type
    "updatedTime": 0           //Update time
  },
  "returnCode": 0
}
```

## Get track list(all active)

`GET` `/future/trade/v1/entrust/track-list`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| page | integer | false | 1 | page | |
| size | integer | false | 10 | Quantity of a single page | |
| endTime | integer | false | N/A | | |
| startTime | integer | false | N/A | start time | |
| symbol | string | false | N/A | symbol | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {
    items:[
      "activationPrice": 0,      //Activation price
      "avgPrice": 0,             //Average price
      "callback": "",            //Callback range configuration 1:PROPORTION 2:FIXED
      "callbackVal": 0,          //Callback value
      "configActivation": false, //Whether to configure activation price
      "createdTime": 0,          //Creat time
      "currentPrice": 0,         //Real-time price, compared with the activation price and order price, to determine the direction of the activation price
      "desc": "",                //Describe
      "executedQty": 0,          //Actual transaction quantity
      "orderSide": "",           //Order side
      "ordinary": true,          //
      "origQty": 0,              //Quantity (Cont)
      "positionSide": "",        //Position side
      "price": 0,                //Order price
      "state": "",               //Order state: NOT_ACTIVATION:inactivated;NOT_TRIGGERED:not triggered;TRIGGERING:triggering;TRIGGERED:triggered;USER_REVOCATION:user revocation;PLATFORM_REVOCATION:platform rejects;EXPIRED:expired;DELEGATION_FAILED:delegation failed
      "stopPrice": 0,            //Trigger price
      "symbol": "",              //Symbol
      "trackId": 0,              //Track id
      "triggerPriceType": "",    //Trigger price type
      "updatedTime": 0           //Update time
    ],
    page: 1,                     //Page
    ps: 10,                      //Page size
    total: 20                    //Total
  },
  "returnCode": 0
}
```

## Cancel all track

`POST` `/future/trade/v1/entrust/cancel-all-track`

Content-Type = application/x-www-form-urlencoded

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {},
  "returnCode": 0
}
```

## Get history track list(inactive)

`GET` `/future/trade/v1/entrust/track-list-history`

**Parameters**

| Parameter | Type | mandatory | Default | Description | Ranges |
| - | - | - | - | - | - |
| direction | string | false | NEXT | Direction（PREV:Previous page；NEXT:Next page） | PREV;NEXT |
| limit | integer | false | 10 | Limit | |
| id | integer | false | N/A | | |
| endTime | integer | false | N/A | End time | |
| startTime | integer | false | N/A | start time | |
| symbol | string | false | N/A | symbol | |

### Limit Flow Rules

200/s/apikey

```json Response theme={null}
{
  "error": {
    "code": "",
    "msg": ""
  },
  "msgInfo": "",
  "result": {
    hasNext: true,               //Is there a next page
    hasPre: true,                //Is there a previous page
    items:[
      "activationPrice": 0,      //Activation price
      "avgPrice": 0,             //Average price
      "callback": "",            //Callback range configuration 1:PROPORTION 2:FIXED
      "callbackVal": 0,          //Callback value
      "configActivation": false, //Whether to configure activation price
      "createdTime": 0,          //Creat time
      "currentPrice": 0,         //Real-time price, compared with the activation price and order price, to determine the direction of the activation price
      "desc": "",                //Describe
      "executedQty": 0,          //Actual transaction quantity
      "orderSide": "",           //Order side
      "ordinary": true,          //
      "origQty": 0,              //Quantity (Cont)
      "positionSide": "",        //Position side
      "price": 0,                //Order price
      "state": "",               //Order state: NOT_ACTIVATION:inactivated;NOT_TRIGGERED:not triggered;TRIGGERING:triggering;TRIGGERED:triggered;USER_REVOCATION:user revocation;PLATFORM_REVOCATION:platform rejects;EXPIRED:expired;DELEGATION_FAILED:delegation failed
      "stopPrice": 0,            //Trigger price
      "symbol": "",              //Symbol
      "trackId": 0,              //Track id
      "triggerPriceType": "",    //Trigger price type
      "updatedTime": 0           //Update time
    ]
  },
  "returnCode": 0
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.