Permalink: |
INDX API Tick
Tick method (trading statistic for a period of time)¶
- Requests should be sent to – 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,"Kind":1}}
- request parameters:
name purpose comments Reqn Request number unsigned int, maximum digits - 18; must always be greater than the number of a previous request! Login Trader’s login obtained by the Trader on the API access page and is used to sign the request sent to the Internet-exchange Password Trader's password obtained by the Trader on the API access page and is used to sign the request sent to the Internet-exchange Wmid Trader’s WMID Trader’s WM-identifier used to operate the Internet-exchange Culture Request language determines the language of the message (ru-RU, en-EN) Signature Request signature BASE64 + SHA256 formed with the parameters: Login + ';' + Password + ';' + Culture + ';' + Wmid + ';' + Tick/ID + ';' + Tick/Kind+ ';' + Reqn Example: CryptoJS.SHA256('1234567890AaBb').toString(CryptoJS.enc.Base64) equal Q+ylxnY9VUUqgEalgyEQS9oD2WgOgzA6LofVvjYPhFQ=
Tick Selection criteria used to search for deals by the instrument number and the indicated time interval ID Instrument number used to search for the instrument Kind Selection period time interval, values: 1 – day, 2 – week, 3 – month, 4 - year
- response format:
{"code":0,"desc":"Success","value":[{"t":0,"min":0.0000,"max":0.0000,"open":0.0000,"close":0.0000,"avg":0.0000,"total":0}.. {"t":0,"min":0.0000,"max":0.0000,"open":0.0000,"close":0.0000,"avg":0.0000,"total":0}]}
- response parameters:
name purpose comments code Execution code 0 - request successfully completed (for other values see return codes list) desc Execution code description string of 0 to 255 symbols, win1251-encoded value Result contains the return value depending on the method called id Instrument ID specified as an integer decimal number, consists of up to 18 digits t Date and time of the operation format C#: new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddSeconds(stamp); min Minimum price specified as an integer decimal number max Maximum price specified as an integer decimal number open Opening price specified as an integer decimal number close Closing price specified as an integer decimal number total Volume specified as an integer number
- Execution/Error Codes:
return code description 0 request successfully completed -1 service stopped -2 access denied -3 wrong Trader’s WMID -4 incorrect request signature -5 incorrect date -6 nonexistent instrument ID -7 web-service call resulted in an error -8 internal error -9 unknown error -10 unknown error -36, -38 incorrect Reqn value -37 has not met the condition for a constant Reqn value increase
- test page: JavaScript