JSON Protocol

Requests / Responses

1. Version - Authentication

After a wss connection is established this must be the first request for authentication. This request is done by the connector library if it is used.

Request

{
"RQT":"version", // Request Type
"VN":"1.00", // Version Number
"TK":"xxxxxxx" // Token for authentication, received from // the Extension frame
}

Response

  • Success:

    {
    "RQT":"version", // Request Type
    "RES":"OK" // Result
    }
    
  • Error:

    {
    "RQT":"version", // Request Type
    "RES":"ERR", // Result
    "MSG":"Wrong version of Javascript library!" // Error Message
    }
    

2. Register Quote

Registers the quote for the specified contract. If the registration succeeds, the streaming updates for this quote is started.

Request

{
"RQT":"register", // Request Type
"INS":"ESZ17" // Instrument
}

Response

  • Success:

    {
    "RQT":"register", // Request Type
    "RES":"OK", // Result
    "AK":"3800", // Ask
    "AT":"03/27/2017 - 18:09:42", // Ask Timestamp
    "AZ":"10", // Ask Size
    "BD":"3796", // Bid
    "BT":"03/27/2017 - 18:09:42", // Bid Timestamp
    "BZ":"5", // Bid Size
    "HG":"3905", // High
    "HT":"03/27/2017 - 15:19:13", // High Timestamp
    "INF": "T", // Info: Trading / Settled
    "INS":"ESZ17", // Instrument
    "LT":"03/27/2017 - 15:01:02", // Low Timestamp
    "LW":"3786", // Low
    "OI":"1223", // Open Interest
    "OP":"3800", // Open
    "CL":"", // Close
    "PS":"3798", // Previous Settlement
    "ST":"", // Settlement
    "TR":"3800", // Trade
    "TT":"03/27/2017 - 15:01:02", // Trade Timestamp
    "TZ":"2", // Trade Size
    "VL":"2995" // Volume
    }
    
  • Error:

    {
    "RQT":"register", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown contract!" // Error Message
    }
    

3. Unregister Quote

Unregisters the quote for the specified contract. This implies stopping the streaming updates for that quote.

Request

{
"RQT":"unregister", // Request Type
"INS":"ESZ17" // Instrument
}

Response

  • Success:

    {
    "RQT":"unregister", // Request Type
    "RES":"OK" // Result
    }
    
  • Error:

    {
    "RQT":"unregister", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown contract!" // Error Message
    }
    

4. Snapshot Quote

Snapshots the quote of the specified contract. This request does not start the streaming updates for this quote.

Request

{
"RQT":"snapshot", // Request Type
"INS":"ESZ17" // Instrument
}

Response

  • Success:

    {
    "RQT":"snapshot", // Request Type
    "RES":"OK", // Result
    "AK":"3800", // Ask
    "AT":"03/27/2017 - 18:09:42", // Ask Timestamp
    "AZ":"10", // Ask Size
    "BD":"3796", // Bid
    "BT":"03/27/2017 - 18:09:42", // Bid Timestamp
    "BZ":"5", // Bid Size
    "HG":"3905", // High
    "HT":"03/27/2017 - 15:19:13", // High Timestamp
    "INF": "T", // Info: Trading / Settled
    "INS":"ESZ17", // Instrument
    "LT":"03/27/2017 - 15:01:02", // Low Timestamp
    "LW":"3786", // Low
    "OI":"1223", // Open Interest
    "OP":"3800", // Open
    "CL":"", // Close
    "PS":"3798", // Previous Settlement
    "ST":"", // Settlement
    "TR":"3800", // Trade
    "TT":"03/27/2017 - 15:01:02", // Trade Timestamp
    "TZ":"2", // Trade Size
    "VL":"2995" // Volume
    }
    
  • Error:

    {
    "RQT":"snapshot", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown contract!" // Error Message
    }
    

5. Register to Order Entry

This request will tell the server to send the Order Entry events.

Request

{
"RQT":"oe_register", // Request Type
}

Response

  • Success:

    {
    "RQT":"oe_register", // Request Type
    "RES":"OK" // Result
    }
    
  • Error:

    {
    "RQT":"oe_register", // Request Type
    "RES":"ERR", // Result
    "MSG":"Cannot satisfy request!" // Error Message
    }
    

