IronbeamAPI (1.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

Authorization

Authorize to use the API

Authorize to use the API. The username is the account ID and the password is the API Key. The API Key is used as a password in the request.

Example call in Python (without generated client library):

import requests

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

payload = {
  "username": account_id,
  "password": "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
required
string (Password) <= 100 characters ^.*$
Example: "password"

Responses

Request samples

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

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

Get trader info

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": [
    • {
      • "symbol": "ES.M24.P5200",
      • "maturityMonth": "MAR",
      • "maturityYear": 2024,
      • "expiration": 1712001600000,
      • "strike": 5200,
      • "minStrike": 5000,
      • "maxStrike": 6000,
      • "description": "E-MINI S&P 500 OPTIONS"
      }
    ],
  • "status": "OK",
  • "message": "string"
}

Search for spreads

Retrieves the list of spreads.

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

Exchange

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

Symbol or Group

Responses

Response samples

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

Search for spreads by legs

Retrieves the list of spreads.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
Request Body schema: application/json
required
Array of objects (Exchange Symbol Legs) <= 100 items
Array (<= 100 items)
symbol
string (Symbol) <= 21 characters ^[A-Z0-9]{1,10}:[A-Z0-9]{1,10}$
Example: "XCME:6E.U16"

Symbol - symbol class

side
string (Side)
Enum: "BID" "ASK"
Example: "BID"

Side - side enum

qty
number <double> (Quantity)

Responses

Request samples

Content type
application/json
{
  • "exchangeSymbolLegs": [
    • {
      • "symbol": "XCME:MES.U23",
      • "side": "BUY",
      • "qty": 100000
      },
    • {
      • "symbol": "XCME:M6E.U23",
      • "side": "SELL",
      • "qty": 100000
      }
    ]
}

Response samples

Content type
application/json
{
  • "symbols": [
    • "XCME:6E.U16"
    ],
  • "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

Get 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"
}

Get positions

This message retrieves the positions for the given account. The response will contain a list of positions. The list of positions 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
{
  • "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
      }
    ]
}

Get risk

Currently the only risk information returned for the user is liquidation value. This value represents the net liquidation price at which the user's account will be auto-liquidated. This value will be set to null, if this feature is not enabled. Risks contains a list of liquidation value, one for each regCode/CurrencyCode combination for the account (i.e. subaccountId). Typically an account will only have one of these combinations.

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"
}

Get fills for the given account

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

query Parameters
sendPrior
boolean
Example: sendPrior=true

If true, the server will send all fills. If false, the server will send only new fills from now.

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": 2000,
      • "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}.

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

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

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.

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

Order type - order type enum

duration
required
string (DurationType)
Enum: "" "0" "1"
Example: "GOOD_TILL_CANCEL"
enumNames: ["INVALID","DAY","GOOD_TILL_CANCEL"]

Order duration - order duration enum

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,
  • "trailingStop": 25,
  • "orderType": "LIMIT",
  • "duration": "GOOD_TILL_CANCEL",
  • "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.

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

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,
  • "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": "GOOD_TILL_CANCEL",
      • "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": "GOOD_TILL_CANCEL",
      • "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": "GOOD_TILL_CANCEL",
      • "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": "GOOD_TILL_CANCEL",
      • "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"
}

Demo

Reset demo account

Reset the demo account. The response will contain the account id of the reset account.
Endpoint used only for demo accounts, for real accounts, the response will be 403 Forbidden.

Authorizations:
HTTP: PasswordBearerAPI Key: TokenAuthentication
Request Body schema: application/json
accountId
string (Account ID) <= 20 characters ^[0-9]{1,20}$
Example: "5123345"

Responses

Request samples

Content type
application/json
{
  • "accountId": 5123345
}

Response samples

Content type
application/json
{
  • "accountId": "5123345",
  • "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

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.

- 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.


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 getStreamId 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://restdev.api.ironbeam.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

query Parameters
token
string <= 1024 characters

Authorization token - The token is used to authenticate the user and will be used in the Authorization header/query for all other requests.

Responses

Response samples

Content type
application/json
{
  • "p": {
    • "ping": "ping"
    },
  • "q": [
    • {
      • "s": "XCME:6E.U16",
      • "l": 1000,
      • "sz": 1000,
      • "ch": 2000,
      • "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
      }
    ],
  • "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": "GOOD_TILL_CANCEL",
      • "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
        }
      }
    },
  • "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"
}