> For the complete documentation index, see [llms.txt](https://guide.traderevolution.com/traderevolution-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.traderevolution.com/traderevolution-api/traderevolution-apis/backoffice-api/instruments-management.md).

# Instruments management

This article describes the process of managing financial instruments (adding, deleting, modifying, etc.).

{% hint style="success" %}
A full list of available methods and their parameters can be found here:

<https://sandbox.traderevolution.com:8443/proftrading/rest/swagger-ui.html#/Instruments>
{% endhint %}

## Get all instruments

<mark style="color:blue;">`GET`</mark>`/instruments`

This method allows to request a full list of instruments available on this server. Please note that you can apply filtering to the resulting list, to do this, the appropriate filter should be specified in the request query. All available filters are listed in the table below.&#x20;

**Query**

| Name                   | Type    | Description                                                                                                                                                                                                                                |
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `assetName`            | string  | Filter by currency. Search is performed for all instruments where this currency is used in *Quoting currency*, *Base currency*, or *Bet currency*.                                                                                         |
| `exchange`             | string  | Filter by exchange of the instrument.                                                                                                                                                                                                      |
| `instrumentGroupId`    | integer | Filter by Instrument group ID.                                                                                                                                                                                                             |
| `instrumentType`       | integer | Filter by type. *1 - FX, 2 - equities, 3 - futures, 4 - options, 5 - equities CFD, 6 - forward, 7 - futures CFD, 8 - indices, 10 - crypto, 11 - spreadbet, 12 - fixed income, 13 - ETF, 14 - TBILL, 15 - SPOT, 16 - corporate, 18 - Fund.* |
| `name`                 | string  | Filter by name. Several names can be specified using the comma separator. By default this parameter is blank and the response contains all entities.                                                                                       |
| `tradableInstrumentId` | integer | Filter by trading instrument ID.                                                                                                                                                                                                           |
| `ISIN`                 | string  | Filter instruments by ISIN value.                                                                                                                                                                                                          |

**CURL example (for futures type)**

{% code overflow="wrap" %}

```json
curl -X GET "http://sandbox-api.traderevolution.com/proftrading/rest/instruments?instrumentType=3" -H "accept: application/json" -H "Authorization: Bearer eyIyMTA2MTY2MTE1IjoyMTA2MTY2MT...cS6y__94LbcX1Bv5KKEI2AQAA.MIHkL1_WFKTP9FduURBok4II36mD5od-266ZXN0lMmk"
```

{% endcode %}

**Response**

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

```json
[
  {
    "id": 28904,
    "name": "/ES CONTINUES",
    "alias": "",
    "instrumentGroupId": 25153,
    "isin": "6245654",
    "tradingMic": "36418",
    "marketDataMic": "45873",
    "cfiCode": null,
    "description": "/ES from DX",
    "drmInstrumentTicker": "",
    "aliases": [],
    "rules": [
      {
        "ruleName": "VALUE_ROLLOVER_OFFSET",
        "ruleValue": "0",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "USE_WARNING_FOR_CHANGE_FROM_LAST_PRICE",
        "ruleValue": "0",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "ALLOW_AUTO_SETTLEMENT_EXPIRED_CONTRACTS",
        "ruleValue": "0",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "ALLOW_VARIABLE_TICK",
        "ruleValue": "0",
        "restriction": 0,
        "isOverridden": true
      },
      {
        "ruleName": "FUNCTION_RISKS_FROM",
        "ruleValue": "0",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "VALUE_MINIMUM_PENDING_ORDER_GAP",
        "ruleValue": "-1",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "VALUE_BASE_SHARES",
        "ruleValue": "{\"value\":\"\"}",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "VALUE_PIP_SIZE",
        "ruleValue": "0.25",
        "restriction": 0,
        "isOverridden": true
      },
      {
        "ruleName": "VALUE_FACE",
        "ruleValue": "100",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "FUNCTION_ALLOW_EXERCISE_FOR_ITM_OPTION",
        "ruleValue": "0",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "VALUE_MAXIMUM_LOT",
        "ruleValue": "-1",
        "restriction": 0,
        "isOverridden": false
      },
      {
      "ruleName": "VALUE_MAXIMUM_LOT_IN_CASH",
      "ruleValue": "-1",
      "restriction": 0,
      "isOverridden": false
      },
      {
        "ruleName": "VALUE_PRICE_LIMIT_FILTER",
        "ruleValue": "{\"highLimit\":[\"\"],\"lowLimit\":[\"\"],\"cHiLimit\":0,\"cLowLimit\":0,\"limitMeasure\":-1,\"wRange\":10,\"restoreAfter\":600000,\"oLifetime\":600000,\"auto_switch\":false,\"auto_restore\":false,\"isNotificateByMail\":false,\"levels\":1,\"restoreDelay\":\"10\",\"orderDelay\":\"10\",\"highLimitEnabled\":[true],\"lowLimitEnabled\":[true]}",
        "restriction": 0,
        "isOverridden": false
      },
      {
        "ruleName": "FUNCTION_CHART_VIEW_BY",
        "ruleValue": "0",
        "restriction": 0,
        "isOverridden": false
      }
    ],
    "logoId": "45684",
    "logoUrl": "",
    "fileKey": "",
    "externalName": "ES",
    "contractTemplate": 0,
    "tradableInstrumentId": 234567,
    "dataSourceInstrumentId": 125795,
    "dataSourceRouteId": 245790
  }
]
```

{% endtab %}
{% endtabs %}

The response will contain the list of all instruments with their settings if no filters were applied. Also, the response can be filtered using the query parameters listed above. If some parameters are missing, then the <mark style="color:red;">`null`</mark> value will be returned in the response. Standard errors can be returned as well.&#x20;

{% hint style="success" %}
You can find more info about this method by following the link:

<https://sandbox.traderevolution.com:8443/proftrading/rest/swagger-ui.html#/Instruments/getVisibleInstrumentsUsingGET>
{% endhint %}

## Find instrument by ID

<mark style="color:blue;">`GET`</mark>`/instruments/{instrumentId}`

This method allows you to find out the info about the required instrument by its ID. Please note that a simple instrument ID is used here (not the *tradable instrument ID*). The ID of the required instrument should be specified in the request *path*.&#x20;

**Path**

| Name           | Type    | Description                                          |
| -------------- | ------- | ---------------------------------------------------- |
| `instrumentId` | integer | ID of the instrument for which the info is required. |

**CURL example**

{% code overflow="wrap" %}

```json
curl -X GET "http://sandbox-api.traderevolution.com/proftrading/rest/instruments/26395" -H "accept: application/json" -H "Authorization: Bearer eyItMjA3NjQxODE4MiI6LTIwNzY0MTgxODIsIi0xOTY5MjA5ODczIjotMTk2OTIwOTg3MywiLTE5MzQ0MjU5OTEiOi0xOTM0NDI1OTkxLCIyMDg0ODczNDQiOjIw...BQwCAAA.X110EVos6wBICsf8WmzCw6EF6qnL3WR-3DRKpbQNhd0"
```

{% endcode %}

**Response**

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

```json
{
  "id": 26395,
  "name": "AAAU",
  "alias": "",
  "instrumentGroupId": 201,
  "isin": "",
  "tradingMic": "",
  "marketDataMic": "",
  "cfiCode": "",
  "description": "Goldman Sachs Physical Gold ETF Shares",
  "drmInstrumentTicker": "",
  "aliases": [],
  "rules": [
    {
      "ruleName": "VALUE_UNDERLIER_TYPE",
      "ruleValue": "0",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "VALUE_CROSS_RATE_FOR_POSITIONS",
      "ruleValue": "0",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "FUNCTION_TRADING_MODE",
      "ruleValue": "1",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "VALUE_BASE_CURRENCY",
      "ruleValue": "1",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "VALUE_BASE_SHARES",
      "ruleValue": "{\"value\":\"AAPL\"}",
      "restriction": 0,
      "isOverridden": true
    },
    {
      "ruleName": "VALUE_PIP_SIZE",
      "ruleValue": "0.1",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "VALUE_FACE",
      "ruleValue": "100",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "FUNCTION_ALLOW_EXERCISE_FOR_ITM_OPTION",
      "ruleValue": "0",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "VALUE_MAXIMUM_LOT",
      "ruleValue": "-1",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "VALUE_MAXIMUM_LOT_IN_CASH",
      "ruleValue": "-1",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "VALUE_PRICE_LIMIT_FILTER",
      "ruleValue": "{\"highLimit\":[\"\"],\"lowLimit\":[\"\"],\"cHiLimit\":0,\"cLowLimit\":0,\"limitMeasure\":-1,\"wRange\":10,\"restoreAfter\":600000,\"oLifetime\":600000,\"auto_switch\":false,\"auto_restore\":false,\"isNotificateByMail\":false,\"levels\":1,\"restoreDelay\":\"10\",\"orderDelay\":\"10\",\"highLimitEnabled\":[true],\"lowLimitEnabled\":[true]}",
      "restriction": 0,
      "isOverridden": false
    },
    {
      "ruleName": "FUNCTION_CHART_VIEW_BY",
      "ruleValue": "0",
      "restriction": 0,
      "isOverridden": false
    }
  ],
  "logoId": "",
  "logoUrl": "",
  "fileKey": "",
  "externalName": "",
  "contractTemplate": 0,
  "tradableInstrumentId": 337028,
  "dataSourceInstrumentId": null,
  "dataSourceRouteId": null
}
```

{% endtab %}
{% endtabs %}

The response will contain the instrument of interest with its settings. If some parameters are missing, then the <mark style="color:red;">`null`</mark> value will be returned in the response. Standard errors can be returned as well.&#x20;

{% hint style="success" %}
You can find more info about this method by following the link: <https://sandbox.traderevolution.com:8443/proftrading/rest/swagger-ui.html#/Instruments/getInstrumentByIdUsingGET>
{% endhint %}
