NAV

Introduction

About MarketFeed

ActiveTick MarketFeed is a suite of easy-to-use market data services comprising of real-time and delayed data feeds, snapshot, real-time, historical and fundamental data. ActiveTick MarketFeed was created specifically for software developers, independent software vendors, and companies looking for dependable source of market data.

The MarketFeed API is organized around REST, has predictable URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

All data in MarketFeed is accessible via a single API, with variety of different endpoints for each dataset. This documentation describes each endpoint with detailed examples.

All timestamps represented in MarketFeed API are UTC-based unless otherwise noted.

In order to access the API and its datasets, a valid active MarketFeed account is required. To sign up for one, please visit our MarketFeed Signup page.

Developer Support

We offer several methods for supporting our MarketFeed users, including live web chat, phone or email. Please visit Contact Us for more information.

Connectivity

MarketFeed API supports secure HTTPS connectivity (HTTP 1.1 and HTTP 2.0) using TLS 1.2 SSL encryption. When making requests, a client typically connects to a specific endpoint for particular service, submits the request and gets a response back. Behind each endpoint, we have a farm of load-balanced servers processing requests with quick responses.

Our primary production API endpoint is

https://api.activetick.com

Limits

We implement reasonable rate limiting to ensure that stable and reliable service is provided to all users. The rate limits are set in a way to offer full functionality while trying to prevent any resource abuse. Most times, a rate limit can be subverted by implementing a different API call or leveraging other API features, such as using streaming API instead of polling for data.

MarketFeed API limits calls to 200 requests per minute. The request counter is reset on rolling basis each minute, giving full 200 requests at the beginning of each minute. If request counter exceeds the limits, the server returns a 429 HTTP “Too many requests” error.

In certain situations when too many 429 errors are generated, originating IP or session token might be put on temporary ban list blocking further requests.

Errors

MarketFeed uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a limit was exceed, etc.). Codes in the 5xx range indicate an error with MarketFeed servers (these are rare).

When error codes are returned, the API includes a description of the code and the reason message for failure. The message is intended to give a user-friendly explanation of the error while the error codes are designed to be machine readable codes that applications can use to better understand the context of the error and react appropriately.

Code Code Meaning
400 Bad Request The request contains errors.
401 Unauthorized The authentication process failed, or the access token is not valid.
403 Forbidden Access to this resource is restricted for the given caller.
404 Not Found The specified resource could not be found.
405 Method Not Allowed An invalid method was used to access a resource.
406 Not Acceptable An unsupported format was requested.
408 Request Timed out Request took too much time to respond and timed-out.
409 Conflict The requested operation on the resource cannot be made due the resource state.
429 Too Many Requests Exceeded maximum allowed request limit per minute. Try again next minute.
500 Internal Server Error There was a problem with the API host server. Try again later.
503 Service Unavailable API is temporarily offline for maintenance. Try again later.

Guides

REST How-To

An example for creating a new SessionId token.

curl -X GET 'https://api.activetick.com/authorize.json?username=YOUR_LOGIN_USERNAME&password=YOUR_PASSWORD&apikey=YOUR_API_KEY' \
-H "Connection: Keep-Alive" \
-H "Accept: application/json"

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 128
{
    "type":"authorize",
    "status":"ok",
    "sessionid":"8e63353316d343bf9d4ce816ec67c1e7",
    "created_at":"2022-01-20T12:18:04"
}

Making a REST API call is easy, and can be done directly from your browser or your favorite programming language.

Generally, to make any call you will first need these things:

When initiating a REST request, a sender (for example, a browser) creates standard HTTP GET request and sends it to the server. The server in turn responds with a standard HTTP response code, headers and response payload.

Multiple Requests

It is highly recommended that HTTP sessions are reused when multiple requests need to be made rather than closing down HTTP session and opening a new one for each request.

In order to reuse the same session, a Connection: Keep-Alive header must be passed with each request. If this header is omitted, the server will close the socket after sending response to the client, and the session cannot be reused for another request.

To reuse the same session, simply send another request after previous response has been received.

Query Parameters

A query typically consists of an endpoint name followed by query parameters. Most MarketFeed endpoints require a few parameters to be passed inside the query. Parameters are based on name/value pairs, and when multiple parameters are present in the query, an ampersand character (&) is used to combine them into a single query, for example param1=123&param2=abc

Some endpoints require a list of values inside a single parameter. In an example of snapshot, the query accepts a list of symbols and columns to return in a dataset. In cases where a list of values is required, MarketFeed API uses commas to separate the values, for example: symbols=A,B,C,D&columns=1,2,3,4

Data Formats

All response data from the server is returned in JSON format.

Symbology

About Symbology

ActiveTick MarketFeed API supports the following types of instruments:

Instrument symbol typically consists of instrument-specific body, followed by 3-character code representing type, exchange, and country. The body and 3-character code is joined together by an underscore ‘_’ character.

Instruments that trade on multiple exchanges use a special exchange code called Consolidated Exchange.

The following tables list codes for instrument types, exchanges, and countries.

Instrument Types

Type Code Description
'S' Stock
'I' Index
'C' Currency
'F' Future
'O' Stock Option
'P' Future Option
'D' Future Spread

Instrument Countries

Country Code Description
'U' United States
'C' Canada
'I' International (Used for Currencies)

Stocks

Stock symbols are made up from instrument body, Stock instrument type, exchange code, and country code. They are the simplest forms of instrument symbols.

US-based Stock Exchanges

Exchange Code Description
' ' Consolidated Exchange
'A' NYSE American, LLC (NYSE American)
'B' NASDAQ OMX BX, Inc. (NASDAQ OMX BX)
'C' NYSE National, Inc. (NYSE National)
'D' FINRA Alternative Display Facility (ADF)
'H' MIAX Pearl Exchange, LLC (MIAX)
'I' International Securities Exchange, LLC (ISE)
'J' Cboe EDGA Exchange, Inc. (Cboe EDGA)
'K' Cboe EDGX Exchange, Inc. (Cboe EDGX)
'L' Long-Term Stock Exchange, Inc. (LTSE)
'M' NYSE Chicago, Inc. (NYSE Chicago)
'N' New York Stock Exchange, LLC (NYSE)
'P' NYSE Arca, Inc. (NYSE Arca)
'Q' NASDAQ Stock Market, LLC (NASDAQ)
'S' Members Exchange, LLC (MEMX)
'U' OTC Markets, LLC
'V' Investors’ Exchange, LLC. (IEX)
'W' CBOE Stock Exchange, Inc. (CBSX)
'X' NASDAQ OMX PSX, Inc. (NASDAQ OMX PSX)
'Y' Cboe BYX Exchange, Inc. (Cboe BYX)
'Z' Cboe BZX Exchange, Inc. (Cboe BZX)

Some examples of stock instrument symbols:

Symbol Description
AAPL_S U AAPL symbol for consolidated exchanges
MSFT_SZU MSFT symbol for Cboe BZX Exchange

Indices

Index symbols are very similar to stock symbols, with the only exception of using Index instrument code.

All index instruments use consolidated exchange code.

Some examples of index instrument symbols:

Symbol Description
DJI_I U Dow Jones Industrial Index
SPX_I U S&P 500 index

Currencies

Currency symbols contain a pair of currencies as its body, followed by Currency instrument code, Forex country code, and International exchange code..

Currency Exchanges

Exchange Code Description
'F' Forex

Some examples of currency instrument symbols:

Symbol Description
EUR/USD_CFI Euro/USD pair
USD/CAD_CFI USD/Canadian pair

Futures

Future symbols contain a future group, maturity date, Future instrument code, future exchange code, and country code. Underscore character, ‘_’, is used as a separator between group, maturity date and 3-character code.

Group portion of the symbol is exchange-specific group, such as “ES” for CME e-Minis, “CL” for NYMEX oil, etc.

Maturity portion of the symbol is represented in YYMMDD format. For instruments with standard maturity month, the day portion is set to “00”.

US-based Futures Exchanges

Exchange Code Description
'C' CME Exchange
'K' KCBT Exchange
'N' NYMEX Exchange
'O' CBOT Exchange
'X' COMEX Exchange

Some examples of future instrument symbols:

Symbol Description
ES_220300_FCU ESH2 CME e-Mini SP 500 contract with March 2022 maturity.
GC_220200_FXU GCG2 COMEX Gold contract with February 2022 maturity.

Options

Option symbols consist of underlying symbol, expiration date, call/put indicator, strike price and strike price decimal code, followed by 3-character code.

Options use the following format:

AAAA_YYMMDDXNNNNNP_IEC

Where:

If option is a weekly option, the DD portion of expiration date will indicate week number the option expires, from W1 through W5. Precision code indicates how many digits are used for decimal portion of strike price.

Call/Put Codes

Code Description
'C' Call
'P' Put

US-based Stock Options Exchanges

Exchange Code Description
' ' Consolidated OPRA

US-based Future Options Exchanges

Exchange Code Description
'C' CME Exchange
'K' KCBT Exchange
'N' NYMEX Exchange
'O' CBOT Exchange
'X' COMEX Exchange

Strike Price Precision Code

Precision Code Description
'A' 0 decimals
'B' 1 decimal
'C' 2 decimals
'D' 3 decimals
'E' 4 decimals
'I' 0 decimals negative
'J' 1 decimal negative
'K' 2 decimals negative
'L' 3 decimals negative
'M' 4 decimals negative

Some examples of option instrument symbols:

