Page tree
Skip to end of metadata
Go to start of metadata

API Endpoint URL{route}/

Check {route} parameter value on your environment's configuration page.

HTTP headers required with every request

x-api-routing: RoutingName
x-api-key: ApiKeyValue 

Workflow example

  1. Create a new user/register an account
    To create a new user invoke registration Endpoint described here HOW TO: Register new user
    When user is created it must be activated through Login endpoint invocation
    When user is created a clearing account number must be set to an account, see HOW TO: Edit Account
    To to move accounts between users use map/unmap-account methods HOW TO: Map/Unmap Account

  2. Log in the system providing login and password: 
    HTTP Headers:
        x-api-routing: RoutingName
        x-api-key: ApiKeyValue
            "device": "ios",
            "version": "3.00",
    - See ETNA Trader Rest API documentation for details.
    Fields UserId and SessionId must be used when connecting the streamer service

  3. Keep SessionId and Ticket values from the response for future use. All requests will require 'ticket' value

  4. Case 1. Get securities 
    Headers: as above
            "ticket": "[YOURTICKETHERE]",
            "mask": "GO",
  5. Case 2. Get Accounts
    Headers: as above
            "ticket": "[YOURTICKETHERE]",        
  6. Case 2. Place an order POST
    to place an order it's required to provide not only ticket but also an account id to get a list of accounts for a user execute following api call:{route}/get-accounts Headers: as above. Body {"ticket":"YOURTICKETHERE"}
    or get complete user info{route}/get-user-info Headers: as above. Body {"ticket":"YOURTICKETHERE"}
    Besides, a security id must be provided which can be taken from (Step 3. Case 1 get securities described above){route}/place-trade-orders Headers: as above. (see documentation for body)
  7. Place an option order POST
    to place an option orders an option security identifier must be found first.
    * A root security must be located first use get-securities-by-mask as described above
    * use Id property of corresponding security object as securityId to invoke get-expirations. Result will contain expiration dates and expiration types that must be used to get a particular option
    invoke get-options specifying securityId, expirationDate and exprirationType. Range can be ignored. Result will contain a collection of put and call options with strike-prices and security identifiers (id)
    * use id as securityId filed in place-trade-order specifying all the data as described in the example 5.
To facilitate learning the ETNA OMS REST Api consider using Google Chrome plug-ins:

Below you can find the detailed examples: