Wiki

INDX API Balance

Method Balance (Trader’s current balance).

  • request parameters:
    name purpose comments
    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.
    Example for CryptoJS :
    CryptoJS.SHA256('1234567890AaBb').toString(CryptoJS.enc.Base64) equal Q+ylxnY9VUUqgEalgyEQS9oD2WgOgzA6LofVvjYPhFQ=
  • 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 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 contains the return value depending on the method called
    wmid Trader’s WMID “string of 0 to 255 symbols, win1251-encoded”
    nickname Trader’s nickname “string of 0 to 255 symbols, win1251-encoded”
    balance “string of 0 to 255 symbols, win1251-encoded”
    Trader’s balance
    Trader’s current balance on the Internet-exchange consisting of portfolio (price) and account balance (wmz)
    portfolio Trader’s portfolio list of the instruments belonging to the Trader with specified name, amount and averaged ask
    profit Trader's deals total amount of expenses for buying and selling notes by the Trader
  • 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