Symbol Description
JNJ_211022C14700C_O U JNJ Stock Call Option with 22/10/2021 expiration and 147.00 strike price
MSFT_220114P31000C_O U MSFT Stock Put Option with 14/01/2022 expiration and 310.00 strike price
AAPL_1203W3C1234567B_O U AAPL Weekly Stock Call Option
ES_120331C1234567A_PCU ES e-Mini 500 Call Option

Authentication

Session Tokens

Making a new SessionId token example:

curl -X GET 'https://api.activetick.com/authorize.json?username=mylogin&password=mypass&apikey=abc123abc123'
-H "Connection: Keep-Alive"
-H "Accept: application/json"

Response example:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 151

{
    "type":"authorize",
    "status":"ok",
    "sessionid":"8e63353316d343bf9d4ce816ec67c1e7",
    "created_at":"2022-01-20T12:18:04",
    "is_realtime":"true"
}

To use MarketFeed API, a user must first be authenticated and have active SessionId token. SessionId tokens are regular strings made up of hexadecimal characters that every MarketFeed API call expects to be passed.

The token is generated by calling authorize endpoint with users’s login credentials and API key. Once created, the token has a 24-hour validity after which it expires, and another authorize API call must be made to create new token in order to continue using the API.

If additional calls to authorize API are made within 24 hours after creating initial token, same information on session token is returned. Multiple calls to authorize API returning same information should be avoided, as each call decrements number of available API calls that can be made.

Request

https://api.activetick.com/authorize.json?username=MY_USERNAME&password=MY_PASSWORD&apikey=MY_APIKEY

Query Parameters

Parameter Required Description
username yes ActiveTick client username
password yes ActiveTick client password
apikey yes Alpha-numeric API key

JSON response:

{
    "type":"authorize",
    "status":"ok",
    "sessionid":"8e63353316d343bf9d4ce816ec67c1e7",
    "created_at":"2022-01-20T12:18:04",
    "is_realtime":"true"
}

Response

Name Description
type "authorize"
status Indicates if authorization completed successfully. Possible values are "ok" and "fail".
sessionid 24-hour session token.
created_at Time when initial authorization was created.
is_realtime Indicates if market data is real-time. Possible values are "true" and "false".

Core Data

About Snapshots

Making a snapshot request example:

curl -X GET 'https://api.activetick.com/snapshot.json?sessionid=MY_SESSIONID&symbols=EUR/USD_CFI,AAPL_S-U,IBM_S-U&columns=pc,l,b,a,bsz,asz,vol,ltm' /
-H "Connection: Keep-Alive" /
-H "Accept: application/json"

Reponse example:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 771

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"IBM_S U","status":"fail","data":[]},
        {"symbol":"EUR/USD_CFI","status":"ok",
            "data":[
                    {"c":"pc","s":"ok","v":"1.13013"},
                    {"c":"l","s":"ok","v":"1.13055"},
                    {"c":"b","s":"ok","v":"1.13049"},
                    {"c":"a","s":"ok","v":"1.13060"},
                    {"c":"bsz","s":"ok","v":"0"},
                    {"c":"asz","s":"ok","v":"0"},
                    {"c":"ltm","s":"ok","v":"2022-01-26T04:14:58.977000000"}
            ]
        },
        {"symbol":"AAPL_S U","status":"ok",
            "data":[
                    {"c":"pc","s":"ok","v":"161.62"},
                    {"c":"l","s":"ok","v":"159.78"},
                    {"c":"b","s":"ok","v":"159.65"},
                    {"c":"a","s":"ok","v":"160.05"},
                    {"c":"bsz","s":"ok","v":"1"},
                    {"c":"asz","s":"ok","v":"4"},
                    {"c":"ltm","s":"ok","v":"2022-01-26T00:59:56.826201518"}
                ]
        }
]
}

All core market datasets returned by MarketFeed API rely on snapshot endpoint. The endpoint accepts a list of instrument symbols and data columns to query, and returns rows of data for each instrument, similar to a typical SQL SELECT query.

When passing multiple symbols and columns, a comma is used to separate the items, for example symbols=ABC,EFG,XYZ.

Valid sessionid token must be passed for the query to succeed.

Snapshot Request

https://api.activetick.com/snapshot.json?sessionid=MY_SESSIONID&symbols=SYM1,SYM2&columns=COL1,COL2

Parameter Required Description
sessionid yes Valid sessionid returned from prior authorization.
symbols yes List of instrument symbols separated by commas.
columns yes List of data columns separated by commas.

Snapshot Response

Name Description
type "snapshot"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
rows Array of data rows for each requested instrument symbol.

For each requested symbol, the server responds with a row of data which includes information about the row, and the data itself.

Name Description
symbol Instrument symbol.
status Row status code indicating if symbol information was successfully returned.
data Array of data values for each requested column.

Row Status Code

Row Status Code Description
ok The row contains valid returned information.
fail The row is invalid due to lack of proper exchange permissions for requested instrument symbol. Review your exchange subscriptions by logging into your account at activetick.com.
max_limit_reached Maximum limit of rows per request has been reached. Adjust how many symbols you request to the limits of your account.

The data array inside the row contains information for each requested column.

Name Description
c Data column id.
s Data column status. Possible values are "ok" and "fail".
v Data value.

Intraday Pricing

Example for requesting last traded price for AAPL and IBM stocks:

symbols parameter includes AAPL and IBM stock symbols, and columns parameter is set to column id "l" for last trade price.

https://api.activetick.com/snapshot.json?sessionid=MY_SESSIONID&symbols=AAPL_S-U,IBM_S-U&columns=l

Example response:

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"AAPL_S U","status":"ok",
         "data":[
                 {"c":"l","s":"ok","v":"168.835"}
                ]
        },
        {"symbol":"IBM_S U","status":"ok",
         "data":[
                 {"c":"l","s":"ok","v":"131.31"}
                ]
        }
       ]
}

Example for requesting bid/ask data for a single stock:

symbols parameter is set to a single stock symbol AAPL, and columns parameter includes intraday columns for bid/ask price, bid/ask exchange and bid/ask size.

https://api.activetick.com/snapshot.json?sessionid=MY_SESSIONID&symbols=AAPL_S-U&columns=b,a,bex,aex,bsz,asz

Example response:

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"AAPL_S U","status":"ok",
         "data":[
                 {"c":"b","s":"ok","v":"169.06"},
                 {"c":"a","s":"ok","v":"169.07"},
                 {"c":"bex","s":"ok","v":"88"},
                 {"c":"aex","s":"ok","v":"86"},
                 {"c":"bsz","s":"ok","v":"5"},
                 {"c":"asz","s":"ok","v":"5"}
                ]
        }
       ]    
}

Intraday pricing data contains real-time and calculated values received from exchange feeds throughout trading session.

Data Column Id Description
s Feed Source Code
pc Previous Close
op Open Price
cl Close Price
l Last Trade Price
b Bid Price
a Ask Price
hi High Price
lo Low Price
dhi Daily High Price (including Ext-hours session)
dlo Daily Low Price (including Ext-hours session)
yhi 52-Week High Price
ylo 52-Week Low Price
pop Pre-market Open Price
el Extended-hours Last Price
ecl Extended-hours Close Price
bex Bid Exchange
aex Ask Exchange
lex Last Trade Exchange
lco Last Trade Condition
qco Quote Condition
sbtm Session Begin Time
setm Session End Time
ltm Last Trade Time
qtm Quote Time
hitm High Time
lotm Low Time
dhitm Daily High Time
dlotm Daily Low Time
yhitm 52-Week High Time
ylotm 52-Week Low Time
lsz Last Trade Size
bsz Bid Size
asz Ask Size
v Volume
pv Pre-market Volume
ev Extened-hours Volume
tc Trade Count
ptc Pre-market Trade Count
etc Extended-hours Trade Count
tsum Transactions Sum
vwap VWAP

Calculated Data

Example for requesting 5-day average volume and 5 day average price for a group of stocks:

symbols parameter includes a group of stock symbols, and columns parameter is set to column ids "av5" and "ap5"

https://api.activetick.com/snapshot.json?sessionid=MY_SESSIONID&symbols=AA_S-U,AXP_S-U,BA_S-U,CAT_S-U,C_S-U&columns=av5,ap5

Example response:

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"AA_S U","status":"ok",
         "data":[
                 {"c":"av5","s":"ok","v":"2678463"},
                 {"c":"ap5","s":"ok","v":"33.11"}
                ]
        },
        {"symbol":"AXP_S U","status":"ok",
         "data":[
                 {"c":"av5","s":"ok","v":"3153841"},
                 {"c":"ap5","s":"ok","v":"79.57"}
                ]
        },
        {"symbol":"BA_S U","status":"ok",
         "data":[
                 {"c":"av5","s":"ok","v":"2085303"},
                 {"c":"ap5","s":"ok","v":"188.74"}
                ]
        },
        {"symbol":"CAT_S U","status":"ok",
         "data":[
                 {"c":"av5","s":"ok","v":"3998172"},
                 {"c":"ap5","s":"ok","v":"104.84"}
                ]
        },
        {"symbol":"C_S U","status":"ok",
         "data":[
                 {"c":"av5","s":"ok","v":"17418656"},
                 {"c":"ap5","s":"ok","v":"62.37"}
                ]
        }
       ]
}

Calculated data contains statistical pricing and volume data columns updated periodically.

