INDX Program Interfaces
Methods:
- Balance - Current Trader balance.
- Tools - List of instruments.
- NP - List of assets used for trading.
- ExTools - Extended list of instruments.
- ExToolsByNP - List of instruments relative to a specific trading asset.
- HistoryTrading - Trader's trading history.
- HistoryTransaction - Trader's transaction history.
- OfferMy - List of current Trader's buy/sell orders.
- OfferList - List of current buy/sell orders for an instrument on the exchange.
- OfferAdd - Placing a new Trader's buy/sell order for an instrument on the exchange.
- OfferDelete - Deleting a Trader's buy/sell order for an instrument on the exchange.
- Tick - Statistics of trades for a period of time.
The trader's WM identifier can access API methods no more than once per second.
Common parameters for all requests in the ApiContext object:
Name | Purpose | Note |
---|---|---|
Login | Trader's login | Received by the trader on the API access page |
Password | Trader's password | Received by the trader on the API access page (used to form the signature) |
Wmid | Trader's Wmid | Trader's WM identifier |
Culture | Request language | Determines the message language (ru-RU, en-EN) |
Signature | Request signature | BASE64 + SHA256, formed from various parameters depending on the method |
Reqn | Request number | Unsigned integer, max. 18 digits; must always be greater than the previous request number! |
Balance Method (Current Trader Balance)
• URL for sending the request: https://api.indx.market/api/v2/trade/Balance
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""}}
Request parameters (in ApiContext):
Name | Purpose | Note |
---|---|---|
Reqn | Request number | Unsigned integer, max. 18 digits; always greater than the previous one! |
Login | Trader's login | From the API access page |
Password | Trader's password | From the API access page (for signature) |
Wmid | Trader's Wmid | WM identifier |
Culture | Request language | ru-RU, en-EN |
Signature | Request signature BASE64 + SHA256 | Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Reqn |
Response format:
{"code":0,"desc":"Success","value":{"wmid":"","nickname":"","balance":{"price":0,"wmz":0},"portfolio":[{"id":0,"name":"","notes":0,"price":0,"type":"","kind":0,"by":0},],"profit":[{"symbolid":0,"buy":0,"sell":0}]}}
Response parameters:
Name | Purpose | Note |
---|---|---|
code | Status/error code | 0 - success |
desc | Text description of the error | String up to 255 characters |
value | Result | Object with balance data |
value.wmid | Trader's Wmid | String 12 characters |
value.nickname | Trader's nickname | String up to 255 characters |
value.balance | Trader's balance | price - portfolio price, wmz - amount on account |
value.portfolio | Trader's portfolio | Array of instruments (id, name, notes, price, type, kind, by) |
value.profit | Trader's trades | Total cost (symbolid, buy, sell) |
Request execution codes:
Code | Description |
---|---|
0 | Request completed successfully |
-1 | Service stopped |
-2 | Access denied |
-3 | Erroneous Trader WMID |
-4 | Request signature generated incorrectly |
-5 | Incorrect date |
-7 | Web service call ended with an error |
-8 | Internal error |
-9, -10 | Unknown error |
-36, -38 | Invalid value of the reqn field |
-37 | The condition for increasing reqn is not met |
• Test page: JavaScript
Tools Method (List of exchange instruments)
• URL for sending the request: https://api.indx.market/api/v2/trade/Tools
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""}}
Request parameters (in ApiContext):
Name | Purpose | Note |
---|---|---|
Reqn | Request number | See Balance |
Login | Trader's login | See Balance |
Password | Trader's password | See Balance (for signature) |
Wmid | Trader's Wmid | See Balance |
Culture | Request language | See Balance |
Signature | Request signature BASE64 + SHA256 | Login + ';' + Password + ';' + Culture + ';' + Reqn |
Response format:
{"code":0,"desc":"Success","value":[{"id":0,"name":"","price":0,"kind":0,"type":"","by":0}]}
Response parameters (in the value array):
Name | Purpose | Note |
---|---|---|
id | Instrument number | For other methods |
name | Instrument name | String up to 255 characters |
price | Price of the last trade | Price per unit |
kind | Instrument type | (not detailed in doc.) |
type | Instrument type | (not detailed in doc.) |
by | Issued by | (not detailed in doc.) |
Request execution codes:
Similar to the Balance method.
• Test page: JavaScript
NP Method (List of assets for which they are traded)
• URL for sending the request: https://api.indx.market/api/v2/trade/NP
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""}}
Request parameters (in ApiContext):
Name | Purpose | Note |
---|---|---|
Reqn | Request number | See Balance |
Login | Trader's login | See Balance |
Password | Trader's password | See Balance (for signature) |
Wmid | Trader's Wmid | See Balance |
Culture | Request language | See Balance |
Signature | Request signature BASE64 + SHA256 | Login + ';' + Password + ';' + Culture + ';' + Reqn |
Response format:
{"code":0,"desc":"Success","value":[{"id":0,"name":""}]}
Response parameters (in the value array):
Name | Purpose | Note |
---|---|---|
id | Asset "instrument" number | (unclear, possibly internal ID) |
name | Asset name | String (e.g., WMZ, USDT) |
Request execution codes:
Similar to the Balance method.
• Test page: JavaScript
ExTools Method (Extended list of instruments)
• URL for sending the request: https://api.indx.market/api/v2/trade/ExTools
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""}}
Request parameters (in ApiContext):
Name | Purpose | Note |
---|---|---|
Reqn | Request number | See Balance |
Login | Trader's login | See Balance |
Password | Trader's password | See Balance (for signature) |
Wmid | Trader's Wmid | See Balance |
Culture | Request language | See Balance |
Signature | Request signature BASE64 + SHA256 | Login + ';' + Password + ';' + Culture + ';' + Reqn |
Response format:
{"code":0,"desc":"Success","value":[{"id":0,"name":"","price":0}]}
Response parameters (in the value array):
Name | Purpose | Note |
---|---|---|
id | Instrument number | For other methods |
name | Instrument name | String up to 255 characters |
price | Price of the last trade | Price per unit |
Request execution codes:
Similar to the Balance method.
• Test page: JavaScript
ExToolsByNP Method (List of instruments relative to the asset)
• URL for sending the request: https://api.indx.market/api/v2/trade/ExToolsByNP
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""},"NP":""}
Request parameters:
Name | Purpose | Note |
---|---|---|
ApiContext | Common parameters | See Balance |
NP | Asset name | String: WMZ|USDT|USDC|TUSD|BTC|ETH|LTH (uppercase) |
Signature is formed from: Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + NP + ';' + Reqn
Response format:
{"code":0,"desc":"Success","value":[{"id":0,"name":"","price":0}]}
Response parameters (in the value array):
Name | Purpose | Note |
---|---|---|
id | Instrument number | For other methods |
name | Instrument name | String up to 255 characters |
price | Price of the last trade | Price per unit |
Request execution codes:
Similar to the Balance method.
• Test page: JavaScript
HistoryTrading Method (Trader's trading history)
• URL for sending the request: https://api.indx.market/api/v2/trade/HistoryTrading
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""},"Trading":{"ID":0,"DateStart":"","DateEnd":""}}
Request parameters:
Name | Purpose | Note |
---|---|---|
ApiContext | Common parameters | See Balance |
Trading.ID | Instrument number | 0 for all instruments |
Trading.DateStart | Start date | YYYYMMDD |
Trading.DateEnd | End date | YYYYMMDD |
Signature is formed from: Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Trading.ID + ';' + Trading.DateStart + ';' + Trading.DateEnd + ';' + Reqn
Response format:
{"code":0,"desc":"Success","value":[{"id":0,"stamp":0,"name":"","isbid":0,"notes":0,"price":0}]}
Response parameters (in the value array):
Name | Purpose | Note |
---|---|---|
id | Instrument number | Max. 18 digits |
stamp | Operation date and time | Unix timestamp (seconds). C# format: new DateTime(1970,1,1).AddSeconds(stamp) |
name | Instrument name | String up to 255 characters |
isbid | Operation type | 0 - buy, 1 - sell |
notes | Quantity | Floating point number |
price | Price per unit | Floating point number |
Request execution codes:
Similar to the Balance method, plus:
Code | Description |
---|---|
-6 | Invalid instrument identifier |
-11 | Invalid date format |
• Test page: JavaScript
HistoryTransaction Method (Trader's transaction history)
• URL for sending the request: https://api.indx.market/api/v2/trade/HistoryTransaction
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":""},"Trading":{"ID":0,"DateStart":"","DateEnd":""}}
Note: in the documentation for this method, Reqn is not specified in ApiContext, but it is usually required. The signature may also require Reqn.
Request parameters:
Name | Purpose | Note |
---|---|---|
ApiContext | Common parameters | See Balance (Reqn may not be needed, clarify) |
Trading.ID | Instrument number | 0 for all instruments |
Trading.DateStart | Start date | YYYYMMDD |
Trading.DateEnd | End date | YYYYMMDD |
Signature is formed from: Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Trading.ID + ';' + Trading.DateStart + ';' + Trading.DateEnd (+ ';' + Reqn if Reqn is used)
Response format:
{"code":0,"desc":"Success","value":[{"id":0,"stamp":0,"name":"","type":0,"notes":0,"price":0,"amount":0}]}
Response parameters (in the value array):
Name | Purpose | Note |
---|---|---|
id | Instrument number | Max. 18 digits |
stamp | Operation date and time | Unix timestamp (seconds) |
name | Instrument name | String up to 255 characters |
type | Transaction type | (not detailed in doc.) |
notes | Quantity | Floating point number |
price | Price per unit | Floating point number |
amount | Transaction amount | Floating point number |
Request execution codes:
Similar to the Balance method, plus codes from HistoryTrading.
• Test page: JavaScript
OfferMy Method (List of current Trader's orders)
• URL for sending the request: https://api.indx.market/api/v2/trade/OfferMy
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""}}
Request parameters (in ApiContext):
Name | Purpose | Note |
---|---|---|
Reqn | Request number | See Balance |
Login | Trader's login | See Balance |
Password | Trader's password | See Balance (for signature) |
Wmid | Trader's Wmid | See Balance |
Culture | Request language | See Balance |
Signature | Request signature BASE64 + SHA256 | Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Reqn |
Response format:
{"code":0,"desc":"Success","value":[{"id":0,"stamp":0,"name":"","isbid":0,"notes":0,"price":0,"amount":0,"offerid":0}]}
Response parameters (in the value array):
Name | Purpose | Note |
---|---|---|
id | Instrument number | Max. 18 digits |
stamp | Operation date and time | Unix timestamp (seconds) |
name | Instrument name | String up to 255 characters |
isbid | Order type | 0 - buy, 1 - sell |
notes | Quantity | Floating point number |
price | Price per unit | Floating point number |
amount | Order amount | Floating point number |
offerid | Order ID | For OfferDelete method |
Request execution codes:
Similar to the Balance method.
• Test page: JavaScript
OfferList Method (List of current orders for an instrument on the exchange)
• URL for sending the request: https://api.indx.market/api/v2/trade/OfferList
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""},"Offer":{"ID":0}}
Request parameters:
Name | Purpose | Note |
---|---|---|
ApiContext | Common parameters | See Balance |
Offer.ID | Instrument number | Required parameter |
Signature is formed from: Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Offer.ID + ';' + Reqn
Response format:
{"code":0,"desc":"Success","value":{"buy":[{"notes":0,"price":0}],"sell":[{"notes":0,"price":0}]}}
Response parameters:
Name | Purpose | Note |
---|---|---|
value.buy | Buy orders | Array of objects {notes, price} |
value.sell | Sell orders | Array of objects {notes, price} |
notes | Quantity | Floating point number |
price | Price per unit | Floating point number |
Request execution codes:
Similar to the Balance method, plus:
Code | Description |
---|---|
-6 | Invalid instrument identifier |
• Test page: JavaScript
OfferAdd Method (Placing a new order)
• URL for sending the request: https://api.indx.market/api/v2/trade/OfferAdd
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""},"Offer":{"ID":0,"IsBid":0,"Notes":0,"Price":0}}
Request parameters:
Name | Purpose | Note |
---|---|---|
ApiContext | Common parameters | See Balance |
Offer.ID | Instrument number | Required |
Offer.IsBid | Order type | 0 - buy, 1 - sell |
Offer.Notes | Quantity | Floating point number, > 0 |
Offer.Price | Price per unit | Floating point number, > 0 |
Signature is formed from: Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Offer.ID + ';' + Offer.IsBid + ';' + Offer.Notes + ';' + Offer.Price + ';' + Reqn
Response format:
{"code":0,"desc":"Success","value":{"offerid":0}}
Response parameters:
Name | Purpose | Note |
---|---|---|
offerid | ID of the created order | For OfferDelete |
Request execution codes:
Similar to the Balance method, plus:
Code | Description |
---|---|
-6 | Invalid instrument identifier |
-12 | Invalid value of the IsBid field |
-13 | Invalid value of the Notes field |
-14 | Invalid value of the Price field |
-15 | Insufficient funds |
-16 | Insufficient instrument |
-17 | Error placing order |
-18 | Order cannot be executed |
-19 | Order not found |
-20 | Order already executed |
-21 | Order already canceled |
-22 | Order does not belong to the trader |
-23 | Error deleting order |
-24 | Trading for the instrument is stopped |
-25 | Trading for the instrument has not started |
-26 | Trading for the instrument is completed |
-27 | Trader is not allowed to trade this instrument |
-28 | Trader is not allowed to buy this instrument |
-29 | Trader is not allowed to sell this instrument |
-30 | Trader is not allowed to cancel orders for this instrument |
-31 | Trader is not allowed to view orders for this instrument |
-32 | Trader is not allowed to view trading history for this instrument |
-33 | Trader is not allowed to view transaction history for this instrument |
-34 | Trader is not allowed to view balance |
-35 | Trader is not allowed to view portfolio |
• Test page: JavaScript
OfferDelete Method (Deleting a Trader's order)
• URL for sending the request: https://api.indx.market/api/v2/trade/OfferDelete
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""},"Offer":{"OfferID":0}}
Request parameters:
Name | Purpose | Note |
---|---|---|
ApiContext | Common parameters | See Balance |
Offer.OfferID | Order ID | Obtained from OfferMy or OfferAdd |
Signature is formed from: Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Offer.OfferID + ';' + Reqn
Response format:
{"code":0,"desc":"Success"}
Request execution codes:
Similar to the Balance method and OfferAdd (codes -19, -20, -21, -22, -23).
• Test page: JavaScript
Tick Method (Statistics of trades for a period of time)
• URL for sending the request: https://api.indx.market/api/v2/trade/Tick
• Method: POST
• Accept types: text/json
• Request format: {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":"","Reqn":""},"Tick":{"ID":0,"DateStart":"","DateEnd":""}}
Request parameters:
Name | Purpose | Note |
---|---|---|
ApiContext | Common parameters | See Balance |
Tick.ID | Instrument number | Required |
Tick.DateStart | Start date | YYYYMMDD |
Tick.DateEnd | End date | YYYYMMDD |
Signature is formed from: Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Tick.ID + ';' + Tick.DateStart + ';' + Tick.DateEnd + ';' + Reqn
Response format:
{"code":0,"desc":"Success","value":[{"stamp":0,"price":0,"notes":0}]}
Response parameters (in the value array):
Name | Purpose | Note |
---|---|---|
stamp | Operation date and time | Unix timestamp (seconds) |
price | Trade price | Floating point number |
notes | Trade volume | Floating point number |
Request execution codes:
Similar to the Balance method, plus codes from HistoryTrading (-6, -11).
• Test page: JavaScript