6. Unregister from Order Entry

This request will tell the server to stop sending the Order Entry events.

Request

{
"RQT":"oe_unregister", // Request Type
}

Response

  • Success:

    {
    "RQT":"oe_unregister", // Request Type
    "RES":"OK" // Result
    }
    
  • Error:

    {
    "RQT":"oe_unregister", // Request Type
    "RES":"ERR", // Result
    "MSG":"Cannot satisfy request!" // Error Message
    }
    

7. Accounts List

This request helps to fetch the list of available accounts. Each account is identified by a unique combination of provider with id.

Request

{
"RQT":"accounts", // Request Type
"PV":"PTS" // Opt:Provider
}

Response

  • Success:

    {
    "RQT":"accounts", // Request Type
    "RES":"OK", // Result,
    "ACCOUNTS":[
      {"AC": "acc12123141", // Account Id
       "PV": "QOR", // Provider Id
       "NM": "John Snow", // Account Name
       "RP": "Account 12132" // Account Repr
      },
      ...
    ]
    }
    
  • Error:

    {
    "RQT":"accounts", // Request Type
    "RES":"ERR", "RES":"ERR",
    "MSG":"Cannot satisfy request!" // Error Message
    }
    

8. Place Order

This request triggers the Place Order dialog, populated with the given data. The supported order types are: LMT, MKT, STOP, STL, STWL

Request

{
"RQT":"place_order", // Request Type
"PV":"QOR", // Provider
"AC":"acc2342425", // Account
"SD":"B", // Side: B / S
"QT":"5", // Quantity
"INS":"ESZ17", // Instrument
"TP":"LMT", // Order Type
"PR":"1300", // Price
"LM":"1300", // Limit
"LF":"DAY", // Lifetime: DAY, GTC, GTD(mm/dd/yyyy)
"CNF":"ON" // [Optional] DEF/ON/OFF
      // ON  -> The order will be placed only with user confirmation.
      // OFF -> The order will be placed without any confirmation.
      // DEF -> The order will be placed according to the Order Entry Properties setting.
      // Default value will be DEF if this parameter is missing
}

Response

  • Success:

    {
    "RQT":"place_order", // Request Type
    "RES":"OK", // Result
    "PV":"PTS", // Provider
    "AC":"4635", // Account
    "INS":"ESZ17", // Instrument
    "SD":"B", // Side
    "QT":"1", // Quantity
    "TP":"MKT", // Order Type
    "OD": "435626" // Order Id
    }
    
  • Error:

    {
    "RQT":"place_order", // Request Type
    "RES":"ERR", // Result
    "MSG":"Cannot place the order!" // Error Message
    }
    

9. Cancel / Replace Order

This request triggers the Cancel / Place Order dialog, populated with the given data. The supported order types are: LMT, MKT, STOP, STL, STWL

Request

{
"RQT":"replace_order", // Request Type
"PV":"QOR", // Provider
"AC":"acc2342425", // Account
"OD":"4232", // Order Id
"SD":"B", // Side: B / S
"QT":"5", // Quantity
"INS":"ESZ17", // Instrument
"TP":"LMT", // Order Type
"PR":"1300", // Price
"LM":"1300", // Limit
"LF":"GTD(06/23/2019)", // Lifetime: DAY, GTC, GTD(mm/dd/yyyy)
"CNF":"ON" // [Optional] DEF/ON/OFF
      // ON  -> The order will be placed only with user confirmation.
      // OFF -> The order will be placed without any confirmation.
      // DEF -> The order will be placed according to the Order Entry Properties setting.
      // Default value will be DEF if this parameter is missing
}

Response

  • Success:

    {
    "RQT":"replace_order", // Request Type
    "RES":"OK", // Result
    "OD":"435626" // Order Id
    }
    
  • Error:

    {
    "RQT":"replace_order", // Request Type
    "RES":"ERR", // Result
    "MSG":"Cannot find the order!" // Error Message
    }
    

10. Cancel Order

This request triggers the Cancel Order dialog.

Request

