> 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/client-api/instruments.md).

# Instruments

This API part provides info on financial instruments

Please note that this section provides data on financial instruments themselves. If you want to find out the list of instruments that are available for trading with the specified account, you should use the <mark style="color:blue;">`GET`</mark>` ``/accounts/{accountId}/instruments` request (see [*Account management*](/traderevolution-api/traderevolution-apis/client-api/account-management.md) section).&#x20;

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

<https://sandbox-api.traderevolution.com/traderevolution/v1/swagger-ui/index.html#/Instruments>
{% endhint %}

## Financial instrument info

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

This method allows requesting detailed information about a trading instrument. Please note that the **tradable instrument ID** (not the regular instrument ID) must be specified in the request. It can be received by using the<mark style="color:blue;">`GET`</mark>`/accounts /{accountId}/instruments` method.

**Query/Path**

<table><thead><tr><th width="280">Name</th><th width="221">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>accountId*</code></td><td>integer/query</td><td>Identifier of the account for which the info is returned.</td></tr><tr><td><code>locale</code></td><td>string/query</td><td>Language identifier. Available values: <code>ar</code>, <code>en</code>, <code>es</code>, <code>fr</code>, <code>ja</code>, <code>ko</code>, <code>pl</code>, <code>pt</code>, <code>ru</code>, <code>tr</code>, <code>ua</code>, <code>zh_sm</code>, <code>zh_tr</code></td></tr><tr><td><code>tradableInstrumentId*</code></td><td>integer/path</td><td>Tradable instrument ID by which the info on the required instrument will be returned. </td></tr></tbody></table>

**CURL**

{% code overflow="wrap" %}

```json
curl -X GET "https://sandbox-api.traderevolution.com/traderevolution/v1/instruments/11681?accountId=3243563" -H "accept: application/json" -H "Authorization: Bearer eyJraWQiOiI3NDhlZjYwZS1mYTNlLTRmYjAtOWQyYy1kYzBhNGE3ZjZjZmEiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJpcnluY...31VnjWKOwPMoOCKbApKkUmfFVDFdQXjhd4tm41O50y6hFwi2FIVHhnQz7iHDBPNg"
```

{% endcode %}

**Response**

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

```json
{
  "d": {
    "name": "ETHUSD",
    "description": "Ether coin - United States dollar",
    "type": "CRYPTO",
    "tradingExchange": "Crypto",
    "marketDataExchange": "Crypto",
    "country": null,
    "isin": "5262564",
    "industry": null,
    "sector": null,
    "marketCap": null,
    "logoUrl": null,
    "localizedName": "ETHUSD",
    "settlementSystem": "Immediate",
    "tickSize": [
      {
        "leftRangeLimit": null,
        "tickSize": 0.01
      }
    ],
    "tickCost": [
      {
        "leftRangeLimit": null,
        "tickCost": 1
      }
    ],
    "baseCurrency": "USD",
    "quotingCurrency": "USD",
    "symbolStatus": "FULLY_OPEN",
    "lotSize": 1,
    "lotStep": 1e-8,
    "minLot": 1,
    "maxLot": null,
    "maxLotInCash": null,
    "bettingCurrency": null,
    "betStep": null,
    "betSize": null,
    "tradeSessionId": 7943,
    "contractMonth": null,
    "firstTradeDate": null,
    "lastTradeDate": null,
    "noticeDate": null,
    "settlementDate": null,
    "deliveryStatus": null,
    "exerciseStyle": null,
    "strikePrice": null,
    "strikeType": null,
    "strikeVersion": null,
    "tradeSessionStatusId": 6133,
    "barSource": "BID",
    "hasIntraday": true,
    "hasDaily": true,
    "swap": {
      "swapBuy": 2.25,
      "swapSell": 1.5,
      "swapMeasure": 1,
      "swapComment": "Standard plan applied"
    },
    "marginSettings": {
      "general": {
        "calculationType": "CUSTOM_COEF_FIXED_VALUE",
        "currency": "USD",
        "useDifferentLongShort": true,
        "overnightMarginEnabled": true,
        "long": {
          "day": {
            "initial": {
              "percentCoef": 60.0,
              "fixedCcyPerShare": 0.032
            },
            "maintenance": {
              "percentCoef": 30.0,
              "fixedCcyPerShare": 0.016
            }
          },
          "overnight": {
            "initial": {
              "percentCoef": 70.0,
              "fixedCcyPerShare": 0.0321
            },
            "maintenance": {
              "percentCoef": 35.0,
              "fixedCcyPerShare": 0.0161
            }
          }
        },
        "short": {
          "day": {
            "initial": {
              "percentCoef": 65.0,
              "fixedCcyPerShare": 0.032
            },
            "maintenance": {
              "percentCoef": 32.5,
              "fixedCcyPerShare": 0.016
            }
          },
          "overnight": {
            "initial": {
              "percentCoef": 75.0,
              "fixedCcyPerShare": 0.0321
            },
            "maintenance": {
              "percentCoef": 37.5,
              "fixedCcyPerShare": 0.0161
            }
          }
        },
        "tiers": null,
        "priceBasedSettings": null
      }
    },
    "additionalInfo": []
  },
  "s": "ok"
}
```

