INDX API OfferAdd

OfferAdd method(Adding a new Trader’s buy/sell offer for an instrument on the exchange).

  • Requests should be sent to – https://api.indx.ru/api/v2/trade/OfferAdd
  • method – POST
  • accept types: text/json
  • request format:
    {"ApiContext":{"Login":"","Wmid":"","Culture":"","Signature":""},"Offer":{"ID":0,"Count":0,"IsAnonymous":true,"IsBid":true,"Price":0}}
    
  • 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
    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 + ';' + ID
    example for: CryptoJS.SHA256('1234567890AaBb').toString(CryptoJS.enc.Base64) equal Q+ylxnY9VUUqgEalgyEQS9oD2WgOgzA6LofVvjYPhFQ=
    Offer Offer parameters used to create an offer
    ID Instrument ID Creating an offer for the given instrument
    Count quantity number of bought or sold instruments
    IsAnonymous Offer status true – offer created anonymously, without Nickname shown in the list of offers, false – Nickname is visible
    IsBid Offer type true – buy offer, false – sell offer
    Price Price Price of a lot
  • response format:
    {"code":0,"desc":"Success","value":{"Code":0,"OfferID":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
    Code Offer state code 0 – offer successfully created
    OfferID Offer ID Decimal integer if the offer was successfully created
  • 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