{
"RQT":"cancel_order", // Request Type
"PV":"QOR", // Provider
"AC":"acc2342425", // Account
"OD":"4232", // Order Id
"CNF":"ON" // [Optional] DEF/ON/OFF
      // ON  -> The order will be placed only with user confirmation.
      // OFF -> The order will be placed without any confirmation.
      // DEF -> The order will be placed according to the Order Entry Properties setting.
      // Default value will be DEF if this parameter is missing
}

Response

  • Success:

{
"RQT":"cancel_order", // Request Type
"RES":"OK" // Result
}
  • Error:

    {
    "RQT":"cancel_order", // Request Type
    "RES":"ERR", // Result
    "MSG":"Cannot find the order!" // Error Message
    }
    

11. Orders

With the help of this request we can fetch the working orders for a given account

Request

{
"RQT":"orders", // Request Type
"PV":"QOR", // Provider
"AC":"acc2342425" // Account
}

Response

  • Success:

    {
    "RQT":"orders", // Request Type
    "RES":"OK", // Result
    "PV":"QOR", // Provider
    "AC":"acc2342425", // Account
    "ORDERS":[
       {
         "OD":"435626", // Order Id
         "ST":"N", // Order Status
         "SD":"B", // Side: B / S
         "QT":"5", // Quantity
         "INS":"ESZ17", // Instrument
         "TP":"LMT", // Order Type
         "PR":"1300", // Price
         "LM":"1300" // Limit
       }
    ]
    }
    
  • Error:

    {
    "RQT":"orders", // Request Type
    "RES":"ERR", // Result
    "MSG":"Account not found!" // Error Message
    }
    

    For a comprehensive list of order statuses please see: Order Status

12. Positions

With the help of this request we can fetch the positions for a given account

Request

{
"RQT":"positions", // Request Type
"PV":"QOR", // Provider
"AC":"acc2342425" // Account
}

Response

  • Success:

    {
    "RQT":"positions", // Request Type
    "RES":"OK", // Result
    "PV":"QOR", // Provider
    "AC":"acc2342425", // Account
    "POSITIONS":[
       {
         "PD":"435626", // Position Id
         "SD":"L", // Side: L (long) / S (short)
         "QT":"5", // Quantity
         "INS":"ESZ17", // Instrument
         "PR":"1300" // Price
       },
       {
         "FD":"43", // Fill Id
         "OD":"423", // Order Id
         "SD":"S", // Side: L (long) / S (short)
         "QT":"1", // Quantity
         "INS":"ESZ17", // Instrument
         "PR":"1307" // Price
       }
    ]
    }
    
  • Error:

    {
    "RQT":"positions", // Request Type
    "RES":"ERR", // Result
    "MSG":"Account not found!" // Error Message
    }
    

13. Account Information

With the help of this request we can fetch the information’s for a given account

Request

{
"RQT":"account_information", // Request Type
"PV":"PTS", // Provider
"AC":"acc2342425", // Account
"CRR":"USD" // Currency - AUD, BRL, CAD, CHF, CLP, CNH, CNY, CZK, EUR, GBP,
            //  HKD, HUF, INR, ILS, JPY, KRW, MXN, MYR, NOK, NZD,
            //  PLN, RUB, SDG, SEK, SGD, TRY, TWD, USD, ZAR
}