Data Column Id Description
av5 5-Day Average Volume
av10 10-Day Average Volume
av20 20-Day Average Volume
av50 50-Day Average Volume
av100 100-Day Average Volume
av200 200-Day Average Volume
ap5 5-Day Average Price
ap10 10-Day Average Price
ap20 20-Day Average Price
ap50 50-Day Average Price
ap100 100-Day Average Price
ap200 200-Day Average Price

Option Greeks

Example for requesting option Greeks data for a list of option contracts:

symbols parameter includes a group of stock option symbols, and columns parameter is set to option Greeks column ids.

https://api.activetick.com/snapshot.json?sessionid=MY_SESSIONID&symbols=AAPL_220819C3000C_O-U,AAPL_220819C3500C_O-U,AAPL_220819C3000C_O-U,AAPL_220819P4000C_O-U&columns=opoi,opnpv,opdelta,opgamma,oprho,opvega,optheta,opiv

Example response:

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"AAPL_220819C3000C_O U","status":"ok",
         "data":[
                 {"c":"opoi","s":"ok","v":"30"},
                 {"c":"opnpv","s":"ok","v":"139.1984"},
                 {"c":"opdelta","s":"ok","v":"0.996796"},
                 {"c":"opgamma","s":"ok","v":"0.000076"},
                 {"c":"oprho","s":"ok","v":"0.005752"},
                 {"c":"opvega","s":"ok","v":"0.002893"},
                 {"c":"optheta","s":"ok","v":"-0.153177"},
                 {"c":"opiv","s":"ok","v":"4.673723"}
                ]
        },
        {"symbol":"AAPL_220819C3500C_O U","status":"ok",
         "data":[
                 {"c":"opoi","s":"ok","v":"20"},
                 {"c":"opnpv","s":"ok","v":"134.2703"},
                 {"c":"opdelta","s":"ok","v":"0.995285"},
                 {"c":"opgamma","s":"ok","v":"0.000113"},
                 {"c":"oprho","s":"ok","v":"0.007149"},
                 {"c":"opvega","s":"ok","v":"0.003145"},
                 {"c":"optheta","s":"ok","v":"-0.224681"},
                 {"c":"opiv","s":"ok","v":"4.478560"}
                ]
        }, 
        {"symbol":"AAPL_220819C3000C_O U","status":"ok",
         "data":[
                 {"c":"opoi","s":"ok","v":"30"},
                 {"c":"opnpv","s":"ok","v":"139.1984"},
                 {"c":"opdelta","s":"ok","v":"0.996796"},
                 {"c":"opgamma","s":"ok","v":"0.000076"},
                 {"c":"oprho","s":"ok","v":"0.005752"},
                 {"c":"opvega","s":"ok","v":"0.002893"},
                 {"c":"optheta","s":"ok","v":"-0.153177"},
                 {"c":"opiv","s":"ok","v":"4.673723"}
                ]
        }, 
        {"symbol":"AAPL_220819P4000C_O U","status":"ok",
         "data":[
                 {"c":"opoi","s":"ok","v":"1"},
                 {"c":"opnpv","s":"ok","v":"0.0045"},
                 {"c":"opdelta","s":"ok","v":"-0.000216"},
                 {"c":"opgamma","s":"ok","v":"0.000011"},
                 {"c":"oprho","s":"ok","v":"-0.000009"},
                 {"c":"opvega","s":"ok","v":"0.000194"},
                 {"c":"optheta","s":"ok","v":"-0.004521"},
                 {"c":"opiv","s":"ok","v":"2.791198"}
                ]
        }
       ]
}

Option Greeks data is available for equity options, and includes all Greeks and IV values for all option contracts. This dataset is updated periodically throughout the trading session. Because of nature of how American option Greeks are derived, not all contracts have Greek values.

Data Column Id Description
opoi Option Open Interest
opnpv Option Theoretical Calculated Price
opdelta Option Greek Delta
opgamma Option Greek Gamma
oprho Option Greek Rho
opvega Option Greek Vega
optheta Option Greek Theta
opiv Option Implied Volatility

Company Dividends

Example for requesting dividend amount and ex-div date a group of stocks:

symbols parameter includes a group of stock symbols, and columns parameter is set to column ids "divmat" and "divexdt"

https://api.activetick.com/snapshot.json?sessionid=MY_SESSIONID&symbols=AA_S-U,AXP_S-U,BA_S-U,CAT_S-U,C_S-U&columns=divamt,divexdt

Example response:

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"AA_S U","status":"ok",
         "data":[
                 {"c":"divamt","s":"ok","v":"0.100"},
                 {"c":"divexdt","s":"ok","v":"2022-08-08T00:00:00.000000000"}
                ]
        },
        {"symbol":"AXP_S U","status":"ok",
         "data":[
                 {"c":"divamt","s":"ok","v":"0.520"},
                 {"c":"divexdt","s":"ok","v":"2022-04-07T00:00:00.000000000"}
                ]
        },
        {"symbol":"BA_S U","status":"ok",
         "data":[
                 {"c":"divamt","s":"ok","v":"2.0550"},
                 {"c":"divexdt","s":"ok","v":"2020-02-13T00:00:00.000000000"}
                ]
        },
        {"symbol":"CAT_S U","status":"ok",
         "data":[
                 {"c":"divamt","s":"ok","v":"1.200"},
                 {"c":"divexdt","s":"ok","v":"2022-07-19T00:00:00.000000000"}
                ]
        },
        {"symbol":"C_S U","status":"ok",
         "data":[
                 {"c":"divamt","s":"ok","v":"0.510"},
                 {"c":"divexdt","s":"ok","v":"2022-07-31T00:00:00.000000000"}
                ]
        }
       ]
}

Company dividend data is updated on dividend declaration date.

Data Column Id Description
divtype Dividend Type, possible values are monthly, quarterly or annual
divamt Dividend Amount
divdecldt Dividend Declare Date
divexdt Dividend Ex-Div Date
divrecdt Dividend Record Date
divpaydt Dividend Payable Date

Company Information

Example for requesting company name for AAPL stock:

symbols parameter is set to AAPL stock, and columns parameter is set to column id "sd"

https://api.activetick.com/snapshot.json?sessionid=MY_SESSIONID&symbols=AAPL_S-U&columns=sd

Example response:

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"AAPL_S U","status":"ok",
         "data":[
                 {"c":"sd","s":"ok","v":"Apple Inc."}
                ]
        }
       ]
}
Data Column Id Description
sd Short Description
ld Long Description
sic Stock SIC Code
sik Stock SIK Code
pex Stock Primary Exchange

Chains

About Chains

Making an option chain request example for stock JNJ with common data columns:

curl -X GET 'https://api.activetick.com/chain.json?sessionid=MY_SESSIONID&key=JNJ_S-U&chaintype=equity_options&columns=pc,l,b,a,bsz,asz,vol,ltm&begin_maturity_time=2022-01-01T00:00:00&end_maturity_time=2022-01-10T00:00:00&ignore_empty=true'
-H "Connection: Keep-Alive"
-H "Accept: application/json"

Reponse example:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 30375

{
"type":"chain",
"status":"ok",
"key":"JNJ_S U",
"rows":[
        {"s":"JNJ_220107C12000C_O U","st":"ok","data":[
                {"c":"pc","s":"ok","v":"0"},
                {"c":"l","s":"ok","v":"0"},
                {"c":"b","s":"ok","v":"52.80"},
                {"c":"a","s":"ok","v":"54.85"},
                {"c":"bsz","s":"ok","v":"27"},
                {"c":"asz","s":"ok","v":"28"},
                {"c":"ltm","s":"ok","v":"0000-00-00T00:00:00.000000000"}
                ]
        },
        {"s":"JNJ_220107C12500C_O U","st":"ok","data":[
                {"c":"pc","s":"ok","v":"48.93"},
                {"c":"l","s":"ok","v":"48.93"},
                {"c":"b","s":"ok","v":"47.80"},
                {"c":"a","s":"ok","v":"50.50"},
                {"c":"bsz","s":"ok","v":"30"},
                {"c":"asz","s":"ok","v":"30"},
                {"c":"ltm","s":"ok","v":"2022-01-07T18:34:37.990390784"}
                ]
        },
        {"s":"JNJ_220107C13000C_O U","st":"ok","data":[
                {"c":"pc","s":"ok","v":"0"},
                {"c":"l","s":"ok","v":"0"},
                {"c":"b","s":"ok","v":"42.15"},
                {"c":"a","s":"ok","v":"45.50"},
                {"c":"bsz","s":"ok","v":"30"},
                {"c":"asz","s":"ok","v":"30"},
                {"c":"ltm","s":"ok","v":"0000-00-00T00:00:00.000000000"}
                ]
        },
        {"s":"JNJ_220107C13500C_O U","st":"ok","data":[
                {"c":"pc","s":"ok","v":"32.10"},
                {"c":"l","s":"ok","v":"32.10"},
                {"c":"b","s":"ok","v":"36.55"},
                {"c":"a","s":"ok","v":"39.70"},
                {"c":"bsz","s":"ok","v":"31"},
                {"c":"asz","s":"ok","v":"30"},
                {"c":"ltm","s":"ok","v":"2021-12-20T14:52:18.772381696"}
                ]
        },
        ...
        ...
]
}

Making a future option spread chain request example for future group "ES" SP500 eMini with bid, ask and last price information:

curl -X GET 'https://api.activetick.com/chain.json?sessionid=MY_SESSIONID&key=ES_OOF_CU&chaintype=future_option_spreads&columns=b,a,l&begin_maturity_time=2022-07-01T00:00:00&end_maturity_time=2022-09-10T00:00:00&ignore_empty=true'
-H "Connection: Keep-Alive"
-H "Accept: application/json"