{% endtab %}
{% endtabs %}

In the response, you will get detailed data about the selected instrument. Standard errors can be received as well. If some parameter is absent (not cofigured) then it will be returned as <mark style="color:red;">`null`</mark>.

The response also includes the `marginSettings` object containing the margin configuration for the specified instrument for the selected account.&#x20;

Depending on the account's risk plan configuration, the `marginSettings` object may contain one or more trading mode objects: *general, intraday* or *delivery.*

Each trading mode contains a `calculationType` field that defines the margin calculation model. Depending on the calculation type, different sets of parameters may be returned, such as:

* long and short margin coefficients;
* day and overnight margin coefficients;
* tier-based margin settings;
* price-based leverage settings.

Fields that are not applicable to the selected calculation type are omitted or returned as <mark style="color:red;">`null`</mark>.

{% hint style="success" %}
A detailed description of this method can be found here:

<https://sandbox-api.traderevolution.com/traderevolution/v1/swagger-ui/index.html#/Instruments/getInstrumentDetails>
{% endhint %}

## Get trade sessions&#x20;

<mark style="color:blue;">`GET`</mark>`/traderevolution/v1/sessions`

This endpoint allows getting a list of all trading sessions available on this server. Please note that you can return both, a specific session by ID, or all sessions at once. The response will contain an array of objects where each object contains information on one trade session.&#x20;

**Query**

| Name        | Type    | Description                                                                       |
| ----------- | ------- | --------------------------------------------------------------------------------- |
| `sessionId` | integer | Session identifier. Fill this parameter when you need info on a concrete session. |

**СURL (example for ID=7943)**

{% code overflow="wrap" %}

```json
curl -X GET "https://sandbox-api.traderevolution.com/traderevolution/v1/sessions?sessionId=7943" -H "accept: application/json" -H "Authorization: Bearer eyJraWQiOiI3NDhlZjYwZS1mYTNlLTRmYjAtOWQyYy1kYzBhNGE3ZjZjZmEiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJpcnluYW0iLCJhdW..M7W3H_Ugpn2EnqL1uuChnm7_8dBBRNidQrdzxm1Ep4lfDetl1as67XNDxuQhKanDPtqnFkJwAUVUKoTb9EDvI6DlB6okFS3Ves5xBBxyrPMioAklAzBrQx5yp53kL_GN6eo6rRLawBDBEJKw"
```

{% endcode %}

**Response**

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