Response

  • Success:

    {
    "RQT":"account_information", // Request Type
    "RES":"OK", // Result
    "PV":"PTS", // Provider
    "AC":"acc2342425", // Account
    "CRR":"USD", // Currency
    "TE":"true", // Trading Enabled - true/false
    "RME":"false", // Risk Monitoring Enabled - true/false
    "CIM":"6000", // Current Initial Margin
    "CIMO":"6000", // Current Initial Margin Including Orders
    "UIM":"6000", // Unfilled Initial Margin
    "CMM":"6000", // Current Maintenance Margin
    "CMMO":"6000", // Current Maintenance Margin Including Orders
    "UMM":"6000", // Unfilled Maintenance Margin
    "NOP":"6000", // Net Option Premium
    "LOP":"6000", // Long Option Premium
    "SOP":"6000", // Short Option Premium
    "NOV":"6000", // Net Option Value
    "LOV":"6000", // Long Option Value
    "SOV":"6000", // Short Option Value
    "NLV":"6000", // Net Liquidation Value
    "NCO":"6000", // Net Cash Operations
    "ICA":"6000", // Intraday Commissions Applied
    "IFA":"6000", // Intraday Fees Applied
    "MTOTE":"6000", // MTM Total Open Trade Equity
    "MTAE":"6000", // MTM Total Account Equity
    "MEB":"6000", // MTM Ending Balance
    "STOTE":"6000", // SOD Total Open Trade Equity
    "STAE":"6000", // SOD Total Account Equity
    "SEB":"6000", // SOD Ending Balance
    "PP":"6000", // Purchasing Power
    "GFPL":"6000", // Gross Futures Profit Loss
    "MC":"6000", // Margin Credit
    "TMR":"6000", // Total Margin Reqs
    "SOD":"6000", // Securities On Deposit
    "EF":"6000", // Excess Funds
    "OLVR":"6000", // OAK Liquidation Value Realtime
    "OMES":"6000", // OAK Margin Excess Settle
    "OWOM":"6000", // OAK Working Order Margin
    "OMER":"6000", // OAK Margin Excess Realtime
    "OLOVS":"6000", // OAK Long Option Value Settle
    "OBS":"6000", // OAK Balance Settle
    "OOTER":"6000", // OAK Open Trade Equity Realtime
    "OLOVR":"6000", // OAK Long Option Value Realtime
    "OSOVR":"6000", // OAK Short Option Value Realtime
    "OLVS":"6000", // OAK Liquidation Value Settle
    "OBR":"6000", // OAK Balance Realtime
    "OSOVS":"6000", // OAK Short Option Value Settle
    "OOTES":"6000" // OAK Open Trade Equity Settle
    }
    
  • Error:

    {
    "RQT":"account_information", // Request Type
    "RES":"ERR", // Result
    "MSG":"Account not found!" // Error Message
    }
    

14. Register Chart

With the help of this request we can fetch the chart data for a given contract and register the chart for updates

Request

{
"RQT": "register_chart", // Request Type
"INS": "ESZ19", // Contract
"REST": "day", // Resolution Type
"RESR": "1", // Resolution Range
"INDS":[ // Indicators
  {
   "IND": "IND1", // Indicator 1
   "NAME": "SMA", // Name
   "PR": "CLOSE", // Price
   "LNG": "50" // Length
  },
  {
   "IND": "IND2", // Indicator 2
   "NAME": "SMA", // Name
   "PR": "CLOSE", // Price
   "LNG": "200" // Length
  },
  {
   "IND": "IND3", // Indicator 3
   "NAME": "SSTO", // Name
   "LNG": "50", // Length
   "KLNG": "3.0", // KLength
   "DLNG": "5.0", // DLength
   "UPL": "80", // Up Level
   "DWL": "20" // Down Level
  },
  ...
]
}

Response

  • Success:

    {
    "RQT":"register_chart", // Request Type
    "RES":"OK", // Result
    "ID":"27", // Chart Id
    "INS":"ESZ19", // Contract
    "REST":"day", // Resolution Type
    "RESR":"1", // Resolution Range
    "INDS":[ // Indicators
      {
       "IND": "IND1", // Indicator 1
       "NAME": "SMA", // Name
       "PR": "CLOSE", // Price
       "LNG": "50" // Length
      },
      {
       "IND": "IND2", // Indicator 2
       "NAME": "SMA", // Name
       "PR": "CLOSE", // Price
       "LNG": "200" // Length
      },
      {
       "IND": "IND3", // Indicator 3
       "NAME": "SSTO", // Name
       "LNG": "50", // Length
       "KLNG": "3.0", // KLength
       "DLNG": "5.0", // DLength
       "UPL": "80", // Up Level
       "DWL": "20", // Down Level
       "COMP":[ // Components
         {
         "COMP":"C1", // Component 1
         "NAME":"%K"  //Name
         },
         {
         "COMP":"C2", // Component 2
         "NAME":"%D" // Name
         },
         {
         "COMP":"C3", // Component 3
         "NAME":"Up Level", // Name
         "VALUE": "80" // value
         },
         {
         "COMP":"C4", // Component 4
         "NAME":"Down Level", // Name
         "VALUE": "20" // Value
         }
       ]
      },
    ],
    "ChartData":[
      {
       "NR": "1", // Number of Bar
       "TS": "1541005200", // Timestamp
       "OP": "5250", // Open
       "LW": "5050", // Low
       "HG": "5350", // High
       "LS": "5150", // Last
       "VL": "2000", // Volume
       "IND1": "2803.48", // Indicator 1 - value
       "IND2": "2820.13", // Indicator 2 - value
       "IND3.C1": "85.42", // Indicator 3 - component 1 - value
       "IND3.C2": "78.66" // Indicator 3 - component 2 - valuex
      },
      ...
    ]
    }
    
  • Error:

    {
    "RQT":"register_chart", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown contract!" // Error Message
    }
    