Response example:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 62233

{
"type":"chain",
"status":"ok",
"key":"ES_OOF_CU",
"rows":[
        {"s":"UD:1V: GN 0118814841_DCU","st":"ok","data":[
              {"c":"b","s":"ok","v":"0"},
              {"c":"a","s":"ok","v":"0"},
              {"c":"l","s":"ok","v":"39.00"}
         ]
        },
        {"s":"UD:1V: GN 0118814844_DCU","st":"ok","data":[
              {"c":"b","s":"ok","v":"0"},
              {"c":"a","s":"ok","v":"0"},
              {"c":"l","s":"ok","v":"19.50"}
         ]
        },
        {"s":"UD:1V: GN 0124805391_DCU","st":"ok","data":[
              {"c":"b","s":"ok","v":"2.05"},
              {"c":"a","s":"ok","v":"20.25"},
              {"c":"l","s":"ok","v":"0"}
         ]
        },
        {"s":"UD:1V: GN 0124816065_DCU","st":"ok","data":[
              {"c":"b","s":"ok","v":"-4.05"},
              {"c":"a","s":"ok","v":"16.25"},
              {"c":"l","s":"ok","v":"0"}
         ]
        },
        ...
        ...
      ]
}

Instrument chains provide a list of instruments linked to a certain key. For example, a list of all option contracts can be returned from an option chain request given a stock symbol key. Similar to snapshot requests, chains return rows of instruments linked to a key, along with requested data columns.

ActiveTick MarketFeed supports multiple types of chains including:

Chain Request

https://api.activetick.com/chain.json?sessionid=MY_SESSIONID&key=KEY&chaintype=CHAIN_TYPE&columns=COL1,COL2&begin_maturity_time=DATE_TIME&end_maturity_time=DATE_TIME&ignore_empty=BOOLEAN

Request Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
key yes String key specific to chain type. For option chains, key is underlying symbol.
chaintype yes Type of chain to return.
columns yes List of data columns separated by commas.
begin_maturity_time yes Begin time filter to include maturity dates for contracts.
end_maturity_time yes End time filter to include maturity dates for contracts.
ignore_empty no Ignore empty instruments without data. (true/false)

begin_maturity_time and end_maturity_time parameters are formatted using standard YYYY-MM-DDThh:mm:ss format.

Chain Types and Keys

Key formatting depends on type of chain being requested. The following table lists possible chain types, and their corresponding key formats:

Chain Type Key Format Example
equity_options Standard Stock "AAPL_S U" - Apple Inc Stock
futures A_BC "ES_CU" - CME S&P500 eMini, "GC_XU" - COMEX Gold
future_options A_OOF_BC "ES_OOF_CU" - CME S&P500 eMini
future_spreads A_OOF_BC "ES_OOF_CU" - CME S&P500 eMini
future_option_spreads A_OOF_BC "GC_OOF_XU" - COMEX Gold
future_mixed_legs A_MLEG_BC "GC_MLEG_XU" - COMEX Gold

Where: A = Future Group Name, such as "ES". B = Future Exchange Code. C = Future Country Code.

Data Columns: Intraday Pricing | Calculated Data | Option Greeks

Chain Response

Chain response is very similar to Snapshot response, in the way data is returned back.

Name Description
type "chain"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
key Original request key.
rows Array of data rows for each instrument symbol.

For each included instrument, the server responds with a row of data which includes information about the row, and the data itself.

Name Description
s Instrument symbol.
st Row status code indicating if symbol information was successfully returned. Possible values are "ok" and "fail".
data Array of data values for each requested column.

The data array inside the row contains information for each requested column.

Name Description
c Data column id.
s Data column status. Possible values are "ok" and "fail".
v Data value.

Market Depth

About Market Depth

Example of book snapshot request:

curl -X GET 'https://api.activetick.com/book_snapshot.json?sessionid=MY_SESSIONID&symbol=ES_221200_FCU&source=cme'
-H "Connection: Keep-Alive"
-H "Accept: application/json"

Response example:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 130375

{
"type":"book_snapshot",
"status":"ok",
"symbol":"ES_221200_FCU",
"book":[
    {"x":"b","i":"0","f":"0","a":"XCME","p":"3798.25","q":"29","o":"13","tm":"2022-10-05T20:33:48.658594123"},
    {"x":"b","i":"1","f":"0","a":"XCME","p":"3798.00","q":"16","o":"12","tm":"2022-10-05T20:33:39.785749989"},
    {"x":"b","i":"2","f":"0","a":"XCME","p":"3797.75","q":"20","o":"13","tm":"2022-10-05T20:33:42.793768745"},
    {"x":"b","i":"3","f":"0","a":"XCME","p":"3797.50","q":"16","o":"14","tm":"2022-10-05T20:33:48.628762779"},
    {"x":"b","i":"4","f":"0","a":"XCME","p":"3797.25","q":"22","o":"18","tm":"2022-10-05T20:33:40.958007365"},
    {"x":"b","i":"5","f":"0","a":"XCME","p":"3797.00","q":"32","o":"18","tm":"2022-10-05T20:33:34.517982799"},
    {"x":"b","i":"6","f":"0","a":"XCME","p":"3796.75","q":"24","o":"18","tm":"2022-10-05T20:33:34.733008445"},
    {"x":"b","i":"7","f":"0","a":"XCME","p":"3796.50","q":"36","o":"17","tm":"2022-10-05T20:33:34.520458023"},
    {"x":"b","i":"8","f":"0","a":"XCME","p":"3796.25","q":"30","o":"21","tm":"2022-10-05T20:33:33.020713477"},
    {"x":"b","i":"9","f":"0","a":"XCME","p":"3796.00","q":"123","o":"19","tm":"2022-10-05T20:33:33.040239731"},
    {"x":"a","i":"0","f":"0","a":"XCME","p":"3798.50","q":"13","o":"11","tm":"2022-10-05T20:33:48.117091657"},
    {"x":"a","i":"1","f":"0","a":"XCME","p":"3798.75","q":"21","o":"17","tm":"2022-10-05T20:33:38.990760313"},
    {"x":"a","i":"2","f":"0","a":"XCME","p":"3799.00","q":"30","o":"20","tm":"2022-10-05T20:33:35.046178439"},
    {"x":"a","i":"3","f":"0","a":"XCME","p":"3799.25","q":"33","o":"17","tm":"2022-10-05T20:33:34.518346753"},
    {"x":"a","i":"4","f":"0","a":"XCME","p":"3799.50","q":"24","o":"15","tm":"2022-10-05T20:33:38.600102333"},
    {"x":"a","i":"5","f":"0","a":"XCME","p":"3799.75","q":"37","o":"25","tm":"2022-10-05T20:33:22.249174173"},
    {"x":"a","i":"6","f":"0","a":"XCME","p":"3800.00","q":"56","o":"23","tm":"2022-10-05T20:33:32.918978261"},
    {"x":"a","i":"7","f":"0","a":"XCME","p":"3800.25","q":"31","o":"22","tm":"2022-10-05T20:33:43.189951101"},
    {"x":"a","i":"8","f":"0","a":"XCME","p":"3800.50","q":"36","o":"21","tm":"2022-10-05T20:33:37.357581951"},
    {"x":"a","i":"9","f":"0","a":"XCME","p":"3800.75","q":"41","o":"24","tm":"2022-10-05T20:33:36.673868003"}
       ]
}

Market depth order books provide an electronic list of buy and sell orders for a financial instrument sorted by price level. An order book displays number of shares or contracts being bid and offered at each price point, or market depth. It also identifies participants behind buy and sell orders.

MarketFeed book snapshot provides dynamically updated list of current orders using book_snapshot endpoint.

Depending on the type of order book data feed, the dataset offered is either aggregated or full order book. With aggregated order book, all orders at the same price level are aggregated into a single line whereas with full order book, all orders show up individually within each price level.

Market Depth Snapshot Request

https://api.activetick.com/book_snapshot.json?sessionid=MY_SESSIONID&symbol=SYMBOL&source=SOURCE

Request Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
symbol yes Instrument symbol.
source yes Book source data.

Book Sources

A book source parameter is required in order to select data feed source since a single instrument can have multiple order books.

Source Description
totalview Nasdaq TotalView
openbook NYSE Openbook
otcmarkets OTC Markets
cme CME Exchange
nymex NYMEX Exchange
comex COMEX Exchange
cbot CBOT Exchange

Market Depth Snapshot Response

Book snapshot response contains response metadata and an array of orders for each market side.

Name Description
type "book_snapshot"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
symbol Original request instrument symbol.
book Book array of order book items for each order inside the snapshot.

Book Item

{
  "x": "b",
  "i": "0",
  "f": "0",
  "a": "XCME",
  "p": "3798.25",
  "q": "29",
  "o": "13",
  "tm": "2022-10-05T20:33:48.658594123"
}

Each book item contains information about an order.

Name Description
x Market side for the order. Possible values are "b" for bid, and "a" for ask sides.
i Index where the entry should be inserted.
f Flags. Exchange-specific flags.
a Attribution value. Value can be a market maker, exchange, ETN, etc.
p Price.
q Share/contract quantity.
o Number of orders at current price level for aggregate books.
tm Timestamp of last update. The value is formatted in YYYY-MM-DDTHH:MM:SS.nnnnnnnnnn format.

Market Performers

About Market Performers