```json
{
  "d": {
    "tradeSessions": [
      {
        "id": 7943,
        "timeZone": "America/New_York",
        "blockTrading": false,
        "tradeSessionCurrentPeriod": 7944,
        "holidays": [
          {
            "name": "01-01-2025",
            "date": "01-01-2025",
            "workingState": "SHORTENED_DAY",
            "session_beforemarket": null,
            "session_preopen": null,
            "session_regular": {
              "sub_type": [
                {
                  "name": "main auction pre cross",
                  "sessionTime": [
                    {
                      "startTime": "17:00",
                      "endTime": "17:00"
                    }
                  ],
                  "tradeSessionPeriodId": 9890,
                  "tradeSessionStatusId": 6114
                },
                {
                  "name": "main auction freeze",
                  "sessionTime": [
                    {
                      "startTime": "17:00",
                      "endTime": "03:00"
                    }
                  ],
                  "tradeSessionPeriodId": 9891,
                  "tradeSessionStatusId": 6114
                },
                {
                  "name": "main",
                  "sessionTime": [
                    {
                      "startTime": "03:00",
                      "endTime": "17:00"
                    }
                  ],
                  "tradeSessionPeriodId": 9892,
                  "tradeSessionStatusId": 7345
                }
              ]
            },
            "session_postclose": null,
            "session_aftermarket": null
          }
        ],
        "session_beforemarket": null,
        "session_preopen": null,
        "session_regular": {
          "sub_type": [
            {
              "name": "main continuous",
              "sessionTime": [
                {
                  "startTime": "17:00",
                  "endTime": "17:00"
                },
                {
                  "startTime": "17:00",
                  "endTime": "17:00"
                },
                {
                  "startTime": "17:00",
                  "endTime": "17:00"
                },
                {
                  "startTime": "17:00",
                  "endTime": "17:00"
                },
                {
                  "startTime": "17:00",
                  "endTime": "17:00"
                },
                {
                  "startTime": "17:00",
                  "endTime": "17:00"
                },
                {
                  "startTime": "17:00",
                  "endTime": "17:00"
                }
              ],
              "tradeSessionPeriodId": 7944,
              "tradeSessionStatusId": 6133
            }
          ]
        },
        "session_postclose": null,
        "session_aftermarket": null
      }
    ]
  },
  "s": "ok"
}
```

{% endtab %}
{% endtabs %}

As a result, you will get a data object that contains the sessions array, where each object contains full information about each trading session. The example shows one trade session returned by its ID. Each session period is described separately, holidays can be found at the beginning of the array as well, and trading on these days should be configured independently (you can see shortened day settings on a holiday in the example).&#x20;

Standard errors can be received as well. If some setting is not configured, the <mark style="color:red;">`null`</mark> value will be returned for it.

{% hint style="success" %}
A detailed description of this method can be found here:

<https://sandbox-api.traderevolution.com/traderevolution/v1/swagger-ui/index.html#/Instruments/getTradeSession>
{% endhint %}

## Get trade session statuses

<mark style="color:blue;">`GET`</mark>`/traderevolution​/v1​/sessionStatuses`

This endpoint allows getting the list of available trade session statuses. *Trade session status* is the entity that determines trading permissions that are applied to this or that *trade session*. *Trade session status* defines the list of allowed: trade operations, order types, off-market order types, and the ability to send opening orders.&#x20;

**Query**

| Name              | Type    | Description                                                                           |
| ----------------- | ------- | ------------------------------------------------------------------------------------- |
| `sessionStatusId` | integer | Trade session status ID. Fill this parameter when you need info on a concrete status. |

**CURL (example for status with ID=7345)**

{% code overflow="wrap" %}

```json
curl -X GET "https://sandbox-api.traderevolution.com/traderevolution/v1/sessionStatuses?sessionStatusId=7345" -H "accept: application/json" -H "Authorization: Bearer eyJraWQiOiI3NDhlZjYwZS1mYThNGE3ZjZjZmEiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJpcnluYW0iLC...kR83-7ZlC-scr2UpfUPB4na5ExB28tOcp8TJSfstDXMMIY88Qtaru6gSLTl0O0DbhmiOCYkbg"
```

{% endcode %}

**Response**

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

```json
{
  "d": {
    "tradeSessionStatuses": [
      {
        "id": 7345,
        "allowedOperations": [
          0,
          1,
          1
        ],
        "allowedOrderTypes": [
          1,
          0,
          0,
          1,
          0,
          0,
          1
        ]
      }
    ]
  },
  "s": "ok"
}
```

{% endtab %}
{% endtabs %}

The following parameters are returned in the response, where `1=Allowed`, `0=Forbidden`:

```
"allowedOperations":
          0 - Order entry
          1 - Cancel
          1 - Modify
"allowedOrderTypes": 
          1 - Manual
          0 - Market
          0 - Stop
          1 - Limit
          0 - Stop limit
          0 - Tr. stop
          1 - Care order   
```

As a result, you will get a data object that contains the statuses array, where each object contains full information about each status. The example shows a specific response for status by its ID.&#x20;

Standard errors can be received as well.

{% hint style="success" %}
A detailed description of this method can be found here:

<https://sandbox-api.traderevolution.com/traderevolution/v1/swagger-ui/index.html#/Instruments/getSessionStatus>
{% endhint %}