15. Unregister Chart

With the help of this request we can unregister a chart

Request

{
"RQT": "unregister_chart", // Request Type
"ID": "27" // Chart Id
}

Response

  • Success:

    {
    "RQT":"unregister_chart", // Request Type
    "RES":"OK", // Result
    "ID":"27" // Chart Id
    }
    
  • Error:

    {
    "RQT":"unregister_chart", // Request Type
    "RES":"ERR", // Result
    "MSG":"Chart doesn't exist!" // Error Message
    }
    

16. Chart Snapshot

With the help of this request we can fetch the chart data for a given contract

Request

{
"RQT": "chart", // Request Type
"INS": "ESZ19", // Contract
"REST": "day", // Resolution Type
"RESR": "1", // Resolution Range
"INDS":[ // Indicators
  {
   "IND": "IND1", // Indicator 1
   "NAME": "SMA", // Name
   "PR": "CLOSE", // Price
   "LNG": "50" // Length
  },
  {
   "IND": "IND2", // Indicator 2
   "NAME": "SMA", // Name
   "PR": "CLOSE", // Price
   "LNG": "200" // Length
  },
  {
   "IND": "IND3", // Indicator 3
   "NAME": "SSTO", // Name
   "LNG": "50", // Length
   "KLNG": "3.0", // KLength
   "DLNG": "5.0", // DLength
   "UPL": "80", // Up Level
   "DWL": "20" // Down Level
  },
  ...
]
}

Response

  • Success:

    {
    "RQT":"chart", // Request Type
    "RES":"OK", // Result
    "INS":"ESZ19", // Contract
    "REST":"day", // Resolution Type
    "RESR":"1", // Resolution Range
    "INDS":[ // Indicators
      {
       "IND": "IND1", // Indicator 1
       "NAME": "SMA", // Name
       "PR": "CLOSE", // Price
       "LNG": "50" // Length
      },
      {
       "IND": "IND2", // Indicator 2
       "NAME": "SMA", // Name
       "PR": "CLOSE", // Price
       "LNG": "200" // Length
      },
      {
       "IND": "IND3", // Indicator 3
       "NAME": "SSTO", // Name
       "LNG": "50", // Length
       "KLNG": "3.0", // KLength
       "DLNG": "5.0", // DLength
       "UPL": "80", // Up Level
       "DWL": "20", // Down Level
       "COMP":[ // Components
         {
         "COMP":"C1", // Component 1
         "NAME":"%K"  //Name
         },
         {
         "COMP":"C2", // Component 2
         "NAME":"%D" // Name
         },
         {
         "COMP":"C3", // Component 3
         "NAME":"Up Level", // Name
         "VALUE": "80" // value
         },
         {
         "COMP":"C4", // Component 4
         "NAME":"Down Level", // Name
         "VALUE": "20" // Value
         }
       ]
      },
    ],
    "ChartData":[
      {
       "NR": "1", // Number of Bar
       "TS": "1541005200", // Timestamp
       "OP": "5250", // Open
       "LW": "5050", // Low
       "HG": "5350", // High
       "LS": "5150", // Last
       "VL": "2000", // Volume
       "IND1": "2803.48", // Indicator 1 - value
       "IND2": "2820.13", // Indicator 2 - value
       "IND3.C1": "85.42", // Indicator 3 - component 1 - value
       "IND3.C2": "78.66" // Indicator 3 - component 2 - valuex
      },
      ...
    ]
    }
    
  • Error:

    {
    "RQT":"chart", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown contract!" // Error Message
    }
    