Making a market performers request for Top Actives by Volume for NYSE exchange example:

curl -X GET 'https://api.activetick.com/performers.json?sessionid=MY_SESSIONID&type=volume&source=nyse&columns=l,b,a,v,ltm'
-H "Connection: Keep-Alive"
-H "Accept: application/json"

Response example:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 7540

{
"type":"performers",
"status":"ok",
"type":"volume",
"rows":[
        {"s":"CCL_S U","st":"ok","data":
         [
          {"c":"l","s":"ok","v":"7.21"},
          {"c":"b","s":"ok","v":"7.20"},
          {"c":"a","s":"ok","v":"7.21"},
          {"c":"v","s":"ok","v":"196073023"},
          {"c":"ltm","s":"ok","v":"2022-09-30T18:15:59.528204800"}
         ]
        },
        {"s":"F_S U","st":"ok","data":
         [
          {"c":"l","s":"ok","v":"11.325"},
          {"c":"b","s":"ok","v":"11.32"},
          {"c":"a","s":"ok","v":"11.33"},
          {"c":"v","s":"ok","v":"45671204"},
          {"c":"ltm","s":"ok","v":"2022-09-30T18:15:59.891052800"}
         ]
        },
        {"s":"VALE_S U","st":"ok","data":
         [
          {"c":"l","s":"ok","v":"13.435"},
          {"c":"b","s":"ok","v":"13.43"},
          {"c":"a","s":"ok","v":"13.44"},
          {"c":"v","s":"ok","v":"40729644"},
          {"c":"ltm","s":"ok","v":"2022-09-30T18:15:59.824107776"}
         ]
        },
        {"s":"NKE_S U","st":"ok","data":
         [
          {"c":"l","s":"ok","v":"83.85"},
          {"c":"b","s":"ok","v":"83.84"},
          {"c":"a","s":"ok","v":"83.86"},
          {"c":"v","s":"ok","v":"39276874"},
          {"c":"ltm","s":"ok","v":"2022-09-30T18:15:59.981026816"}
         ]
        },
        ...
        ...
      ]
}

MarketFeed servers analyze real-time data feeds and create lists of top performers in various categories. Market performers are updated throughout the trading session, and are available for securities listed on major exchanges.

Market performers datasets are accessible using performers endpoint. The endpoint is capable of returning a single list of securities for a given category type, exchange source and a list of data columns. When specifying data columns to include in response, same data columns described in Core Data Snapshots can be used to select and return data.

Market Performers Request

https://api.activetick.com/performers.json?sessionid=MY_SESSIONID&type=TYPE&source=SOURCE&columns=COL1,COL2

Request Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
type yes Category type for top performers. Can be one of the values from a table below.
source yes Exchange source.
column yes List of data columns separated by commas. Can be any column id from Core Data Snapshot.

Market Performers Category Types

Type Description
volume Most actives by volume.
net_gainers Gainers by largest value gain.
net_losers Losers by largest value loss.
percent_gainers Gainers by largest percentage gain.
percent_losers Losers by largest percentage loss.

Market Performers Exchange Sources

Source Description
nyse NYSE-listed securities.
nyse_other Securities listed on other NYSE exchanges, including NYSE American, NYSE Arca, Bats.
nasdaq NASDAQ-listed securities.
otc OTC-listed securities.

Market Performers Response

Market performers response is very similar to Snapshot response, in the way data is returned back.

Name Description
type "performers"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
type Original request type.
rows Array of data rows for each instrument symbol.

For each included instrument, the server responds with a row of data which includes information about the row, and the data itself.

Name Description
s Instrument symbol.
st Row status code indicating if symbol information was successfully returned. Possible values are "ok" and "fail".
data Array of data values for each requested column.

The data array inside the row contains information for each requested column.

Name Description
c Data column id.
s Data column status. Possible values are "ok" and "fail".
v Data value.

Historical

About Historical Data

MarketFeed processes exchange feeds in real-time and stores the data in its historical databases. The following datasets are provided with MarketFeed’s API:

The primary way of querying historical data using API is by providing instrument symbol, historical time range for which to include the data in response, and some additional query parameters.

Chart Data

Making intraday bar request example for AAPL:

curl -X GET 'https://api.activetick.com/bars.json?sessionid=MY_SESSIONID&symbol=AAPL_S-U&bartype=intraday&minute=1&begintime=2022-01-10T00:00:00&endtime=2022-01-21T00:00:00&sessiontype=both&include_empty_bars=false' 
-H "Connection: Keep-Alive" 
-H "Accept: application/json"

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 38211

{
"type": "bars",
"status": "ok",
"symbol": "AAPL_S U",
"bars": [
        {"tm": "2022-01-10T09:00:00","o": "172.17","h": "172.77","l": "172.16","c": "172.34","v": "1295","t": "109"},
        {"tm": "2022-01-10T09:01:00","o": "172.35","h": "172.42","l": "172.26","c": "172.28","v": "932","t": "82"},
        {"tm": "2022-01-10T09:02:00","o": "172.28","h": "172.31","l": "172.15","c": "172.16","v": "1028","t": "57"},
        {"tm": "2022-01-10T09:03:00","o": "172.19","h": "172.24","l": "172.16","c": "172.24","v": "2051","t": "70"},
        {"tm": "2022-01-10T09:04:00","o": "172.24","h": "172.28","l": "172.15","c": "172.17","v": "1615","t": "110"},
        {"tm": "2022-01-10T09:05:00","o": "172.16","h": "172.26","l": "172.16","c": "172.25","v": "334","t": "18"},
        {"tm": "2022-01-10T09:06:00","o": "172.26","h": "172.31","l": "172.25","c": "172.30","v": "1475","t": "53"},
        {"tm": "2022-01-10T09:07:00","o": "172.28","h": "172.36","l": "172.27","c": "172.31","v": "615","t": "28"},
        {"tm": "2022-01-10T09:08:00","o": "172.30","h": "172.35","l": "172.30","c": "172.31","v": "590","t": "26"},
        {"tm": "2022-01-10T09:09:00","o": "172.35","h": "172.38","l": "172.32","c": "172.38","v": "246","t": "13"},
        {"tm": "2022-01-10T09:10:00","o": "172.36","h": "172.40","l": "172.35","c": "172.40","v": "462","t": "21"},
        {"tm": "2022-01-10T09:11:00","o": "172.39","h": "172.40","l": "172.36","c": "172.36","v": "1132","t": "53"},
    ...
    ...
]
}

Example for requesting 30-minute regular-session only intraday bars without empty bars for symbol IBM:

https://api.activetick.com/bars.json?sessionid=MY_SESSIONID&symbol=IBM_S-U&bartype=intraday&minute=30&begintime=2022-01-10T00:00:00&endtime=2022-01-13T00:00:00&sessiontype=regular&include_empty_bars=false

Example response:

{
"type":"bars",
"status":"ok",
"symbol":"IBM_S U",
"bars":[
    {"tm":"2022-01-10T14:30:00","o":"134.47","h":"136.20","l":"133.77","c":"133.77","v":"718000","t":"2559"},
    {"tm":"2022-01-10T15:00:00","o":"133.86","h":"134.28","l":"133.4501","c":"133.91","v":"492752","t":"2191"},
    {"tm":"2022-01-10T15:30:00","o":"133.905","h":"134.22","l":"133.38","c":"134.18","v":"343356","t":"1496"},
    {"tm":"2022-01-10T16:00:00","o":"134.19","h":"134.785","l":"133.92","c":"134.575","v":"288426","t":"1302"},
    {"tm":"2022-01-10T16:30:00","o":"134.56","h":"135.11","l":"133.98","c":"135.03","v":"280954","t":"1256"},
    {"tm":"2022-01-10T17:00:00","o":"135.02","h":"135.6699","l":"134.955","c":"135.595","v":"215186","t":"868"},
    {"tm":"2022-01-10T17:30:00","o":"135.60","h":"135.75","l":"135.37","c":"135.445","v":"198750","t":"895"},
    {"tm":"2022-01-10T18:00:00","o":"135.46","h":"135.71","l":"135.3601","c":"135.609","v":"174398","t":"823"},
    {"tm":"2022-01-10T18:30:00","o":"135.61","h":"135.80","l":"135.46","c":"135.74","v":"249342","t":"1258"},
    {"tm":"2022-01-10T19:00:00","o":"135.74","h":"136.20","l":"135.69","c":"135.691","v":"260897","t":"1282"},
    {"tm":"2022-01-10T19:30:00","o":"135.702","h":"135.76","l":"135.15","c":"135.435","v":"238330","t":"1105"},
    {"tm":"2022-01-10T20:00:00","o":"135.45","h":"135.48","l":"134.92","c":"135.01","v":"241435","t":"1208"},
    {"tm":"2022-01-10T20:30:00","o":"135.03","h":"135.25","l":"134.80","c":"135.00","v":"760449","t":"4131"},
    {"tm":"2022-01-10T21:00:00","o":"135.03","h":"135.03","l":"135.03","c":"135.03","v":"750364","t":"1"},
    {"tm":"2022-01-11T14:30:00","o":"130.52","h":"131.19","l":"127.97","c":"129.55","v":"2869371","t":"11591"},
    {"tm":"2022-01-11T15:00:00","o":"129.5399","h":"129.90","l":"129.04","c":"129.50","v":"961428","t":"4113"},
    {"tm":"2022-01-11T15:30:00","o":"129.52","h":"130.32","l":"129.26","c":"130.11","v":"923254","t":"3412"},
    {"tm":"2022-01-11T16:00:00","o":"130.09","h":"130.74","l":"130.03","c":"130.61","v":"499019","t":"2363"},
    {"tm":"2022-01-11T16:30:00","o":"130.63","h":"131.19","l":"130.16","c":"130.3301","v":"481564","t":"2107"},
    {"tm":"2022-01-11T17:00:00","o":"130.355","h":"131.44","l":"130.28","c":"131.07","v":"369014","t":"1601"},
    {"tm":"2022-01-11T17:30:00","o":"131.10","h":"131.77","l":"131.07","c":"131.67","v":"322900","t":"1294"},
    {"tm":"2022-01-11T18:00:00","o":"131.64","h":"131.65","l":"131.07","c":"131.4982","v":"314244","t":"1418"},
    {"tm":"2022-01-11T18:30:00","o":"131.51","h":"131.62","l":"131.1701","c":"131.489","v":"625869","t":"1189"},
    {"tm":"2022-01-11T19:00:00","o":"131.49","h":"131.88","l":"131.21","c":"131.83","v":"282075","t":"1297"},
    {"tm":"2022-01-11T19:30:00","o":"131.84","h":"132.42","l":"131.76","c":"132.245","v":"434411","t":"1962"},
    {"tm":"2022-01-11T20:00:00","o":"132.245","h":"133.07","l":"132.1752","c":"132.595","v":"751269","t":"3249"},
    {"tm":"2022-01-11T20:30:00","o":"132.61","h":"133.25","l":"132.6012","c":"132.83","v":"1180543","t":"5754"},
    {"tm":"2022-01-11T21:00:00","o":"132.87","h":"132.87","l":"132.87","c":"132.87","v":"734796","t":"1"},
    {"tm":"2022-01-12T14:30:00","o":"133.25","h":"134.47","l":"132.18","c":"132.20","v":"726627","t":"3093"},
    {"tm":"2022-01-12T15:00:00","o":"132.22","h":"132.29","l":"131.69","c":"131.88","v":"423198","t":"1810"},
    {"tm":"2022-01-12T15:30:00","o":"131.88","h":"132.17","l":"131.37","c":"132.02","v":"436983","t":"2001"},
    {"tm":"2022-01-12T16:00:00","o":"132.03","h":"132.1999","l":"131.48","c":"132.07","v":"328335","t":"1615"},
    {"tm":"2022-01-12T16:30:00","o":"132.06","h":"132.73","l":"132.06","c":"132.63","v":"315952","t":"1449"},
    {"tm":"2022-01-12T17:00:00","o":"132.61","h":"133.07","l":"132.51","c":"132.84","v":"239201","t":"1046"},
    {"tm":"2022-01-12T17:30:00","o":"132.83","h":"133.27","l":"132.62","c":"133.155","v":"195979","t":"920"},
    {"tm":"2022-01-12T18:00:00","o":"133.155","h":"133.42","l":"133.005","c":"133.35","v":"226431","t":"880"},
    {"tm":"2022-01-12T18:30:00","o":"133.36","h":"133.505","l":"132.89","c":"133.085","v":"233383","t":"974"},
    {"tm":"2022-01-12T19:00:00","o":"133.07","h":"133.24","l":"132.975","c":"133.1642","v":"320687","t":"1331"},
    {"tm":"2022-01-12T19:30:00","o":"133.18","h":"133.21","l":"132.806","c":"132.81","v":"282325","t":"1199"},
    {"tm":"2022-01-12T20:00:00","o":"132.82","h":"133.345","l":"132.77","c":"133.28","v":"274603","t":"1206"},
    {"tm":"2022-01-12T20:30:00","o":"133.28","h":"133.72","l":"133.21","c":"133.61","v":"492124","t":"2570"},
    {"tm":"2022-01-12T21:00:00","o":"133.59","h":"133.59","l":"133.59","c":"133.59","v":"452182","t":"1"}
 ]  
}

Historical charting data is made up of bars with open/high/low/close prices, along with volume information. Each bar represents pricing movements during a certain timeframe, and volume accumulation for that period. For timeframes, we support intraday minutely bars, ranging between 1-60 minutes, as well as daily and weekly bars.

All historical bar data is adjusted for splits and dividends.

There are certain limits for beginning and ending requesting time ranges. If the timespan exceeds limits, a 400 error is returned and request needs to be adjusted to comply with limits.

Bar type Limit
Intraday Limit 30 days
Daily Limit 5 years
Weekly Limit 5 years

By default, the API does not return empty bars if trading hasn’t happened within bar’s timeframe. However, if empty bars are needed for things such as technical analysis calculations, an optional parameter can be passed to include empty bars in response. In such case, empty bars will include last bar’s pricing information without any volume.

Bar Data Request

https://api.activetick.com/bars.json?sessionid=MY_SESSIONID&symbol=SYMBOL&bartype=BARTYPE&minute=MINUTE&begintime=DATE_TIME&endtime=DATE_TIME&sessiontype=SESSIONTYPE&include_empty_bars=BOOLEAN

Request Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
symbol yes Instrument symbol.
bartype yes Type of bars.
minute no Intraday minute compression. Required parameter for intraday bars.
begintime yes Begin time.
endtime yes End time.
sessiontype no Optional parameter specifying type of session. Defaults to both if parameter is not set.
include_empty_bars no Optional boolean parameter to include empty bars in response even if trades didn't happen for those bars. Defaults to false if paramter is not set.

begintime and endtime parameters are formatted using standard YYYY-MM-DDThh:mm:ss format.

Bar Types

Bar Type Description
intraday Intraday 1-60 minute bars. One bar represents number of minutes passed in request.
daily Daily bars. One bar represents single day.
weekly Weekly bars. One bar represents whole week.

Bar Session Types

Session Type Description
regular Returns regular session trading only.
extended Returns extended hours sessions trading only.
both Returns both regular and extended hours sessions.

Bar Response

Bar data response contains response metadata and an array of pricing information for each bar.

Name Description
type "bars"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
symbol Original request symbol.
bars Array of data bars with pricing information.

Bar Item

Example of a single bar data item:

{ 
   "tm":"2022-01-12T19:00:00",
   "o":"133.07",
   "h":"133.24",
   "l":"132.975",
   "c":"133.1642",
   "v":"320687",
   "t":"1331"
}

Within bars array, each data item contains information specific to a single bar.

Name Description
tm Bar time. The value is formatted in YYYY-MM-DDTHH:MM:SS format.
o Open price.
h High price.
l Low price.
c Close price.
v Volume.
t Trade counts.

Time Series Data

Making time series tick data request example for AAPL with a maximum of 1000 records:

curl -X GET 'https://api.activetick.com/ticks.json?sessionid=MY_SESSIONID&symbol=AAPL_S-U&ticktype=both&maxrecords=1000&begintime=2022-01-21T10:00:00&endtime=2022-01-21T12:00:00'
-H "Connection: Keep-Alive"
-H "Accept: application/json"

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 151584

{
"type":"ticks",
"status":"ok",
"symbol":"AAPL_S U",
"ticks":[
        {"t":"q","i":"2835","tm":"2022-01-21T10:00:01.265742794","b":"163.82","a":"163.93","bx":"P","ax":"Q","bz":"2","az":"1","c":"0"},
        {"t":"t","i":"6626","tm":"2022-01-21T10:00:02.986469412","l":"163.90","x":"P","z":"1","f":"194","c":["37","12","0","0"]},
        {"t":"t","i":"6627","tm":"2022-01-21T10:00:03.998868509","l":"163.90","x":"Q","z":"20","f":"194","c":["37","12","0","0"]},
        {"t":"t","i":"6628","tm":"2022-01-21T10:00:03.998873260","l":"163.90","x":"Q","z":"7","f":"194","c":["37","12","0","0"]},
        {"t":"t","i":"6629","tm":"2022-01-21T10:00:03.999450924","l":"163.90","x":"P","z":"29","f":"194","c":["37","12","0","0"]},
        {"t":"q","i":"2836","tm":"2022-01-21T10:00:05.082729164","b":"163.82","a":"163.94","bx":"P","ax":"P","bz":"2","az":"1","c":"0"},
        {"t":"t","i":"6630","tm":"2022-01-21T10:00:05.082732879","l":"163.93","x":"Q","z":"30","f":"194","c":["37","12","0","0"]},
        {"t":"t","i":"6631","tm":"2022-01-21T10:00:07.042183294","l":"163.90","x":"P","z":"21","f":"194","c":["37","12","0","0"]},
        {"t":"t","i":"6632","tm":"2022-01-21T10:00:07.042183412","l":"163.89","x":"P","z":"1","f":"194","c":["37","12","0","0"]},
        {"t":"q","i":"2837","tm":"2022-01-21T10:00:11.993624918","b":"163.82","a":"163.93","bx":"P","ax":"P","bz":"2","az":"1","c":"0"},
        {"t":"t","i":"6633","tm":"2022-01-21T10:00:12.314534157","l":"163.89","x":"P","z":"9","f":"194","c":["37","12","0","0"]},
        {"t":"t","i":"6634","tm":"2022-01-21T10:00:12.314593373","l":"163.89","x":"P","z":"125","f":"194","c":["0","12","14","0"]},
        {"t":"t","i":"6635","tm":"2022-01-21T10:00:13.337067632","l":"163.90","x":"Q","z":"73","f":"194","c":["37","12","14","0"]},
        {"t":"t","i":"6636","tm":"2022-01-21T10:00:13.337070429","l":"163.87","x":"Q","z":"27","f":"194","c":["37","12","14","0"]},
    ...
    ...
]
}

