IronbeamAPI (2.1)

Download OpenAPI specification:Download

Ironbeam API

This API describes the Ironbeam API. Using this API, you can access the following functionality:
  • Authentication
  • Account Information
  • Account Risk
  • Account Positions
  • Account Balance
  • Account Fills
  • Account Orders
  • Account Order Fills
  • Account Order Stream
  • Market Data
  • Order Management
  • Streaming Data
  • Symbol Search
  • Security Information
  • Entitled Exchanges
  • Exchange Sources
  • Market Complexes
  • Demo Account Management

API Design

The API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. Authentication is done via Bearer token. To obtain a token, you must first authenticate using the /auth endpoint. The token is then used in the Authorization header of all subsequent requests. The API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). You can read more about how to use the API in our documentation.

API Usage

To use this API you can generate a client library in your preferred language using the OpenAPI specification file provided here. The OpenAPI specification file is a machine-readable file that describes the API in a standard way. You can use this file to generate a client library in your preferred language using a tool like Swagger UI or OpenAPI Generator. You can also use the OpenAPI specification file to generate documentation for the API using a tool like Swagger UI.

Generating a client library with OpenAPI Generator

Example how to generate client library using OpenAPI Generator:
Step 1: Install openapi-generator-cli
You can install openapi-generator-cli globally using npm:
npm install @openapitools/openapi-generator-cli -g
Or you can install it locally in your project:
npm install @openapitools/openapi-generator-cli --save-dev

Important: You must have Java 8 or later installed on your system to use OpenAPI Generator.

Full installation instructions can be found on the OpenAPI Generator website.

Step 2: Generate Client Code
For C#
openapi-generator-cli generate -i openapi.json -g csharp -o ./csharp-client

This will generate a C# client in the ./csharp-client directory.
For C# you can also use the NSwag or NSWagStudio to generate a client library with a graphical user interface.

For TypeScript
openapi-generator-cli generate -i openapi.json -g typescript-angular -o ./typescript-client
or
openapi-generator-cli generate -i openapi.json -g typescript -o ./typescript-client
or
openapi-generator-cli generate -i openapi.json -g typescript-fetch -o ./typescript-client
or
openapi-generator-cli generate -i openapi.json -g typescript-axios -o ./typescript-client

This will generate a TypeScript client in the ./typescript-client directory.

For Python
openapi-generator-cli generate -i openapi.json -g python -o ./python-client

This will generate a Python client in the ./python-client directory.

For PHP
openapi-generator-cli generate -i openapi.json -g php -o ./php-client

This will generate a PHP client in the ./php-client directory.

For Java
openapi-generator-cli generate -i openapi.json -g java -o ./java-client

This will generate a Java client in the ./java-client directory.

For JavaScript
openapi-generator-cli generate -i openapi.json -g javascript -o ./javascript-client
This will generate a JavaScript client in the ./javascript-client directory.

In these commands:

  • -i openapi.json - specifies the input OpenAPI definition file.Witch can be downloaded at top of this documentation.
  • -g - specifies the language generator. You can replace csharp, typescript, typescript-angular, typescript-fetch, typescript-axios, python, php, java, or javascript with other language generators supported by OpenAPI Generator.
  • -o ./[language]-client specifies the output directory where the generated client code will be saved.

Please replace openapi.json with your actual OpenAPI definition file name downloaded from this page.

Remember, you should handle exceptions as necessary, especially for network operations. This code also assumes that you’re using the async/await pattern for asynchronous programming. If you’re not, you’ll need to adjust the code accordingly. Also, remember to dispose of the HttpClient when you’re done with it to free up network resources.

Generating client and documentation with Swagger UI

You can use the OpenAPI specification file to generate documentation for the API using Swagger UI. Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API. You can use Swagger UI to generate interactive API documentation that lets you try out the API calls directly in the browser (you can install Swagger UI locally or use the online version hosted by Swagger). You can find more information about Swagger UI here. This will generate a client library for the API in different languages. You can use the client library to interact with the API in your preferred language. Swagger UI will generate documentation and examples for the API that you can use to understand how the API works and how to use it. You can use the documentation to learn about the API and to build applications that use the API.

Streaming

For streaming data, we use WebSockets. To use streaming data, you must first create a streamId using the /stream/create endpoint. You can then use the streamId to subscribe to quotes, depth, and trades using the /stream/{streamId} endpoint. The /stream/{streamId} endpoint will return a WebSocket stream of data to the client. To open a WebSocket connection to the /stream/{streamId} endpoint, you must use the streamId as a parameter in the URL. For example, to open a WebSocket connection to the /stream/{streamId} endpoint, you would use the following URL: wss://demo.ironbeamapi.com/v2/stream/{streamId}. Remember to include the token in the query of the request to authenticate the client. You can use the token that you obtained when you authenticated using the /auth endpoint.

Important:

  • Before calling the /stream/{streamId} endpoint, you must create a streamId using the /stream/create endpoint.
  • Each time the WebSocket connection is closed, you must call the /stream/create endpoint to create a new streamId.
  • You can then use the new streamId to open a new WebSocket connection to the /stream/{streamId} endpoint.
  • While opening a WebSocket connection use WSS schema: wss://demo.ironbeamapi.com/v2/stream/{streamId}?token={token}
Example in Python
import requests
import websocket
import json

def on_message(ws, message): print(f"Received: {message}")

def on_error(ws, error): print(f"Error: {error}")

def on_close(ws): print("Connection closed")

def on_open(ws): print("Connection opened")

# Call the authorization endpoint to get a token auth_response = requests.post("https://demo.ironbeamapi.com/v2/auth", data={"username": "your_username", "password": "your_password"}) token = auth_response.json()['token']

# Call /stream/create to get a streamId stream_response = requests.get("https://demo.ironbeamapi.com/v2/stream/create", headers={"Authorization": f"Bearer {token}"}) streamId = stream_response.json()['streamId']

# Open a WebSocket connection with the bearer token and streamId ws = websocket.WebSocketApp( f"wss://demo.ironbeamapi.com/v2/stream/{streamId}?token={token}",
on_message=on_message, on_error=on_error, on_close=on_close, ) ws.on_open = on_open ws.run_forever()

Example in JavaScript
// Call the authorization endpoint to get a token
fetch('https://demo.ironbeamapi.com/v2/auth', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    username: 'your_username',
    password: 'your_password',
  }),
})
.then(response => response.json())
.then(data => {
  const token = data.token;
  

// Call /stream/create to get a streamId fetch('https://demo.ironbeamapi.com/v2/stream/create', { method: 'POST', headers: { 'Authorization': Bearer ${token}, }, }) .then(response => response.json()) .then(data => { const streamId = data.streamId;

// Open a WebSocket connection with the bearer token as query parameter and streamId
const socket = new WebSocket(`wss://demo.ironbeamapi.com/v2/stream/${streamId}?token=${token}`);

socket.onopen = function(e) {
  console.log("Connection opened");          
};

socket.onmessage = function(event) {
  console.log(`Received: ${event.data}`);
};

socket.onerror = function(error) {
  console.log(`Error: ${error.message}`);
};

socket.onclose = function(event) {
  if (event.wasClean) {
    console.log(`Connection closed cleanly, code=${event.code} reason=${event.reason}`);
  } else {
    console.log('Connection died');
  }
};

}); });

Example in C#
  using System;
  using System.Net.Http;
  using System.Net.WebSockets;
  using System.Text;
  using System.Text.Json;
  using System.Threading;
  using System.Threading.Tasks;
      

public class Program { public static async Task Main(string[] args) { var httpClient = new HttpClient();