17. Indicators List

With the help of this request we can fetch all the indicators and their properties

Request

{
"RQT": "indicators", // Request Type
}

Response

  • Success:

    {
    "RQT":"indicators", // Request Type
    "RES":"OK", // Result
    "INDS":[ // Indicators
      {
       "IND": "IND1", // Indicator 1
       "NAME": "SMA", // Name
       "PR": "CLOSE, OPEN, HIGH, LOW, HL MidPoint, HLC MidPoint, HLCO MidPoint", // Prop1 - Price
       "LNG": "INT[1,MAX]" // Prop2 - Length
      },
      {
       "IND": "IND2", // Indicator 2
       "NAME": "SSTO", // Name
       "LNG": "INT[1,MAX]", // Prop1 - Length
       "KLNG": "FLT[1,MAX]", // Prop2 - KLength
       "DLNG": "FLT[1,MAX]", // Prop3 - DLength
       "UPL": "INT[1,100]", // Prop4 - Up Level
       "DWL": "INT[1,100]" // Prop5 - Down Level
      },
      ...
    ]
    }
    
  • Error:

    {
    "RQT":"indicators", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown request!" // Error Message
    }
    

18. Register Book

With the help of this request we can fetch Book Data for a given contract and register the book for updates

Request

{
"RQT": "registerBook", // Request Type
"INS": "ESZ19", // Contract
"LVL": "5", // Level
"DT": "COMBINED" // Data Type - COMBINED, IMPLIED, OUTRIGHT
}

Response

  • Success:

    {
    "RQT":"registerBook", // Request Type
    "RES":"OK", // Result
    "INS":"ESZ19", // Contract
    "ASKS":[ // ASKS
      {
       "PR": "3106.25" // Ask Value
       "PO": "1", // Ask Position
       "PZ": "15" // Ask Size
      },
      {
       "PR": "3106.5", // Ask Value
       "PO": "2", // Ask Position
       "PZ": "70" // Ask Size
      },
    ],
    "BIDS":[ // BIDS
      {
       "PR": "3106.0", // Bid Value
       "PO": "1", // Bid Position
       "SZ": "61" // Bid Size
      },
      {
       "PR": "3105.75", // Bid Value
       "PO": "2", // Bid Position
       "SZ": "89" // Bid Size
      },
      ...
    ]
    }
    
  • Error:

    {
    "RQT":"registerBook", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown contract!" // Error Message
    }
    

19. Unregister Book

With the help of this request we can unregister the book from updates

Request

{
"RQT": "unRegisterBook", // Request Type
"INS": "ESZ19" // Contract
}

Response

  • Success:

    {
    "RQT":"unRegisterBook", // Request Type
    "RES":"OK", // Result
    "INS":"ESZ19" // Contract
    }
    
  • Error:

    {
    "RQT":"unRegisterBook", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown contract!" // Error Message
    }
    

20. Snapshot Book

With the help of this request we can fetch Book Data for a given contract

Request

{
"RQT": "snapshotBook", // Request Type
"INS": "ESZ19", // Contract
"LVL": "5", // Level
"DT": "COMBINED" // Data Type - COMBINED, IMPLIED, OUTRIGHT
}

Response

  • Success:

    {
    "RQT":"snapshotBook", // Request Type
    "RES":"OK", // Result
    "INS":"ESZ19", // Contract
    "ASKS":[ // ASKS
      {
       "PR": "3106.25", // Ask Value
       "PO": "1", // Ask Position
       "PZ": "15" // Ask Size
      },
      {
       "PR": "3106.5", // Ask Value
       "PO": "2", // Ask Position
       "PZ": "70" // Ask Size
      },
    ],
    "BIDS":[ // BIDS
      {
       "PR": "3106.0", // Bid Value
       "PO": "1", // Bid Position
       "PZ": "61" // Bid Size
      },
      {
       "PR": "3105.75", // Bid Value
       "PO": "2", // Bid Position
       "PZ": "89" // Bid Size
      },
    ]
    }
    
  • Error:

    {
    "RQT":"snapshotBook", // Request Type
    "RES":"ERR", // Result
    "MSG":"Unknown contract!" // Error Message
    }
    