Historical time series data is made up of all original market events received from exchange data feeds. The datasets include information on all trade transactions, as well as full bid/ask quote pricing. Time series data is primarily used for market analysis, trading system back-testing, market research and other applications.

For instruments trading on multiple exchanges, such as US stocks, the API provides time series data for individual exchanges as well as fully consolidated datasets. The data stored in our time series databases is kept with original pricing information, and isn’t split or dividend adjusted.

Consideration should be taken when querying data for active symbols, as some actively traded instruments could contain several million rows of data each trading session.

There are limits with how many rows of data can be requested in a single request. Each request must include a maximum number of expected rows, and cannot exceed 50,000. Additionally, beginning and ending timespan cannot exceed more than one day.

All time series tick data records contain nanosecond timestamps.

Tick Data Request

https://api.activetick.com/ticks.json?sessionid=MY_SESSIONID&symbol=SYMBOL&ticktype=TICKTYPE&maxrecords=MAXRECORDS&begintime=DATE_TIME&endtime=DATE_TIME

Request Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
symbol yes Instrument symbol.
ticktype yes Type of tick data to return.
maxrecords yes Maximum number of records to return within requesting time range. (Up to 50,000).
begintime yes Begin time for requesting range.
endtime yes End time for requesting range.

begintime and endtime parameters are formatted using standard YYYY-MM-DDThh:mm:ss format.

Tick Types

Tick types specify the type of records to include in response.

Tick Type Description
trades Trade records only. Trade records contain trade transaction information.
quotes Quote records only. Quote records contain bid/ask pricing information.
both Both trade and quote records.

Time Series Response

Time series response contains response metadata, and an array of pricing information matching requested parameters. Based on requested tickType, the array could contain different types of items in its response.

Name Description
type "ticks"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
symbol Original instrument symbol.
ticks Array of data ticks consisting of time series data.

Quote Tick Item

Example of a single quote tick item:

{
  "t":"q",
  "i":"2836",
  "tm":"2022-01-21T10:00:05.082729164",
  "b":"163.82",
  "a":"163.94",
  "bx":"P",
  "ax":"P",
  "bz":"2",
  "az":"1",
  "c":"0"
}

Quote item contains bid/ask information. Quotes typically get updated whenever new orders are added, updated or removed on either side, or after a trade is made and order is no longer advertised.

Name Description
t Type of tick record, set to "q" for quote.
i Index of tick record for current day.
tm Tick record time.
b Bid price.
a Ask price.
bx Bid exchange.
ax Ask exchange.
bz Bid size.
az Ask size.
c Quote condition.

Quote Conditions

Quote conditions are exchange-specific conditions.

Quote Condition Value
RegularQuote 0
RegularTwoSidedOpenQuote 1
RegularOneSidedOpenQuote 2
SlowAskQuote 3
SlowBidQuote 4
SlowBidAskQuote 5
SlowDueLRPBidQuote 6
SlowDueLRPAskQuote 7
SlowDueNYSELRPQuote 8
SlowDueSetSlowListBidAskQuote 9
ManualAskAutomaticBidQuote 10
ManualBidAutomaticAskQuote 11
ManualBidAndAskQuote 12
OpeningQuote 13
ClosingQuote 14
ClosedQuote 15
ResumeQuote 16
FastTradingQuote 17
TradingRangeIndicationQuote 18
MarketMakerQuotesClosedQuote 19
NonFirmQuote 20
NewsDisseminationQuote 21
OrderInfluxQuote 22
OrderImbalanceQuote 23
DueToRelatedSecurityNewsDisseminationQuote 24
DueToRelatedSecurityNewsPendingQuote 25
AdditionalInformationQuote 26
NewsPendingQuote 27
AdditionalInformationDueToRelatedSecurityQuote 28
DueToRelatedSecurityQuote 29
InViewOfCommonQuote 30
EquipmentChangeoverQuote 31
NoOpenNoResumeQuote 32
SubPennyTradingQuote 33
AutomatedBidNoOfferNoBid 34
LuldPriceBand 35
MarketWideCircuitBreakerLevel1 36
MarketWideCircuitBreakerLevel2 37
MarketWideCircuitBreakerLevel3 38
RepublishedLuldPriceBand 39
IntradayAuction 40

Trade Tick Item

Example of a single trade tick item:

{  
  "t":"t",
  "i":"6636",
  "tm":"2022-01-21T10:00:13.337070429",
  "l":"163.87",
  "x":"Q",
  "z":"27",
  "f":"194",
  "c":["37","12","14","0"]
}

Trade item contains information about a sale transaction. Trades typically get sent by exchanges whenever a match is made between a buyer and seller at specified price and quantity.

Name Description
t Type of tick record, set to "t" for trade.
i Index of tick record for current day.
tm Tick record time.
l Last traded price.
x Last traded exchange.
z Last traded size.
f Trade flags. This is an integer value with ORed trade flags.
c Array of 4 trade conditions.

Trade Flags

Trade flags are special flags added by MarketFeed to indicate a presence of certain trade attributes. Multiple trade flags can exist for a single trade event. For example, trade’s price can be the highest price of the day, and it can also be the opening price at the same time.

MarketFeed combines all possible trade flags into a single integer using bitwise OR. To check for existence of a certain flag, a simple bitwise AND check for the trade flag bit can be made.

Trade Flag Value Description
RegularMarketLastPrice 0x1 Last price is valid and is in regular trading session.
RegularMarketVolume 0x2 Last size is valid and is in regular trading session.
HighPrice 0x4 Last price is the high and is in regular trading session.
LowPrice 0x8 Last price is the low and is in regular trading session.
DayHighPrice 0x10 Last price is the high of the day, both for regular and extended trading sessions.
DayLowPrice 0x20 Last price is the low of the day, both for regular and extended trading sessions.
ExtendedMarketLastPrice 0x40 Last price is valid and is in extended trading session.
PreMarketVolume 0x80 Last size is valid and is in pre-open extended trading session.
AfterMarketVolume 0x100 Last size is valid and is in after-close extended trading session.
ClosePrice 0x200 Last price is the closing price for current session.
OpenPrice 0x400 Last price is the open price for current session.

Trade Conditions

Trade conditions are exchange-specific conditions. A single trade event can contain up to 4 different trade conditions.

Trade Condition Value
RegularTrade 0
AcquisitionTrade 1
AveragePriceTrade 2
AutomaticExecutionTrade 3
BunchedTrade 4
BunchSoldTrade 5
CAPElectionTrade 6
CashTrade 7
ClosingTrade 8
CrossTrade 9
DerivativelyPricedTrade 10
DistributionTrade 11
FormTTrade 12
FormTOutOfSequenceTrade 13
InterMarketSweepTrade 14
MarketCenterOfficialCloseTrade 15
MarketCenterOfficialOpenTrade 16
MarketCenterOpeningTrade 17
MarketCenterReOpenningTrade 18
MarketCenterClosingTrade 19
NextDayTrade 20
PriceVariationTrade 21
PriorReferencePriceTrade 22
Rule155AmexTrade 23
Rule127NyseTrade 24
OpeningTrade 25
OpenedTrade 26
RegularStoppedStockTrade 27
ReOpeningTrade 28
SellerTrade 29
SoldLastTrade 30
SoldLastStoppedStockTrade 31
SoldOutOfSequenceTrade 32
SoldOutOfSequenceStoppedStockTrade 33
SplitTrade 34
ContingentTrade 35
YellowFlagTrade 36
OddLotTrade 37
QualifiedContingentTrade 38
CorrectedConsolidatedClosePrice 39

Dividend Data

Making dividend history request example for AAPL stock:

curl -X GET 'https://api.activetick.com/dividends.json?sessionid=MY_SESSIONID&symbol=AAPL_S-U&columns=divtype,divamt,divdecldt,divexdt,divrecdt'
-H "Connection: Keep-Alive"
-H "Accept: application/json"

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Content-Length: 23214

{
"type":"dividends",
"status":"ok",
"rows":[
        {"data":[
                 {"c":"divtype","s":"ok","v":"1"},
                 {"c":"divamt","s":"ok","v":"0.230"},
                 {"c":"divdecldt","s":"ok","v":"2022-07-28T00:00:00"},
                 {"c":"divexdt","s":"ok","v":"2022-08-05T00:00:00"},
                 {"c":"divrecdt","s":"ok","v":"2022-08-08T00:00:00"}
                ]
        },
        {"data":[
                 {"c":"divtype","s":"ok","v":"1"},
                 {"c":"divamt","s":"ok","v":"0.230"},
                 {"c":"divdecldt","s":"ok","v":"2022-04-28T00:00:00"},
                 {"c":"divexdt","s":"ok","v":"2022-05-06T00:00:00"},
                 {"c":"divrecdt","s":"ok","v":"2022-05-09T00:00:00"}
                ]
        },
        {"data":[
                 {"c":"divtype","s":"ok","v":"1"},
                 {"c":"divamt","s":"ok","v":"0.220"},
                 {"c":"divdecldt","s":"ok","v":"2022-01-27T00:00:00"},
                 {"c":"divexdt","s":"ok","v":"2022-02-04T00:00:00"},
                 {"c":"divrecdt","s":"ok","v":"2022-02-07T00:00:00"}
                ]
        },
        ..
        ..
       ]
}