      // Call the authorization endpoint to get a token
      var authResponse = await httpClient.PostAsync("https://demo.ironbeamapi.com/v2/auth", new StringContent(JsonSerializer.Serialize(new { username = "your_username", password = "your_password" }), Encoding.UTF8, "application/json"));
      var authData = JsonSerializer.Deserialize<Dictionary<string, string>>(await authResponse.Content.ReadAsStringAsync());
      var token = authData["token"];
  
      // Call /stream/create to get a streamId
      var streamResponse = await httpClient.PostAsync("https://demo.ironbeamapi.com/v2/stream/create", new StringContent("", Encoding.UTF8, "application/json"));
      var streamData = JsonSerializer.Deserialize<Dictionary<string, string>>(await streamResponse.Content.ReadAsStringAsync());
      var streamId = streamData["streamId"];
  
      // Open a WebSocket connection with the bearer token and streamId
      var webSocket = new ClientWebSocket();
      
  
      var uri = new Uri($"wss://demo.ironbeamapi.com/v2/stream/{streamId}?token={token}");
      var cts = new CancellationTokenSource();
  
      await webSocket.ConnectAsync(uri, cts.Token);
  
      Console.WriteLine("Connection opened");
      // Now you can use the webSocket object to send and receive messages
  }

}


API Versioning

We use a versioning scheme that allows you to specify which version of the API you want to use. To specify the version of the API you want to use, you include the version number in the URL. For example, to use version 1 of the API, you would use the following URL: https://demo.ironbeamapi.com/v1.

Change log

- 1.0: Initial version

Authorization

Authorize to use the API

Authorize to use the API. Provide the username and the API Key to authorize.

{
  "Username": "123456789",
  "ApiKey": "12313-123123-321231-23123-1231" // API KEY
}

For Enterprise API users, provide the username and password along with your Enterprise API Key.

{
  "Username": "123456789",
  "Password“: "passwordforuser123456789",
  "ApiKey": "345345-345345-3453453-354345" // Enterprise API Key
}

Example call in Python (without generated client library):

import requests

account_id = "account
url = "https://demo.ironbeamapi.com/v2/auth"

payload = {
  "username": account_id,
  "password": password,
  "apiKey": "API key"
}

headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

data = response.json()
print(data)
token = data['token']
print(token)

The response will contain a token that will be used in the Authorization header for all other requests. For example in Python:

headers = {
  "Authorization": "Bearer " + token
}

Example call to get the account ballance in Python (without generated client library):

import requests

account_id = "account
url = "https://demo.ironbeamapi.com/v1/account/" + account_id + "/balance"
query = {
  "balanceType": "CURRENT_OPEN"
}
headers = {"Authorization": "Bearer "+your_Bearer_token_here}

response = requests.get(url, headers=headers, params=query)

data = response.json()
print(data)
Request Body schema: application/json
username
required
string (Username) <= 100 characters ^.*$
Example: "username"
password
string (Password (for tenent ) or Api Key (for not tenent users)) <= 100 characters ^.*$
Example: "password"
apikey
string (API Key (for tenent users)) <= 100 characters ^.*$
Example: "apikey"

Responses

Request samples

Content type
application/json
{
  • "username": "username",
  • "password": "password",
  • "apikey": "apikey"
}

Response samples

Content type
application/json
{
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSU",
  • "status": "OK",
  • "message": "string"
}

Logout user

Logout user and invalidate token

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "OK"
}

Info

Get trader info

Return information

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "OK",
  • "accounts": [
    • "5123345",
    • "5123346",
    • "5123347"
    ],
  • "isLive": true,
  • "traderId": "5123345"
}

Get user general info

Get user general info

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "string",
  • "accountCategory": 0,
  • "accountTitle": "string",
  • "emailAddress1": "string",
  • "emailAddress2": "string",
  • "group": "string",
  • "isClearingAccount": true,
  • "phone1": "string",
  • "phone2": "string",
  • "subGroup": "string",
  • "accounts": [
    • "5123345"
    ]
}

Get security definitions

This message retrieves the security definitions for the given exchange symbols. If the exchange symbol is not entitled for live data, the response will be empty. If the exchange symbol is entitled for live data, the response will contain a list of security definitions. The list of security definitions is not guaranteed to be in any particular order.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
query Parameters
symbols
required
Array of strings (Symbol) <= 10 items [^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$]
Example: symbols=XCME:ES.U16,XCME:6E.U16,XCME:NQ.U16

Comma separated list of symbols

Responses

Response samples

