Logo
Admin API API Documentation

Instruments API

Number of APIs: 5


1. Get Instrument

GET {{URL_ORIGIN}}/api/v2/instruments/:id

This API allows to get a single instrument details.



2. Create Instrument

POST {{URL_ORIGIN}}/api/v2/instruments

This API allows to create a new instrument.

ID will be returned in the response, this ID is the unique identifier of the instrument and should be used when sending update commands.

Note: this ID can be retrieved via Get Instruments API.

Create Instrument- Error Codes

Code Message
1 System is unavailable
101 [FieldName] not found
101 [FieldName] must be less than or equal to maxLong/10^ fieldPrecision
101 [FieldName] must be more than or equal to minLong/10^ fieldPrecision
101 Precision of [Fieldname] is greater than [quantityPrecision]
101 Precision of [Fieldname] is greater than [pricePrecision]
101 Precision of quantityIncrement must be [quantityPrecision] (quantityPrecision)
101 minQuantity should be less than maxQuantity or equal to it
101 minPrice should be less than maxPrice or equal to it
101 maxQuantity should be less than maxDepth or equal to it
101 Stop Date must be after Start Date
101 Stop date must be in future
101 underlyingInstrumentId/legsInstrumentIds not found
101 Legs [price/quantity] precision must be equal to strategy price precision
102 symbol already exists for id: [instrumentId]
105 Legs [price/quantity] precision must be equal to strategy price precision
NEW v1.26.0
105
Strategies are not allowed as legs
2603 [fieldName] of [fieldValue] is not allowed as instrument price precision is [instrumentPricePrecision]
2605 [FieldName] must be less than maxLong/10^ pricePrecision
10001 Permission denied



3. Update Instrument

PUT {{URL_ORIGIN}}/api/v2/instruments/:id

This API allows to update existing instrument.

Update Instrument- Error Codes

All validations in create instrument and the below

All validations in create instrument and the below

Code Message
100 Missing or invalid parameter: [FieldName]
101 [FieldName] not found
101 [Start Date/Stop Date Removed v1.25 / Category] can’t be changed after start date
101 No updates allowed after the stop date
101 Category can’t be changed for instrument that is underlying instrument
101 [FieldName] can’t be changed for strategy related instrument
NEW v1.30.0 105 Mass cancellation must be done before disabling the instrument
REMOVED v1.30.0 2402 [NumberOfOrders] active orders have quantity precision higher than [quantityPrecision]
REMOVED v1.30.0 2402 [NumberOfOrders] active orders have quantity higher than [maxLong/10^ quantityPrecision]
REMOVED v1.30.0 2403 [NumberOfOrders] active orders have price precision higher than [pricePrecision]
REMOVED v1.30.0 2403 [NumberOfOrders] active orders have price higher than [maxLong/10^ pricePrecision]
REMOVED v1.30.0 2404 Current total depth is higher than [maxLong/10^ quantityPrecision]. You should remove some depth or decrease the quantity precision
NEW v1.30.0 2402 Mass cancellation must be done before changing quantityPrecision
NEW v1.30.0 2402 Mass cancellation must be done before changing pricePrecision
10001 Permission denied



4. NEW v1.30.0 Archive Instrument

POST {{URL_ORIGIN}}/api/v2/instruments/:id/archive

This API allows to archiving of existing instrument

Please contact the Exberry team if you would like to enable it on your system.

In order to support a large number of instruments we introduce the ability to archive instruments.

This is an irreversible operation that should happen only in case the instrument is no longer in use permanently.

When an instrument is archived, you can still access historical financial information about it, including Orders, Order events, Trades, and Ops reports. You can also create a new instrument with the same symbol, but the archived instrument is no longer tradable.

Archived instruments will be served only in those places:

  • Reporting
    • Orders
    • Orders event
    • Trades
    • Operations
  • Reporting API:
    • v1/exchange.reporting/mp/orders
    • v2/exchange.reporting/mp/trades

In all other APIs, archived instruments will not be served.