Historical dividend data contains all available dividend history for a single company. When querying this dataset, a list of dividend-specific columns should be passed to specify the types of columns to return in response.

Dividend Data Request

https://api.activetick.com/dividends.json?sessionid=MY_SESSIONID&symbol=SYMBOL&columns=COL1,COL2

Request Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
symbol yes Instrument symbol.
columns yes List of dividend columns to return data for.

Dividend Columns

Data Column Id Description
divtype Dividend Type, possible values are monthly, quarterly or annual
divamt Dividend Amount
divdecldt Dividend Declare Date
divexdt Dividend Ex-Div Date
divrecdt Dividend Record Date
divpaydt Dividend Payable Date

Dividend Data Response

Name Description
type "dividends"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
rows Array of data rows for each requested instrument symbol.

The data array inside each row contains information for each requested dividend column.

Name Description
c Data column id.
s Data column status. Possible values are "ok" and "fail".
v Data value.

Streaming

About Streaming

MarketFeed API supports streaming market data using standard HTTP. Typically, client initiates data stream by sending a standard HTTP GET subscription request to an endpoint on the server, along with a list of instruments to stream the data for. After performing validation checks, the server begins streaming market data to the client.

Because of nature of “never-ending” stream subscription, there are a few requirements for streaming data using HTTP.

Subscribing to Streams

Making a stream subscription request example for stocks AAPL and IBM.

curl -X GET 'https://api.activetick.com/stream.json?sessionid=MY_SESSIONID&symbols=AAPL_S-U,IBM_S-U'
-H "Connection: Keep-Alive"
-H "Accept: application/json"

Response example:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
Transfer-Encoding: chunked

{
"type":"stream",
"status":"ok",
"symbols":[
        {"AAPL_S U":"ok"},
        {"IBM_S U":"fail"}
]
"data": [
    {
      "type":"q",
      "s":"AAPL_S U",
      "tm":"1643211027608650318",
      "so":"23",
      "f":"104",
      "co":"0",
      "b":"161.83",
      "bsz":"3",
      "bex":"Q",
      "a":"161.85",
      "asz":"2",
      "aex":"P"
    },
    {
      "type":"q",
      "s":"AAPL_S U",
      "tm":"1643211027630493176",
      "so":"23",
      "bsz":"2",
      "bex":"Z"
    },
    {
      "type":"t",
      "s":"AAPL_S U",
      "tm":"1643211028401754064",
      "so":"23",
      "f":"3",
      "l":"161.83",
      "sz":"100",
      "ex":"U"
    },
    {
      "type":"q",
      "s":"AAPL_S U",
      "tm":"1643211028454944173",
      "so":"23",
      "aex":"K"
    },
    {
      "type": "hb",
      "time": "1643211357"
    },

    ..
    ..
]
}

To initiate stream subscription, MarketFeed API provides stream endpoint. The endpoint accepts a list of instrument symbols, type of stream requested, and when subscription is validated, the server starts streaming market data events.

When passing multiple symbols, a comma is used to separate the items, for example symbols=ABC,EFG,XYZ.

Stream Request

https://api.activetick.com/stream.json?sessionid=MY_SESSIONID&symbols=SYM1,SYM2&type=TYPE&source=SOURCE

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
symbols yes List of symbols separated by commas.
type no Type of data stream to request.
source no Book source data. Required parameter when requesting book data stream.

When subscribing to a stream, an optional type parameter can be provided to request specific data stream. If no type is provided, the server defaults to quotes_and_trades type.

Data Stream Types

Type Description
book Market depth book stream.
quotes BBO quotes-only stream.
trades Trades-only stream.
quotes_and_trades Full BBO quotes and trades stream. Default value if type is omitted.

Book Stream Sources

Source Description
totalview Nasdaq TotalView
openbook NYSE Openbook
otcmarkets OTC Markets
cme CME Exchange
nymex NYMEX Exchange
comex COMEX Exchange
cbot CBOT Exchange

Stream Response

Name Description
type "stream"
status Indicates if request completed successfully. See list below for possible statuses..
symbols Array of symbols. The array includes subscription status for each symbol.
data Array of messages that will be dynamically received as market events happen.

Stream Symbol Status

Symbol Status Code Description
ok Symbol was successfully subscribed.
fail Symbol was not subscribed because the symbol is invalid or lack of permission.
max_limit_reached Symbol was not subscribed because maximum limit of subscriptions has been reached.

Streaming Events

BBO Quote Event

Quote event example:

{
   "type":"q",
   "s":"AAPL_S U",
   "tm":"1643211027608650318",
   "so":"23",
   "f":"104",
   "co":"0",
   "b":"161.83",
   "bsz":"3",
   "bex":"Q",
   "a":"161.85",
   "asz":"2",
   "aex":"P"
}

Quotes contains bid/ask information and typically get updated whenever new orders are added, updated or removed on either side, or after a trade is made and order is no longer advertised.

Quote Message Event

Name Description
type "q" (quote)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
so Source data feed.
f Quote flags.
co Quote condition.
b Bid price.
bsz Bid size.
bex Bid exchange.
a Ask price.
asz Ask size.
aex Ask exchange.

Trade Event

Trade event example:

{
   "type":"t",
   "s":"AAPL_S U",
   "tm":"1665677086613934089",
   "so":"23",
   "f":"2",
   "co":["0","0","0","37"],
   "l":"141.215",
   "sz":"25",
   "ex":"D"
}

Trades contains information about a sale transaction. Trades typically get sent by exchanges whenever a match is made between a buyer and seller at specified price and quantity.

Trade Message Event

Name Description
type "t" (trade)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
so Source data feed.
f Trade flags.
co Array of 4 trade conditions.
l Last price.
sz Last size.
ex Last exchange.

Book Add Order Event

Book add order event example:

{
   "type":"ba",
   "s":"CL_221100_FNU",
   "tm":"1665588637520235049",
   "x":"b",
   "i":"7",
   "f":"0",
   "q":"10",
   "o":"10",
   "p":"87.32",
   "a":"XNYM"
}

Add Order event is sent whenever a new order is created and needs to be inserted into the order book.

Book Add Order Message Event

Name Description
type "ba" (book add)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
x Order book side. Possible values are: "a" for ask, "b" for bid sides.
i Index at which to add the order.
f Flags, reserved for future use.
q Quantity of shares/contracts.
o Number of orders. Used for aggregated books.
p Price level.
a Attribution source, can be a market maker, exchange, etc.

Book Change Order Event

Book change order event example:

{
   "type":"bc",
   "s":"CL_221100_FNU",
   "tm":"1665588637520235049",
   "x":"b",
   "i":"7",
   "f":"0",
   "q":"10",
   "o":"10",
   "p":"87.32",
   "a":"XNYM"
}

Change Order event is sent whenever existing order at specified book position has been changed and requires an update. The message structure is similar to Add Order event.

Book Change Order Message Event

Name Description
type "bc" (book change)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
x Order book side. Possible values are: "a" for ask, "b" for bid sides.
i Index at which to update the order.
f Flags, reserved for future use.
q Quantity of shares/contracts.
o Number of orders. Used for aggregated books.
p Price level.
a Attribution source, can be a market maker, exchange, etc.

Book Delete Order Event

Book delete order event example:

{
   "type":"bd",
   "s":"CL_230100_FNU",
   "tm":"1665588637646140029",
   "x":"a",
   "i":"9",
   "f":"0"
}

Delete Order event is sent whenever existing order has been removed from the book due to cancelation or execution.

Book Delete Order Message Event

Name Description
type "bd" (book delete)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
x Order book side. Possible values are: "a" for ask, "b" for bid sides.
i Index at which to delete the order.
f Flags, reserved for future use.

Book Delete Range Event

Book delete range event example:

{
   "type":"bd",
   "s":"CL_230100_FNU",
   "tm":"1665588637646140029",
   "x":"a",
   "f":"0",
   "if":"5",
   "it":"8" 
}

Delete Range event is sent whenever a range of existing orders has been removed from the book.

Book Delete Range Message Event

Name Description
type "bdr" (book delete range)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
x Order book side. Possible values are: "a" for ask, "b" for bid sides.
f Flags, reserved for future use.
if Index from which to begin order deletion.
it Index to which end order deletion.

Book Trade Transaction Event

Book trade transaction event example:

{
   "type":"bt",
   "s":"CL_221100_FNU",
   "tm":"1665588637678117147",
   "f":"0",
   "q":"3",
   "o":"4",
   "ax":"a",
   "p":"87.39"
}

Trade Transaction event is sent whenever a match takes place in the book and trade is executed. The message does not alter the state of the book, except to indicate that a match has occurred. The server sends subsequent messages such as order delete or order change to alter the book.

Book Trade Message Event

Name Description
type "bt" (book trade)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
ax Order book aggressor side. Possible values are: "a" for ask, "b" for bid sides.
f Flags, reserved for future use.
q Quantity executed.
o Number of orders executed.
p Execution price.

Book Reset Event

Book reset event example:

{
   "type":"br",
   "s":"CL_221100_FNU",
   "tm":"1665598637678117147",
}

The server sends book reset event whenever the book needs to be cleared out. This message is typically sent after market close or before market opens.

Book Reset Message Event

Name Description
type "br" (book reset)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.

Heartbeat Event

Heartbeat event example:

    {
      "type": "hb",
      "time": "1643211357"
    }

Heartbeats are sent periodically by the server to ensure validity of established connection.

Heartbeat Message Event

Name Description
type "hb"
time Time in UTC epoch seconds.