Streaming events

1. Quote Events

This is an update for a registered quote indicated by the “INS” id. This update is pushed from the Quotes API via QST whenever there’s a change for that quote.

{
"UPD":"Quote", // Update Type
"AK":"3800", // Opt: Ask
"AZ":"10", // Opt: Ask Size
"BD":"3796", // Opt: Bid
"BZ":"5", // Opt: Bid Size
"HG":"3905", // Opt: High
"INF": "T", // Opt: Info: Trading / Settled
"INS":"ESZ17", // Instrument
"LW":"3786", // Opt: Low
"OI":"1223", // Opt: Open Interest
"OP":"3800", // Opt: Open
"CL":"3800", // Opt: Close
"PS":"3798", // Opt: Previous Settlement
"ST":"3800", // Opt: Settlement
"TR":"3800", // Opt: Trade
"TS":"03/27/2017 - 15:01:02", // Timestamp
"TZ":"2", // Opt: Trade Size
"VL":"2995" // Opt: Volume
}

Some of these fields may be missing and are indicated as such. ### Order Entry Events #### 1.Accounts List Changed This event comes whenever a new connection has been established or an existing connection has been closed.

{
"UPD":"Accounts" // Update Type
}

2. Account Loaded

This event comes when the list of orders or positions in the specified account has been loaded.

{
"UPD":"Account", // Update Type
"PV":"QOR", // Provider Id
"AC":"acc1234354" // Account Id
}

3. Order

This event comes whenever a new order is placed or an existing order changes its status.

{
"UPD":"Order", // Update Type
"PV":"QOR", // Provider Id
"AC":"acc1234354", // Account Id
"OD":"354", // Order Id
"ST":"N", // Order Status
"SD":"B", // Side: B / S
"QT":"5", // Quantity
"INS":"ESZ17", // Instrument
"TP":"STWL", // Order Type
"PR":"1300", // Price
"LM":"1300" // Limit
}

For a comprehensive list of order statuses please see: Order Status

4. Fill

This event comes whenever an order has been filled.

{
"UPD":"Fill", // Update Type
"PV":"QOR", // Provider Id
"AC":"acc1234354", // Account Id
"FD":"43", // Fill Id
"OD":"423", // Order Id
"SD":"L", // Side: L (long) / S (short)
"QT":"5", // Quantity
"INS":"ESZ17", // Instrument
"PR":"1300" // Price
}

5. Position

This event comes whenever a fill is processed and changed into an open position.

{
"UPD":"Position", // Update Type
"PV":"QOR", // Provider Id
"AC":"acc1234354", // Account Id
"PD":"435626", // Position Id
"SD":"L", // Side: L (long) / S (short)
"QT":"5", // Quantity
"INS":"ESZ17", // Instrument
"PR":"1300" // Price
}

6. Chart Bar

This event comes whenever a bar from chart is updated.

{
"UPD":"Chart", // Update Type
"ID":"27", // Chart Id
"NR":"512", // Number of Bar
"TS":"1541005200", // Timestamp
"OP":"5250", // Open
"LW":"5050", // Low
"HG":"5350", // High
"LS":"5150", // Last
"VL":"2000", // Volume
"IND1":"2453.48", // Indicator 1 - value
"IND2":"2321.13", // Indicator 2 - value
"IND3.C1":"28.45", // Indicator 3 - component 1 - value
"IND3.C2":"15.66" // Indicator 3 - component 2 - value
}

7. Book Update

This event comes whenever a book is updated.

{
"UPD":"Book", // Update Type
"INS":"ESZ19", // Contract
"ASKS":[ // ASKS
  {
   "PR": "3106.25", // Ask Value
   "PO": "1", // Ask Position
   "PZ": "15" // Ask Size
  },
  {
   "PR": "3106.5", // Ask Value
   "PO": "2", // Ask Position
   "PZ": "70" // Ask Size
  }
],
"BIDS":[ // BIDS
  {
   "PR": "3106.0", // Bid Value
   "PO": "1", // Bid Position
   "PZ": "61" // Bid Size
  },
  {
   "PR": "3105.75", // Bid Value
   "PO": "2", // Bid Position
   "PZ": "89" // Bid Size
  },
]
...
}