Content type
application/json
{
  • "securityDefinitions": [
    • {
      • "exchSym": "XCME:6E.U16",
      • "exchangeSource": "CME",
      • "activationTime": 1470105600000,
      • "expirationTime": 1470105600000,
      • "marketComplex": "string",
      • "marketGroup": "6E",
      • "marketSymbol": "M6E",
      • "cfiCode": "FXXXXX",
      • "allowOpenOrders": true,
      • "maturityMonth": 9,
      • "maturityYear": 2016,
      • "productDescription": "Euro FX",
      • "userDefinded": false,
      • "intradayDefinded": false,
      • "optionType": "INVALID",
      • "optionExpirationType": "INVALID",
      • "strikePrice": 2000,
      • "underlyingSymbol": "XCME:6E.U16",
      • "variableTickTableCode": 0,
      • "exchangeStrategyType": "NONE",
      • "securityType": "INVALID",
      • "securityId": 2000,
      • "legs": [
        • {
          }
        ],
      • "depthLevels": 10,
      • "mainFraction": 2000,
      • "subFraction": 2000,
      • "scale": 4,
      • "minPriceIncrement": 2000,
      • "minPriceIncrementValue": 2000,
      • "regCode": "INVALID",
      • "currencyCode": "USD",
      • "displayFactor": 2000,
      • "allowTrading": true,
      • "scalingFactorScreen": 2000,
      • "exchangeSymbol": "XCME:6E.U16",
      • "creationDate": 1470105600000
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get security margin

This message retrieves the security margin for the given exchange symbol. If the exchange symbol is not entitled for live data, the response will be empty. If the exchange symbol is entitled for live data, the response will contain a list of security margin. The list of security margin is not guaranteed to be in any particular order.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
query Parameters
symbols
required
Array of strings (Symbol) <= 10 items [^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$]
Example: symbols=XCME:ES.U16,XCME:6E.U16,XCME:NQ.U16

Comma separated list of symbols

Responses

Response samples

Content type
application/json
{
  • "securityMarginAndValues": [
    • {
      • "exchSym": "XCME:6E.U16",
      • "currentPrice": 2000,
      • "currentTime": 1470105600000,
      • "currentValue": 1000,
      • "initialMarginLong": 1000,
      • "initialMaginShort": 1000,
      • "maintMarginLong": 1000,
      • "maintMarginShort": 1000,
      • "spanSettlePrice": 1000,
      • "spanSettleValue": 1000,
      • "marginScheduleDetails": [
        • {
          }
        ]
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get security status

This message retrieves the security status for the given exchange symbol. If the exchange symbol is not entitled for live data, the response will be empty. If the exchange symbol is entitled for live data, the response will contain a list of security status. The list of security status is not guaranteed to be in any particular order.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
query Parameters
symbols
required
Array of strings (Symbol) <= 10 items [^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$]
Example: symbols=XCME:ES.U16,XCME:6E.U16,XCME:NQ.U16

Comma separated list of symbols

Responses

Response samples

Content type
application/json
{
  • "securityStatuses": [
    • {
      • "exchSym": "XCME:6E.U16",
      • "status": "OPEN",
      • "statusValue": 17,
      • "dateTime": 1470105600000,
      • "tradeDate": 1470105600000
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get symbols

Retrieves the symbols with which start with the given text. If the text is empty, the response will contain 100 first symbols in alphabetic order. The response will be limited to 100 symbols. If the user wants to retrieve more symbols, the user should use the text parameter to filter the symbols.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
query Parameters
text
string [ 3 .. 20 ] characters
Example: text=ES.

The text to filter the symbols

limit
integer [ 1 .. 1000 ]
Example: limit=100

The number of symbols to retrieve, the default is "1000". This parameter is optional.

preferActive
boolean
Example: preferActive=true

If true, the response will contain only active symbols, default is "true" . This parameter is optional.

Responses

Response samples

Content type
application/json
{
  • "symbols": [
    • {
      • "symbol": "XCME:6E.U16",
      • "currency": "USD",
      • "description": "string",
      • "hasQuotes": true,
      • "pipValue": 0.1,
      • "pipSize": 0.1,
      • "minTick": 0.1,
      • "qtyStep": 0.1,
      • "symbolType": "string"
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get exchanges sources

This message retrieves the exchange sources for the given exchange. If the exchange is not entitled for live data, the response will be empty. If the exchange is entitled for live data, the response will contain a list of exchange sources. The list of exchange sources is not guaranteed to be in any particular order.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication

Responses

Response samples

Content type
application/json
{
  • "exchanges": [
    • "XCME",
    • "CBOT"
    ],
  • "status": "OK",
  • "message": "string"
}

Get market complexes

Retrieves the list of market complexes.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
exchange
required
string <= 10 characters
Example: XCME

Exchange

Responses

Response samples

Content type
application/json
{
  • "marketComplexes": [
    • {
      • "groups": [
        • {
          }
        ],
      • "name": "NANO BITCOIN SPRD J4-K4"
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get symbol futures

Retrieves the list of futures symbols.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
exchange
required
string <= 10 characters
Example: XCME

Exchange

marketGroup
required
string <= 10 characters
Example: ES

Market Group

Responses

Response samples

Content type
application/json
{
  • "symbols": [
    • {
      • "symbol": "XCME:6E.U16",
      • "maturityMonth": "MAR",
      • "maturityYear": 2029,
      • "description": "E-mini S&P 500"
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get symbol groups by complex

Retrieves the symbol groups by complex. The response will contain a list of symbol groups. The list of symbol groups is not guaranteed to be in any particular order.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
complex
required
string <= 50 characters
Example: Currency

Complex must be a valid market complex

Responses

Response samples

Content type
application/json
{
  • "symbolGroups": [
    • {
      • "group": "BIT",
      • "name": "NANO BITCOIN SPRD J4-K4"
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get symbol option groups

Retrieves the list of option symbol groups.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
symbol
required
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: XCME:6E.U16

Symbol

Responses

Response samples

Content type
application/json
{
  • "groups": [
    • "E1A",
    • "E1B",
    • "E1C",
    • "E1D",
    • "E2A",
    • "E2B",
    • "E2C",
    • "E2D",
    • "E3A",
    • "E3B",
    • "E3C",
    • "E3D",
    • "E4A",
    • "E4B",
    • "E4C",
    • "E4D",
    • "E5A",
    • "ES",
    • "EW",
    • "EW1",
    • "EW2",
    • "EW3",
    • "EW4"
    ],
  • "optionGroups": [
    • {
      • "group": "E1A",
      • "expiration": 1712001600000,
      • "description": "E-MINI SP MON WKLY"
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Search Symbol Options

Retrieves the list of option symbol groups.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
symbol
required
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: XCME:6E.U16

Symbol

group
required
string <= 5 characters
Example: ES

Group

optionType
required
string
Enum: "call" "put"
Example: call

Option Type

near
required
boolean
Example: true

Near money

Responses

Response samples

Content type
application/json
{
  • "symbolOptions": [
    • "XCME:6E.U16"
    ],
  • "status": "OK",
  • "message": "string"
}

Search for symbol option spreads

Retrieves the list of symbol option spreads.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
query Parameters
symbol
required
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: symbol=XCME:6E.U16

Symbol

Responses

Response samples

Content type
application/json
{
  • "symbolSpreads": [
    • "+1:6E.U16:-1:6E.Z16 +1:6E.U16:-1:6E.Z16:+1:6E.H17 +1:ES.Z24.P5680+1:ES.Z24.P5550-1:ES.Z24.P5450-1:ES.Z24.P5780 +1:ES.Z24.P5670-1:ES.Z24.P5550+1:EW3.F25.W3.P5760-1:EW3.F25.W3.P5860"
    ],
  • "status": "OK",
  • "message": "string"
}

Get strategy ID

Get the strategy ID from server. The strategy ID is used to identify the strategy in the system.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication

Responses

Response samples

Content type
application/json
{
  • "Id": 0,
  • "Minimum": 0,
  • "Maximum": 0,
  • "status": "OK",
  • "message": "string"
}

Account

Account Balance

Get account balance

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

query Parameters
balanceType
required
string (BalanceType)
Enum: "CURRENT_OPEN" "START_OF_DAY"
Example: balanceType=CURRENT_OPEN

Account balance type

Responses

Response samples

Content type
application/json
{
  • "balances": [
    • {
      • "accountId": "5123345",
      • "currencyCode": "USD",
      • "cashBalance": 1000,
      • "cashBalanceAvailable": 1000,
      • "openTradeEquity": 1000,
      • "totalEquity": 1000,
      • "cashAddedToday": 1000,
      • "netLiquidity": 1000,
      • "netLiquidityAvailable": 1000,
      • "daysOnCall": 365,
      • "balanceType": "CURRENT_OPEN",
      • "marginInfo": {
        • "accountId": "5123345",
        • "currencyCode": "USD",
        • "marginO": {
          },
        • "marginOW": {
          },
        • "marginOWI": {
          }
        }
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Positions

The response will contain a list of positions.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "string",
  • "accountId": "5123345",
  • "positions": [
    • {
      • "accountId": "5123345",
      • "currencyCode": "USD",
      • "exchSym": "XCME:6E.U16",
      • "positionId": "10198961658263821681-101",
      • "quantity": 1000,
      • "price": 2000,
      • "dateOpened": 20160801,
      • "side": "LONG",
      • "unrealizedPL": 1000
      }
    ]
}

Risk

Risk information returns the liquidation value at which the account may be auto-liquidated. If this feature is not enabled the value returned will be null. Risk contains a list of liquidation value, one for each Regulatory and Currency Code combination.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

Responses

Response samples

Content type
application/json
{
  • "risks": [
    • {
      • "accountId": "5123345",
      • "regCode": "INVALID",
      • "currencyCode": "USD",
      • "liquidationValue": 2000
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Fills

This message retrieves the fills for the given account. The response will contain a list of fills. The list of fills is not guaranteed to be in any particular order.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

Responses

Response samples

Content type
application/json
{
  • "fills": [
    • {
      • "orderId": "5123345-1234567890",
      • "strategyId": 1234567890,
      • "accountId": "5123345",
      • "exchSym": "XCME:6E.U16",
      • "status": "ANY",
      • "side": "BUY",
      • "quantity": 1000,
      • "price": 1000,
      • "fillQuantity": 1000,
      • "fillTotalQuantity": 1000,
      • "fillPrice": 1000,
      • "avgFillPrice": 1000,
      • "fillDate": "2016-08-01T00:00:00Z",
      • "timeOrderEvent": 123123123123,
      • "orderUpdateId": "10336761658263818775-134"
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Market

Get quotes

Get current quotes for the instrument. On first call, the response can be empty if the instrument is not subscribed to. The response will be updated every time the quote changes.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
query Parameters
symbols
required
Array of strings (Symbol) <= 10 items [^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$]
Example: symbols=XCME:ES.U16,XCME:6E.U16,XCME:NQ.U16

Comma separated list of symbols

Responses

Response samples

Content type
application/json
{
  • "Quotes": [
    • {
      • "s": "XCME:6E.U16",
      • "l": 1000,
      • "sz": 1000,
      • "ch": "0.00425",
      • "op": 2000,
      • "hi": 2000,
      • "lo": 2000,
      • "ags": 0,
      • "td": 255,
      • "stt": 2000,
      • "stts": 20160801,
      • "sttst": 232342342344,
      • "pstt": 2000,
      • "pstts": 20160801,
      • "sttch": 2000,
      • "hb": 2000,
      • "la": 2000,
      • "b": 2000,
      • "bt": 232342342344,
      • "bs": 3,
      • "ibc": 3,
      • "ibs": 3,
      • "a": 2000,
      • "at": 232342342344,
      • "as": 3,
      • "ias": 3,
      • "iac": 3,
      • "tt": 232342342344,
      • "tdt": 20160801,
      • "secs": "OPEN",
      • "sdt": 20160801,
      • "oi": 1000,
      • "tv": 1000,
      • "bv": 1000,
      • "swv": 1000,
      • "pv": 1000
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get depth

Get current depth of market for the instrument.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
query Parameters
symbols
required
Array of strings (Symbol) <= 10 items [^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$]
Example: symbols=XCME:ES.U16,XCME:6E.U16,XCME:NQ.U16

Comma separated list of symbols

Responses

Response samples

Content type
application/json
{
  • "Depths": [
    • {
      • "s": "XCME:6E.U16",
      • "b": [
        • {
          }
        ],
      • "a": [
        • {
          }
        ]
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get Trades

Get trades for the instrument.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
symbol
required
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: XCME:6E.U16

Symbol

from
required
integer <long>
Example: 1612137600000

From date in milliseconds

to
required
integer <long>
Example: 1612137600000

To date in milliseconds

max
required
integer [ 1 .. 100 ]
Example: 10

Maximum number of records to return

earlier
required
boolean
Example: true

Earlier

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "string",
  • "traders": [
    • {
      • "symbol": "XCME:ES.U16",
      • "price": 1.13535,
      • "change": 0.0001,
      • "size": 1,
      • "sequenceNumber": 12132123,
      • "sendTime": 1234567890,
      • "tickDirection": "INVALID",
      • "aggressorSide": 0,
      • "tradeDate": "20200101",
      • "tradeId": 2131220200101,
      • "totalVolume": 1
      }
    ]
}

Order

Place new order

This message submits new order to the exchange. The response will contain the order id of the submitted order. Response will contain the strategy id. Order Id can be received from endpoint /order/{accountId}/toorderid/{strategyId}.
Order Types:
Market Order: A market order is an order to buy or sell a security at the current market price.
Limit Order: A limit order is an order to buy or sell a security at a specific price or better.
Stop Order: A stop order is an order to buy or sell a security when its price surpasses a particular point, thus ensuring a higher probability of achieving a predetermined entry or exit price.
Stop Limit Order: A stop-limit order is a conditional trade over a set time frame that combines the features of a stop order with those of a limit order and is used to mitigate risk.
Bracket Order: A bracket order is a strategy where you place a take-profit order and a stop-loss order at the same time you place a market order.
Order Duration:
DAY: Order is valid for the current trading day.
GOOD_TILL_CANCEL: Order is valid until it is executed or canceled.
Order Side:
BUY: Buy order.
SELL: Sell order.


Very Important:
For Bracket Orders: The quantity is the same for all orders in the bracket.
For Stop Loss Orders: The stop loss price is the price at which the order will be triggered.
For Take Profit Orders: The take profit price is the price at which the order will be triggered.
For Stop Loss and Take Profit Orders: The stop loss price is the price at which the order will be triggered. The take profit price is the price at which the order will be triggered.
For Stop Loss Offset: Stop loss offset - if set, stop loss price is calculated as stopPrice - stopLossOffset.
For Take Profit Offset: Take profit offset - if set, take profit price is calculated as stopPrice + takeProfitOffset.
For Trailing Stop: Trailing stop - currently not supported - but will be in the future.
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

Request Body schema: application/json
accountId
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: "5123345"

Account ID - account ID class

exchSym
required
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: "XCME:6E.U16"

Symbol - symbol class

side
required
string (OrderSide)
Enum: "BUY" "SELL" "INVALID"
Example: "BUY"

Order Side - side enum

  • "BUY" - Buy side
  • "SELL" - Sell side
  • "" - INVALID
quantity
required
number <double> (Quantity)
Example: "1"

Quantity - quantity class

limitPrice
number <double> (Price)
Example: "2000"

Price - price class

stopPrice
number <double> (Price)
Example: "2000"

Price - price class

stopLoss
number <double> (Price)
Example: "2000"

Price - price class

takeProfit
number <double> (Price)
Example: "2000"

Price - price class

stopLossOffset
number <float> (Stop Loss Offset)
Example: "25"

Stop loss offset. Distance from the stop loss level to the current market price in pips.

takeProfitOffset
number <float> (Take Profit Offset)
Example: "0.01"

Take profit offset . Distance from the take profit level to the current market price in pips.

trailingStop
number <float> (Trailing Stop)
Example: "0.25"

Trailing stop - currently not supported - but will be in the future. Distance from the stop loss level to the current market price in pips.

orderType
required
string (OrderType)
Enum: "" "1" "2" "3" "4"
Example: "LIMIT"
enumNames: ["INVALID","MARKET","LIMIT","STOP","STOP_LIMIT"]

Order type - order type enum

  • "" - INVALID - Invalid order type
  • "1" - "MARKET" - Market order type
  • "2" - "LIMIT" - Limit order type
  • "3" - "STOP" - Stop order type
  • "4" - "STOP_LIMIT" - Stop limit order type
duration
required
string (DurationType)
Enum: "" "0" "1"
Example: "1"
enumNames: ["INVALID","DAY","GOOD_TILL_CANCEL"]

Order duration - order duration enum

  • "0" - DAY
  • "1" - GOOD_TILL_CANCEL
  • "" - INVALID
waitForOrderId
boolean (Wait for Order ID)
Default: true
Example: "true"

If true (default), the response will wait max. 10 sec. for orderId from exchange. If false, the response will not contain the order id of the submitted order. Order will be submitted to the exchange but the response will not contain the order id of the submitted order - it will be assigned by the exchange, and can be retrieved later using the /order/{accountId}/toorderid/{strategyId}.

Responses

Request samples

Content type
application/json
{
  • "accountId": "5123345",
  • "exchSym": "XCME:6E.U16",
  • "side": "BUY",
  • "quantity": 1,
  • "limitPrice": 2000,
  • "stopPrice": 2000,
  • "stopLoss": 2000,
  • "takeProfit": 2000,
  • "stopLossOffset": 25,
  • "takeProfitOffset": 0.01,
  • "trailingStop": 0.25,
  • "orderType": "LIMIT",
  • "duration": "1",
  • "waitForOrderId": true
}

Response samples

Content type
application/json
{
  • "orderId": "5123345-1234567890",
  • "strategyId": 1234567890,
  • "status": "OK",
  • "message": "OK"
}

Get order ID from strategy ID

Get order ID from strategy ID

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

strategyId
required
integer <long> (StrategyId)
Example: 1234567890

Strategy ID

Responses

Response samples

Content type
application/json
{
  • "orderId": "5123345-1234567890",
  • "strategyId": 1234567890,
  • "status": "OK",
  • "message": "OK"
}

Get strategy ID from order ID

Get strategy ID from order ID

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

orderId
required
string (OrderId) <= 50 characters ^.*$
Example: 5123345-1234567890

Order ID

Responses

Response samples

Content type
application/json
{
  • "orderId": "5123345-1234567890",
  • "strategyId": 1234567890,
  • "status": "OK",
  • "message": "OK"
}

Update order

This message updates the order for the given account. The response will contain the order id of the updated order.



Very Important:
For Bracket Orders: The quantity is the same for all orders in the bracket.
For Stop Loss Orders: The stop loss price is the price at which the order will be triggered.
For Take Profit Orders: The take profit price is the price at which the order will be triggered.
For Stop Loss and Take Profit Orders: The stop loss price is the price at which the order will be triggered. The take profit price is the price at which the order will be triggered.
For Stop Loss Offset: Stop loss offset - if set, stop loss price is calculated as stopPrice - stopLossOffset.
For Take Profit Offset: Take profit offset - if set, take profit price is calculated as stopPrice + takeProfitOffset.
For Trailing Stop: Trailing stop - currently not supported - but will be in the future.
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

orderId
required
string (OrderId) <= 50 characters ^.*$
Example: 5123345-1234567890

Order ID

Request Body schema: application/json
orderId
required
string (Order ID)
Example: "1234567890"

The server ID for the order, and is returned in all responses. Required for cancel and replace orders,

quantity
required
integer <int32> (Quantity)
Example: "1000"

The quantity of the instrument to be traded. For bracket orders, the quantity can't be changed. If you want to change the quantity of a bracket order, you must cancel the bracket order and create a new one. For all other orders, the quantity can be changed.

limitPrice
number <double> (Price)
Example: "2000"

Price - price class

stopPrice
number <double> (Price)
Example: "2000"

Price - price class

stopLoss
number <double> (Price)
Example: "2000"

Price - price class

takeProfit
number <double> (Price)
Example: "2000"

Price - price class

stopLossOffset
number <float> (Stop Loss Offset)
Example: "25"

Stop loss offset. Distance from the stop loss level to the current market price in pips.

takeProfitOffset
number <float> (Take Profit Offset)
Example: "0.01"

Take profit offset. Distance from the take profit level to the current market price in pips.

trailingStop
number <float> (Trailing Stop)
Example: "25"

Trailing stop - currently not supported - but will be in the future. Distance from the stop loss level to the current market price in pips.

Responses

Request samples

Content type
application/json
{
  • "orderId": "1234567890",
  • "quantity": 1000,
  • "limitPrice": 2000,
  • "stopPrice": 2000,
  • "stopLoss": 2000,
  • "takeProfit": 2000,
  • "stopLossOffset": 25,
  • "takeProfitOffset": 0.01,
  • "trailingStop": 25
}

Response samples

Content type
application/json
{
  • "orders": [
    • {
      • "orderId": "5123345-1234567890",
      • "strategyId": 1234567890,
      • "parentOrderId": "5123345-1234567890",
      • "accountId": "5123345",
      • "exchSym": "XCME:6E.U16",
      • "status": "ANY",
      • "side": "BUY",
      • "quantity": 1000,
      • "limitPrice": 1000,
      • "stopPrice": 1000,
      • "orderType": "LIMIT",
      • "duration": "1",
      • "fillQuantity": 1000,
      • "fillPrice": 1000,
      • "fillDate": "2016-08-01T00:00:00Z",
      • "childOrders": [
        • "5123345-1234567890"
        ],
      • "orderError": {
        • "errorCode": 1234567890,
        • "errorText": "Error text"
        }
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get orders

Get orders for the account. The order status can be used to filter the orders.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

orderStatus
required
string (OrderStatusType)
Enum: "ANY" "INVALID" "SUBMITTED" "NEW" "PARTIALLY_FILLED" "FILLED" "DONE_FOR_DAY" "CANCELLED" "REPLACED" "PENDING_CANCEL" "STOPPED" "REJECTED" "SUSPENDED" "PENDING_NEW" "CALCULATED" "EXPIRED" "ACCEPTED_FOR_BIDDING" "PENDING_REPLACE" "CANCEL_REJECTED" "ORDER_NOT_FOUND" … 3 more
enumNames: ["ANY","INVALID","SUBMITTED","NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELLED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BIDDING","PENDING_REPLACE","CANCEL_REJECTED","ORDER_NOT_FOUND","QUEUED_NEW","QUEUED_CANCEL","COMPLETE"]

Order status

Responses

Response samples

Content type
application/json
{
  • "orders": [
    • {
      • "orderId": "5123345-1234567890",
      • "strategyId": 1234567890,
      • "parentOrderId": "5123345-1234567890",
      • "accountId": "5123345",
      • "exchSym": "XCME:6E.U16",
      • "status": "ANY",
      • "side": "BUY",
      • "quantity": 1000,
      • "limitPrice": 1000,
      • "stopPrice": 1000,
      • "orderType": "LIMIT",
      • "duration": "1",
      • "fillQuantity": 1000,
      • "fillPrice": 1000,
      • "fillDate": "2016-08-01T00:00:00Z",
      • "childOrders": [
        • "5123345-1234567890"
        ],
      • "orderError": {
        • "errorCode": 1234567890,
        • "errorText": "Error text"
        }
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Cancel order

This message cancels the order with the given order id. The response will contain the order id of the cancelled order.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

orderId
required
string (OrderId) <= 50 characters ^.*$
Example: 5123345-1234567890

Order ID

Responses

Response samples

Content type
application/json
{
  • "orders": [
    • {
      • "orderId": "5123345-1234567890",
      • "strategyId": 1234567890,
      • "parentOrderId": "5123345-1234567890",
      • "accountId": "5123345",
      • "exchSym": "XCME:6E.U16",
      • "status": "ANY",
      • "side": "BUY",
      • "quantity": 1000,
      • "limitPrice": 1000,
      • "stopPrice": 1000,
      • "orderType": "LIMIT",
      • "duration": "1",
      • "fillQuantity": 1000,
      • "fillPrice": 1000,
      • "fillDate": "2016-08-01T00:00:00Z",
      • "childOrders": [
        • "5123345-1234567890"
        ],
      • "orderError": {
        • "errorCode": 1234567890,
        • "errorText": "Error text"
        }
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Cancel multiple orders

An api for cancelling multiple orders. New orders and replaces must be submitted via SUBMIT_ORDER. The response will contain a list of order ids of the cancelled orders.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

Request Body schema: application/json
accountId
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: "5123345"

Account ID - account ID class

orderIds
Array of strings (Order IDs) <= 1000 items [^.*$]
Example: "1234567890,1234567891"

Responses

Request samples

Content type
application/json
[
  • {
    • "accountId": "5123345",
    • "orderIds": [
      • "1234567890",
      • "1234567891"
      ]
    }
]

Response samples

Content type
application/json
{
  • "orders": [
    • {
      • "orderId": "5123345-1234567890",
      • "strategyId": 1234567890,
      • "parentOrderId": "5123345-1234567890",
      • "accountId": "5123345",
      • "exchSym": "XCME:6E.U16",
      • "status": "ANY",
      • "side": "BUY",
      • "quantity": 1000,
      • "limitPrice": 1000,
      • "stopPrice": 1000,
      • "orderType": "LIMIT",
      • "duration": "1",
      • "fillQuantity": 1000,
      • "fillPrice": 1000,
      • "fillDate": "2016-08-01T00:00:00Z",
      • "childOrders": [
        • "5123345-1234567890"
        ],
      • "orderError": {
        • "errorCode": 1234567890,
        • "errorText": "Error text"
        }
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Get orders fills

Get orders fills for the account.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
accountId
required
string (AccountId) <= 10 characters ^[0-9]{5,10}$
Example: 5123345

Account ID

Responses

Response samples

Content type
application/json
{
  • "fills": [
    • {
      • "orderId": "5123345-1234567890",
      • "strategyId": 1234567890,
      • "accountId": "5123345",
      • "exchSym": "XCME:6E.U16",
      • "status": "ANY",
      • "side": "BUY",
      • "quantity": 1000,
      • "price": 1000,
      • "fillQuantity": 1000,
      • "fillTotalQuantity": 1000,
      • "fillPrice": 1000,
      • "avgFillPrice": 1000,
      • "fillDate": "2016-08-01T00:00:00Z",
      • "timeOrderEvent": 123123123123,
      • "orderUpdateId": "10336761658263818775-134"
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Simulated Trader/Account

Create simulated trader

Create a simulated trader - for each trader created in this endpoint you can link one or more accounts to the trader. The response will contain the trader id.
After calling this endpoint, you should call /simulateAccountAdd to assign one or more accounts to it. Please note that the trader id is not the same as the account id.



The template is used to create the simulated trader. Enterprise API users should request their specific template IDs.

  • EVAL50 - template with $50000 as starting ballance (along with the other parameters tied to this template)
  • EVAL100 - template with $100000 as starting ballance
  • EVAL150 - template with $150000 as starting ballance

Endpoint for authenticated Enterprise API users. This is demo environment only. For live environment and accounts without permission, the response will be 403 Forbidden.
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
Request Body schema: application/json
FirstName
required
string <= 50 characters
Example: "John"

First name of the simulated trader

LastName
required
string <= 50 characters
Example: "Doe"

Last name of the simulated trader

Address1
required
string <= 100 characters
Example: "123 Main St"

Address line 1 of the simulated trader

Address2
string <= 100 characters
Example: "Apt 4B"

Address line 2 of the simulated trader

City
required
string <= 50 characters
Example: "New York"

City of the simulated trader

State
required
string <= 50 characters
Example: "NY"

State of the simulated trader

Country
required
string <= 50 characters
Example: "USA"

Country of the simulated trader

ZipCode
required
string <= 20 characters
Example: "10001"

Zip code of the simulated trader

Phone
required
string <= 20 characters
Example: "+1-555-555-5555"

Phone number of the simulated trader

Email
required
string <= 100 characters
Example: "email@email.com"

Email address of the simulated trader

Password
required
string <= 50 characters
Example: "password123"

Password of the simulated trader

TemplateId
string <= 50 characters
Example: "XAP50"

Template with which the account is created.

Responses

Request samples

Content type
application/json
{
  • "FirstName": "John",
  • "LastName": "Doe",
  • "Address1": "123 Main St",
  • "Address2": "Apt 4B",
  • "City": "New York",
  • "State": "NY",
  • "Country": "USA",
  • "ZipCode": "10001",
  • "Phone": "+1-555-555-5555",
  • "Email": "email@email.com",
  • "Password": "password123",
  • "TemplateId": "XAP50"
}

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "string",
  • "TraderId": "ABC51380561"
}

Create simulated account

Add new simulated account to an existing simulated trader. The response will contain the account id of the created account. Please note that the account id is not the same as the trader id. Password used for the account is the same as the password used for the trader.


Endpoint for authenticated Enterprise clients only on demo environment. For live environment and accounts without permission, the response will be 403 Forbidden.
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
Request Body schema: application/json
TraderId
required
string <= 50 characters
Example: "123456"

Trader ID of the simulated trader

Password
required
string <= 50 characters
Example: "password123"

Password of the simulated trader used to login to the simulated account - the same password is used for all accounts of the simulated trader.

TemplateId
required
string <= 50 characters

Template with which the account is created.

Responses

Request samples

Content type
application/json
{
  • "TraderId": "123456",
  • "Password": "password123",
  • "TemplateId": "string"
}

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "string",
  • "AccountId": "123456"
}

Simulated account reset

Simulated account reset. The response is simple HTTP 200 OK. You can reset a simulated account to the initial starting balance and with no trades or positions.


Endpoint for authenticated Enterprise users only on demo environment. For live environment and account without permission, the response will be 403 Forbidden.
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
Request Body schema: application/json
AccountId
required
string <= 50 characters

Account number.

StartingBalance
required
number <int32> [ 1 .. 9999 ]
Default: 50
Example: "50"

Starting balance in thousand dollars

Responses

Request samples

Content type
application/json
{
  • "AccountId": "string",
  • "StartingBalance": 50
}

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "string"
}

Simulated account expire

Simulated account expire. The response is simple HTTP 200 OK.


Endpoint for authenticated Enterprise users only on demo environment. For live environment and account without permission, the response will be 403 Forbidden.
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
Request Body schema: application/json
AccountId
required
string <= 50 characters

Account number.

Responses

Request samples

Content type
application/json
{
  • "AccountId": "string"
}

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "string"
}

Streaming

Create a streamId

Create a streamId for the client to use in /stream/{streamId} endpoint. The streamId will be used to subscribe to quotes/depth/trades. Using the same stream, client will receive data for:

  • Quotes - must subscribe to quotes
  • Depths - must subscribe to depth
  • Trades - must subscribe to trades
  • Trade Bars - must subscribe to trade bars
  • Tick Bars - must subscribe to tick bars
  • Time Bars - must subscribe to time bars
  • Volume Bars - must subscribe to volume bars

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication

Responses

Response samples

Content type
application/json
{
  • "streamId": "123e4567-e89b-12d3-a456-426614174000",
  • "status": "OK",
  • "message": "string"
}

Websocket stream of data

Opening Websocket stream of data

Before calling this endpoint, the client must create a streamId using the getStreamId endpoint. Using other endpoints, the client can subscribe to quotes, depth, trades, and so on. Endpoint will return a websocket stream of data to the client.

After close

Each time websocket connection is closed, the client must call getStreamId endpoint to create a new streamId.

Data structure

Depend on active subscriptions, the client will receive data in the following fields:

- Quotes:
q - if there is active subscription to quote for instruments - the client will receive the quotes for them every time is updated in the 'q' field.

- Depths:
d - if there is active subscription to depth for instruments - the client will receive the actual depth for instruments every time is updated in the 'd' field.

- Trades:
tr - if there is active subscription to trades - the client will receive the trades in the 'tr' field.

- Trade Bar:
tb - if there is active subscription to trade bars - the client will receive the trade bars in the 'tb' field.

- Orders:
o - if there is update on any order - the client will receive the orders updates or new order created on account in the 'o' field.

- Order Fills:
f - if there is fill on order - the client will receive the order fills in the 'f' field.

- Balances:
b - if there is change on account balance - the client will receive the balance update in the 'b' field.

- Positions:
ps - if there is on account positions - the client will receive the position update in the 'ps' field.

- Trade Bars:
tb - if there is active subscription to trade bars - the client will receive the trade bars in the 'tb' field.

- Tick Bars:
tc - if there is active subscription to tick bars - the client will receive the tick bars in the 'tc' field.

- Time Bars:
ti - if there is active subscription to time bars - the client will receive the time bars in the 'ti' field.

- Volume Bars:
vb - if there is active subscription to volume bars - the client will receive the volume bars in the 'vb' field.

- Ping:
p - ping message to keep the connection alive will be sent every 5 seconds

- Reset:
r - reset message will be sent when the client account is changed. For example, his personal information, account settings, etc. This message will be sent to the client when trading day will be closed/opened.
      {
        "r": {
          "status": "INFO",
          "message": "Account changed"
        }
      }
      

How to work with the stream

For example, if the client has active subscriptions to quotes and depth for the instrument, the client will receive the quotes in the 'q' field and the depth in the 'd' field. If the client has active subscriptions to trades, the client will receive the trades in the 'tr' field.
To work with the stream, the client must create stream ID using the Create streamId endpoint. Then open a websocket connection to the stream endpoint with the stream ID as a parameter.
Next the client can subscribe to the data using one all of endpoints:

Important:

For this endpoint, the client must use the websocket protocol. Because not all websocket clients support to send header authentication you can send token as query parameter.
So request url will look like:
wss://demo.ironbeamapi.com/v1/stream/{streamId}?token={token}

stream: true
streaming-endpoint: true
Authorizations:
API Key: TokenAuthentication
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

Responses

Response samples

Content type
application/json
{
  • "p": {
    • "ping": "ping"
    },
  • "q": [
    • {
      • "s": "XCME:6E.U16",
      • "l": 1000,
      • "sz": 1000,
      • "ch": "0.00425",
      • "op": 2000,
      • "hi": 2000,
      • "lo": 2000,
      • "ags": 0,
      • "td": 255,
      • "stt": 2000,
      • "stts": 20160801,
      • "sttst": 232342342344,
      • "pstt": 2000,
      • "pstts": 20160801,
      • "sttch": 2000,
      • "hb": 2000,
      • "la": 2000,
      • "b": 2000,
      • "bt": 232342342344,
      • "bs": 3,
      • "ibc": 3,
      • "ibs": 3,
      • "a": 2000,
      • "at": 232342342344,
      • "as": 3,
      • "ias": 3,
      • "iac": 3,
      • "tt": 232342342344,
      • "tdt": 20160801,
      • "secs": "OPEN",
      • "sdt": 20160801,
      • "oi": 1000,
      • "tv": 1000,
      • "bv": 1000,
      • "swv": 1000,
      • "pv": 1000
      }
    ],
  • "tb": [
    • {
      • "t": 1234567890,
      • "o": 2000,
      • "h": 2000,
      • "l": 2000,
      • "c": 2000,
      • "v": 2000,
      • "tc": 1234567890,
      • "d": 2000,
      • "i": "TradeBar123123123123"
      }
    ],
  • "tc": [
    • {
      • "t": 1234567890,
      • "o": 2000,
      • "h": 2000,
      • "l": 2000,
      • "c": 2000,
      • "v": 2000,
      • "tc": 1234567890,
      • "d": 2000,
      • "i": "TimeBar123123123123"
      }
    ],
  • "ti": [
    • {
      • "t": 1234567890,
      • "o": 2000,
      • "h": 2000,
      • "l": 2000,
      • "c": 2000,
      • "v": 2000,
      • "tc": 1234567890,
      • "d": 2000,
      • "i": "TimeBar123123123123"
      }
    ],
  • "vb": [
    • {
      • "t": 1234567890,
      • "o": 2000,
      • "h": 2000,
      • "l": 2000,
      • "c": 2000,
      • "v": 2000,
      • "tc": 1234567890,
      • "d": 2000,
      • "i": "TradeBar123123123123"
      }
    ],
  • "ps": [
    • {
      • "a": "5123345",
      • "cc": "USD",
      • "s": "XCME:6E.U16",
      • "pId": "10198961658263821681-101",
      • "q": 1000,
      • "p": 2000,
      • "do": 20160801,
      • "sd": "LONG",
      • "upl": 1000
      }
    ],
  • "f": [
    • {
      • "oid": "5123345-1234567890",
      • "sid": 1234567890,
      • "a": "5123345",
      • "s": "XCME:6E.U16",
      • "st": "ANY",
      • "sd": "BUY",
      • "q": 1000,
      • "p": 1000,
      • "fq": 1000,
      • "ftq": 1000,
      • "fp": 1000,
      • "afp": 1000,
      • "fd": "2016-08-01T00:00:00Z",
      • "t": 123123123123,
      • "ouid": "10336761658263818775-134"
      }
    ],
  • "o": [
    • {
      • "oid": "5123345-1234567890",
      • "sid": 1234567890,
      • "poid": "5123345-1234567890",
      • "a": "5123345",
      • "s": "XCME:6E.U16",
      • "st": "ANY",
      • "sd": "BUY",
      • "q": 1000,
      • "lp": 1000,
      • "sp": 1000,
      • "ot": "LIMIT",
      • "dr": "1",
      • "fq": 1000,
      • "fp": 1000,
      • "fd": "2016-08-01T00:00:00Z",
      • "cor": [
        • "5123345-1234567890"
        ],
      • "err": {
        • "errorCode": 1234567890,
        • "errorText": "Error text"
        }
      }
    ],
  • "d": [
    • {
      • "s": "XCME:6E.U16",
      • "b": [
        • {
          }
        ],
      • "a": [
        • {
          }
        ]
      }
    ],
  • "tr": [
    • {
      • "s": "XCME:ES.U16",
      • "p": 1.13535,
      • "ch": 0.0001,
      • "sz": 1,
      • "sq": 12132123,
      • "st": 1234567890,
      • "td": "INVALID",
      • "as": 0,
      • "tdt": "20200101",
      • "tid": 2131220200101,
      • "is": true,
      • "clx": true,
      • "spt": "INVALID",
      • "ist": "INVALID",
      • "bt": "INVALID"
      }
    ],
  • "b": {
    • "a": "5123345",
    • "cc": "USD",
    • "cb": 1000,
    • "ote": 1000,
    • "te": 1000,
    • "cba": 1000,
    • "cbta": 1000,
    • "nl": 1000,
    • "nla": 1000,
    • "bt": "CURRENT_OPEN",
    • "dc": 365,
    • "mi": {
      • "a": "5123345",
      • "cc": "USD",
      • "mo": {
        • "me": "string",
        • "es": "string",
        • "irm": 1000,
        • "mrm": 1000,
        • "itm": 1000,
        • "mtm": 1000,
        • "ie": true,
        • "t": 0
        },
      • "mow": {
        • "me": "string",
        • "es": "string",
        • "irm": 1000,
        • "mrm": 1000,
        • "itm": 1000,
        • "mtm": 1000,
        • "ie": true,
        • "t": 0
        },
      • "mowi": {
        • "me": "string",
        • "es": "string",
        • "irm": 1000,
        • "mrm": 1000,
        • "itm": 1000,
        • "mtm": 1000,
        • "ie": true,
        • "t": 0
        }
      }
    },
  • "i": [
    • {
      • "n": "Ind123124312",
      • "fi": 1,
      • "v": [
        • [
          ],
        • [
          ]
        ]
      }
    ],
  • "r": {
    • "status": "OK",
    • "message": "string"
    }
}

Subscribe to quotes

Subscribe to quotes for the instruments. Before subscribing to quotes, the client must create a stream using the /stream endpoint. Maximum number of instruments to subscribe is 10 per stream. If the client wants to change the list of instruments, the client must call this endpoint again with the new list of instruments.

stream: true
streaming-endpoint: true
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

query Parameters
symbols
required
Array of strings (Symbol) <= 10 items [^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$]
Example: symbols=XCME:ES.U16,XCME:6E.U16,XCME:NQ.U16

Comma separated list of symbols

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "OK"
}

Subscribe to depths

Subscribe to depths for the instruments. Before subscribing to depths, the client must create a stream using the /stream endpoint. Maximum number of instruments to subscribe is 10 per stream. If the client wants to change the list of symbols, the client must call this endpoint again with the new list of instruments.

stream: true
streaming-endpoint: true
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

query Parameters
symbols
required
Array of strings (Symbol) <= 10 items [^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$]
Example: symbols=XCME:ES.U16,XCME:6E.U16,XCME:NQ.U16

Comma separated list of symbols

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "OK"
}

Subscribe to trades

Subscribe to trades for the instruments. Before subscribing to trades, the client must create a stream using the /stream endpoint. Maximum number of instruments to subscribe is 10 per stream. If the client wants to change the list of instruments, the client must call this endpoint again with the new list of instruments.

stream: true
streaming-endpoint: true
Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

query Parameters
symbols
required
Array of strings (Symbol) <= 10 items [^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$]
Example: symbols=XCME:ES.U16,XCME:6E.U16,XCME:NQ.U16

Comma separated list of symbols

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "OK"
}

Indicator

Unsubscribe from indicator

Unsubscribe from indicator values. The response will contain the status of the unsubscription. Indicator must be created before unsubscribing from an indicator.

Authorizations:
API Key: TokenAuthenticationHTTP: PasswordBearer
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

indicatorId
required
string (IndicatorId) <= 100 characters
Example: TradeBars_638639418687259084

Indicator ID

Responses

Response samples

Content type
application/json
{
  • "status": "OK",
  • "message": "OK"
}

Subscribe to Tick Bars indicator

Subscribe to Tick Bars indicator values. The response will contain the stream id of the created subscription.
Stream must be created before subscribing to an indicator. A tick bar is constructed from a sequence of consecutive trades representing all trades that occurred during a fixed span of time, or that is prematurely terminated when the underlying symbol stops trading.
The bar with date-time t and bar period bp includes all trades at times >= t - bp and < t. We currently support N-minute, N-hour, and 1-day bars.

Authorizations:
API Key: TokenAuthenticationHTTP: PasswordBearer
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

Request Body schema: application/json
symbol
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: "XCME:6E.U16"

Symbol - symbol class

period
integer <int32>
Example: "1"

Period of entry data for the trade bars.

barType
string (BarType)
Enum: "DAILY" "HOUR" "MINUTE" "TICK"

Bar type

  • "DAILY" - Daily bar
  • "HOUR" - Hourly bar
  • "MINUTE" - Minute bar
  • "TICK" - Tick bar
loadSize
integer <int32>
Example: "100"

Load size - initial load size of the trade bars values.

Responses

Request samples

Content type
application/json
{
  • "symbol": "XCME:6E.U16",
  • "period": 1,
  • "barType": "DAILY",
  • "loadSize": 100
}

Response samples

Content type
application/json
{
  • "indicatorId": "TradeBars_638639418687259084",
  • "valueNames": [
    • "date",
    • "open",
    • "close",
    • "high",
    • "low",
    • "volume",
    • "tradeCount",
    • "delta",
    • "value"
    ],
  • "valueTypes": [
    • "date",
    • "number",
    • "string",
    • "number",
    • "number",
    • "number",
    • "number",
    • "number",
    • "number"
    ],
  • "status": "OK",
  • "message": "string"
}

Subscribe to Trade Bars indicator

Subscribe to Trade Bars indicator values. The response will contain the stream id of the created subscription.
Stream must be created before subscribing to an indicator.

Authorizations:
API Key: TokenAuthenticationHTTP: PasswordBearer
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

Request Body schema: application/json
symbol
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: "XCME:6E.U16"

Symbol - symbol class

period
integer <int32>
Example: "1"

Period of entry data for the trade bars.

barType
string (BarType)
Enum: "DAILY" "HOUR" "MINUTE" "TICK"

Bar type

  • "DAILY" - Daily bar
  • "HOUR" - Hourly bar
  • "MINUTE" - Minute bar
  • "TICK" - Tick bar
loadSize
integer <int32>
Example: "100"

Load size - initial load size of the trade bars values.

Responses

Request samples

Content type
application/json
{
  • "symbol": "XCME:6E.U16",
  • "period": 1,
  • "barType": "DAILY",
  • "loadSize": 100
}

Response samples

Content type
application/json
{
  • "indicatorId": "TradeBars_638639418687259084",
  • "valueNames": [
    • "date",
    • "open",
    • "close",
    • "high",
    • "low",
    • "volume",
    • "tradeCount",
    • "delta",
    • "value"
    ],
  • "valueTypes": [
    • "date",
    • "number",
    • "string",
    • "number",
    • "number",
    • "number",
    • "number",
    • "number",
    • "number"
    ],
  • "status": "OK",
  • "message": "string"
}

Subscribe to Time Bars indicator

Subscribe to Time Bars indicator values. The response will contain the stream id of the created subscription.
Stream must be created before subscribing to an indicator. A time bar is constructed from a sequence of consecutive trades representing all trades that occurred during a fixed span of time, or that is prematurely terminated when the underlying symbol stops trading.
The bar with date-time t and bar period bp includes all trades at times >= t - bp and < t. We currently support N-minute, N-hour, and 1-day bars.

Authorizations:
API Key: TokenAuthenticationHTTP: PasswordBearer
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

Request Body schema: application/json
symbol
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: "XCME:6E.U16"

Symbol - symbol class

period
integer <int32>
Example: "1"

Period of entry data for the trade bars.

barType
string (BarType)
Enum: "DAILY" "HOUR" "MINUTE" "TICK"

Bar type

  • "DAILY" - Daily bar
  • "HOUR" - Hourly bar
  • "MINUTE" - Minute bar
  • "TICK" - Tick bar
loadSize
integer <int32>
Example: "100"

Load size - initial load size of the trade bars values.

Responses

Request samples

Content type
application/json
{
  • "symbol": "XCME:6E.U16",
  • "period": 1,
  • "barType": "DAILY",
  • "loadSize": 100
}

Response samples

Content type
application/json
{
  • "indicatorId": "TradeBars_638639418687259084",
  • "valueNames": [
    • "date",
    • "open",
    • "close",
    • "high",
    • "low",
    • "volume",
    • "tradeCount",
    • "delta",
    • "value"
    ],
  • "valueTypes": [
    • "date",
    • "number",
    • "string",
    • "number",
    • "number",
    • "number",
    • "number",
    • "number",
    • "number"
    ],
  • "status": "OK",
  • "message": "string"
}

Subscribe to Volume Bars indicator

Subscribe to Volume Bars indicator values. The response will contain the stream id of the created subscription.
Stream must be created before subscribing to an indicator. An N-volume bar is constructed from a sequence of consecutive trades whose total volume equals N, or which is prematurely terminated when the underlying symbol stops trading. If necessary, a trade is split among multiple volume bars.

Authorizations:
API Key: TokenAuthenticationHTTP: PasswordBearer
path Parameters
streamId
required
string <uuid> (StreamSessionId)
Example: 123e4567-e89b-12d3-a456-426614174000

Stream ID

Request Body schema: application/json
symbol
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: "XCME:6E.U16"

Symbol - symbol class

period
integer <int32>
Example: "1"

Period of entry data for the trade bars.

barType
string (BarType)
Enum: "DAILY" "HOUR" "MINUTE" "TICK"

Bar type

  • "DAILY" - Daily bar
  • "HOUR" - Hourly bar
  • "MINUTE" - Minute bar
  • "TICK" - Tick bar
loadSize
integer <int32>
Example: "100"

Load size - initial load size of the trade bars values.

Responses

Request samples

Content type
application/json
{
  • "symbol": "XCME:6E.U16",
  • "period": 1,
  • "barType": "DAILY",
  • "loadSize": 100
}

Response samples

Content type
application/json
{
  • "indicatorId": "TradeBars_638639418687259084",
  • "valueNames": [
    • "date",
    • "open",
    • "close",
    • "high",
    • "low",
    • "volume",
    • "tradeCount",
    • "delta",
    • "value"
    ],
  • "valueTypes": [
    • "date",
    • "number",
    • "string",
    • "number",
    • "number",
    • "number",
    • "number",
    • "number",
    • "number"
    ],
  • "status": "OK",
  • "message": "string"
}