Prior to archiving an instrument, it must first be disabled, in case this instrument is a leg of a strategy, the parent must be archived prior to its legs.

Archive Instrument- Error Codes

Code Message
1 Exchange is unavailable
100 Missing or invalid parameter: [FieldName]
101 [FieldName] not found
102 Disable the instrument before attempting to archive it
106 Archiving strategy [parentSymbol] is required
10001 Permission denied



5. Get Instruments

GET {{URL_ORIGIN}}/api/v2/instruments

This API allows to get a list of all instruments with their details.

NEW v1.30.0 Get Instruments- Fields

Field Type Description
symbol string Optional
free text search by symbol
NEW v1.32.0 see the Suffix/Prefix table below
description string Optional
free text search by description
NEW v1.32.0 see the Suffix/Prefix table below
calendarId int Optional
search by calendarId
tickSizeTableId int Optional
search by tickSizeTableId
tradingModel eNum Optional
search by tradingModel
- CLOB
- RFQ
startDateFrom Date Optional
Search for the instrument that startdate ≥ dateFrom.
Format:YYYY-MM-DDThh:mm:ss[.SSS]

NEW v1.31.0for instruments without startDate, send - 0000-01-01T00:00
startDateTo Date Optional
Search for the instrument that startdate < dateTo. Format:YYYY-MM-DDThh:mm:ss[.SSS]
stopDateFrom Date Optional
Search for the instrument that stopdate ≥ dateFrom. Format:YYYY-MM-DDThh:mm:ss[.SSS]

NEW v1.31.0for instruments without stopDate, send - 0000-01-01T00:00
stopDateTo Date Optional
Search for the instrument that stopdate < dateTo. Format:YYYY-MM-DDThh:mm:ss[.SSS]
product int Optional
Search by underlyingInstrumentId
NEW v1.31.0for instruments without product - send 0
NEW v1.31.0derivativeInstrumentCategory eNum Optional
Search instruments that has an underling instrument and is in this category NEW v1.32.0 & active
For example see below

for values see in the Category List - here
CHANGED v1.31.0 statuses []eNum Optional
Search by the list of statuses
- ACTIVE
- DISABLED
- ARCHIVED
categories []eNum Optional
Search by catagory.
for values see in the Category List - here
subCategory eNum Optional
Search by sub-catagory.
for values see in the SubCategory List - here
strategy eNum Optional
Search by strategy.
- SPREAD
- STRIP
offset int Optional
Which record to start send from
If nothing was sent default is 0 (=first record)
limit int Optional
How many records to include in each page
If nothing was sent default is 10,000
orderBy object Optional
object with 2 parameters:
- field (String) = Symbol
- direction (Asc, Desc) direction

If nothing or invalid field was sent the default is [Symbol, Asc]

Example for derivativeInstrumentCategory instrument -

  • InstrumentId: 1,

  • InstrumentId: 2,

  • InstrumentId: 3,

  • InstrumentId: 4,

  • InstrumentId: 10, underlyingInstrumentId: 1, category: Futures, status: active

  • InstrumentId: 11, underlyingInstrumentId: 2, category: Futures, status: disabled

  • InstrumentId: 12, underlyingInstrumentId: 3, category: Spot, status: active

  • InstrumentId: 13, underlyingInstrumentId: 4, category: Spot, status: disabled

When Derivative Instrument Category = Futures → InstrumentId:1 is returned.

When Derivative Instrument Category = Spot →InstrumentId:3 is returned.

NEW v1.32.0 Suffix & Prefix

Pattern Type Description Sample
Contains the word X Find any description/ symbols that contains X X
Starts with X Find any description/ symbols that start with X X*
Ends with X Find any description/ symbol that ends with X *X
Equal to 'X' Find any description/ symbol that = X 'X'

NEW v1.30.0 Get Instrument- Error Codes

Code Message
102 Single category should be sent
102 Wrong Sub Category
102 Strategies category should be sent
100 Missing or invalid parameter: [FieldName]



ENDPOINTS