NAV
shell

Overview

Welcome to ActiveTick MarketFeed API!

ActiveTick MarketFeed API enables you to connect your application to our market data server farm and receive market data. You can securely request numerous static and streaming datasets using easy-to-use RESTful API calls.

ActiveTick MarketFeed API is organized around REST and uses HTTP GET and POST verbs and response codes most clients are familiar with.

First, a couple of things:

Endpoints

Our endpoints require SSL encryption (TLS 1.2) and SNI support. Each endpoint corresponds with a particular service. All requests should be made using HTTPS.

API endpoint:

https://api.activetick.com

Rate Limiting

We implement rate limiting to make sure the API is responsive for all customers. The rate limits are set in a way to provide full functionality while trying to prevent 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.

How Our Rate Limits Work

The API permits up to 200 requests per minute, starting with the first request, and resets the counter at the start of next minute. If limits are exceeded, the API returns a 429 HTTP “Too Many Requests” error.

Security

ActiveTick MarketFeed API uses OAuth 2.0 for authentication and allows applications to submit authenticated requests. Prior to using any ActiveTick MarketFeed API functions, client must authenticate and receive a sessionid token. A valid sessionid token must be included in every ActiveTick API request.

Sessionid tokens expire every 24 hours. Once a token expires you’ll need to perform another authorization to receive another sessionid token.

Creation of new sessionid token is tied to IP address originating the request, and each following request will be checked against the IP address associated with a sessionid.

Support

For any API issues or support questions, please reach out to our technical support via:

support@activetick.com

Authentication

HTTP Example:

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

All calls to ActiveTick MarketFeed API require a valid, unexpired sessionid access token. The token can be created for a 24-hour period, after which it will expire and any subsequent API calls using expired token will fail.

Any subsequent calls to create a sessionid token will return the same token information until it expires.

The above command returns JSON structured like this:

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

This endpoint returns authenticated session information, including sessionid access token.

HTTP Request

GET /authorize.json?username={username}&password={password}&apikey={apikey}

Query Parameters

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

JSON Response

Name Description
type authorize
status Indicates if authorization completed successfully. Possible values are "ok" and "fail".
sessionid 24-hour session access token.
created_at Time when initial authorization was created.

Market Data Requests

Contract Chains

HTTP Example:

curl -X GET 'https://api.activetick.com/chain.json?sessionid=768ec82c7c064f5fbc34300ce538b3f8&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"

The above command returns JSON structured like this:

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"}
                ]
        },
        ...
        ...
]
}

This endpoint returns chains for various types of instruments, including options, future spreads, etc.

HTTP Request

GET /chain.json?sessionid={sessionId}&key={key}&chaintype={chainType}&columns={col1,col2,...}&begin_maturity_time={beginMaturityTime}&end_maturity_time={endMaturityTime}&ignore_empty={boolean}

Query Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
key yes String key specific to chainType. 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 of contracts.
end_maturity_time yes End time filter to include maturity dates of contracts.
ignore_empty no Ignore empty contracts without any data.

Chain Types

Chain Type Description
equity_options Equity options
futures Futures
future_options Future options
future_spreads Future spreads
future_option_spreads Future option spreads
future_mixed_spreads Future mixed spreads
future_spread_legs Future spread legs

Chain Key Formatting

All keys use identifier characters for exchange and country codes. The following are the mappings of identifier codes:

Code Description
'I' Instrument code
'E' Exchange code
'C' Country code
Key Format Example
equity_options 'AAAAA_IEC', AAAAA is the underlying symbol 'AAPL_S U' - Apple stock chain
futures 'AAA_EC', AAA is the future group 'ES_CU' - CME ES e-Mini 500; 'GC_XU' - COMEX Gold
future_options 'AAA_FUT_EC', AAA is the future group 'ES_FUT_CU' - CME ES e-Mini 500; 'GC_FUT_XU' - COMEX Gold
future_spreads 'AAA_OOF_EC', AAA is the future group 'ES_OOF_CU' - CME ES e-Mini 500; 'GC_OOF_XU' - COMEX Gold
future_option_spreads 'AAA_OOF_EC', AAA is the future group 'ES_OOF_CU' - CME ES e-Mini 500; 'GC_OOF_XU' - COMEX Gold
future_mixed_legs 'AAA_MLEG_EC', AAA is the future group 'ES_MLEG_CU' - CME ES e-Mini 500; 'GC_MLEG_XU' - COMEX Gold

JSON Response

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

Each row contains information about the symbol, as well as array of data values.

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

Each row response contains array of data for requested columns.

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

Historical Bar Data

HTTP Example:

curl -X GET 'https://api.activetick.com/bars.json?sessionid=768ec82c7c064f5fbc34300ce538b3f8&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"

The above command returns JSON structured like this:

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"},
    ...
    ...
]
}

This endpoint returns historical bar data.

HTTP Request

GET /bars.json?sessionid={sessionId}&symbol={symbol}&bartype={barType}&minute={minute}&begintime={beginTime}&endtime={endTime}&sessiontype={sessionType}&include_empty_bars={boolean}

Query Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
symbol yes Instrument symbol.
bartype yes Bar type.
minute no Intraday minute compression. Required parameter for intraday bartype.
begintime yes Begin time for requesting range.
endtime yes End time for requesting range.
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.

Bar types

Bar Type Description
intraday Intraday 1-60 minute bars.
daily Daily bars.
weekly Weekly Bars.

Session types

Session Type Description
regular Regular session only.
extended Extended session only.
both Both regular and extended session.

JSON Response

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

Each bar data contains information about the bar.

Name Description
tm Bar time.
o Open price.
h High price.
l Low price.
c Close price.
v Volume.
t Trade counts.

Historical Tick Data

HTTP Example:

curl -X GET 'https://api.activetick.com/ticks.json?sessionid=768ec82c7c064f5fbc34300ce538b3f8&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"

The above command returns JSON structured like this:

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"]},
    ...
    ...
]
}

This endpoint returns historical tick data.

HTTP Request

GET /ticks.json?sessionid={sessionId}&symbol={symbol}U&ticktype={tickType}&maxrecords={maxRecords}&begintime={beginTime}&endtime={endTime}

Query 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 wihin requesting time range.
begintime yes Begin time for requesting range.
endtime yes End time for requesting range.

Tick types

Tick Type Description
trades Trade records only.
quotes Quote records only.
both Both trade and quote records.

JSON Response

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

Each tick data record contains information about a tick. There are two types of tick data records, quotes and trades.

Quote tick record.

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.

Trade tick record.

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.

Snapshot Data

HTTP Example:

curl -X GET 'https://api.activetick.com/snapshot.json?sessionid=768ec82c7c064f5fbc34300ce538b3f8&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"

The above command returns JSON structured like this:

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

This endpoint provides access to static snapshot data values similar to SQL table for requested symbols and columns.

HTTP Request

GET /snapshot.json?sessionid={sessionId}&symbols={symbol1,symbol2..}&columns={col1,col2..}

Query Parameters

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

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

Each row contains information about the symbol, as well as array of data values.

Name Description
symbol Instrument symbol.
status Status indicating if symbol information was successfully returned.
data Array of data values for each requested column.
Row Status Code Description
ok Valid row information.
fail Invalid row information because of invalid symbol or lack of permission.
max_limit_reached Maximum limit of rows has been reached.

Each row response contains array of data for requested columns.

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

Streaming Data

HTTP Example:

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

The above command returns JSON structured like this:

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":"q",
    "s":"AAPL_S U",
    "tm":"1643211027630784061",
    "so":"23",
    "bex":"Q"
    },
    {
    "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"
    },

    ..
    ..
]
}

This endpoint subscribes to streaming data and streams data in chunked updates.

Request for streaming data must contain "Connection: Keep-Alive" header tag in order to keep the connection open. The server will maintain an open connection up until session token expires, or client disconnects.

Only one open streaming session is permitted.

Periodically the server will send a heartbeat message.

HTTP Request

GET /stream.json?sessionid=768ec82c7c064f5fbc34300ce538b3f8&symbols=AAPL_S-U,IBM_S-U

Query Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
symbols yes Array of symbols separated by commas.

JSON Response

Name Description
type stream
status Indicates if request completed successfully. Possible values are "ok" and "fail".
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.
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.

C++ example to convert epoch nanosecond timestamp to readable format

void EpochToDateTime(uint64_t epochNanos)
{
    if(epochNanos == 0)
        return;

    uint32_t daysSinceEpoch = (uint32_t)(epochNanos / 86400000000000);
    uint64_t remainderEpoch = epochNanos - daysSinceEpoch * 86400000000000;

    daysSinceEpoch += 135080;
    uint32_t year = (10000 * daysSinceEpoch + 14780) / 3652425;
    int64_t ddd = (int32_t)daysSinceEpoch - (365 * year + year / 4 - year / 100 + year / 400);
    if (ddd < 0)
    {
        --year;
        ddd = (int32_t)daysSinceEpoch - (365 * year + year / 4 - year / 100 + year / 400);
    }

    int64_t mi = (100 * ddd + 52) / 3060;
    uint16_t month = (uint16_t)((mi + 2) % 12 + 1);
    year = year + (int32_t)((mi + 2) / 12 + 1600);
    uint16_t day = (uint16_t)(ddd - (mi * 306 + 5) / 10 + 1);

    uint16_t hour = (uint16_t)(remainderEpoch / 3600000000000);
    uint64_t b = remainderEpoch % 3600000000000;
    uint16_t minute = (uint16_t)(b / 60000000000);
    uint64_t d = b % 60000000000;
    uint16_t second = (uint16_t)(d / 1000000000);
    uint32_t nanosecond = (uint32_t)(d % 1000000000);

    printf("%04u-%02u-%02uT%02u:%02u:%02u.%09u",
        year,
        month,
        day,
        hour,
        minute,
        second,
        nanosecond);
}

JSON Market Data Event Messages

Quote Message

Name Description
type q
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 Message

Name Description
type t
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.

Heartbeat Message

Name Description
type hb
time Time in UTC epoch seconds.

Reference

Symbology

ActiveTick MarketFeed API supports the following types of instruments:

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

For instruments that trade on multiple exchanges, a special consolidated code is used to represent the source exchange.

Instrument Type Codes

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

Instrument Country Codes

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

Symbology for Stocks

Stock and index instruments are the simplest forms of symbols. The body of the symbol is comprised of the instrument, followed by 3-character code.

US-based Stock Exchange Codes

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

Symbology For Indices

Index instruments are similar to stock instruments, with exception of different instrument type 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

Symbology for Currencies

Currency symbols contain a pair of currencies as its body, followed by 3-character code.

Currency symbols always use International country code.

Currency Exchange Code

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

Symbology for Futures

Future symbols consist of a group, maturity date, and 3-character code. Underline character, ‘_’, is used as a separator between the 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 Exchange Codes

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.

Symbology for Options

Option symbol consist of underlying symbol, expiration date, call/put indicator, strike price and strike price decimal code.

The following symbol format is used for options:

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 Exchange Codes

Exchange Code Description
' ' Consolidated OPRA

US-based Future Options Exchange Codes

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

Snapshot Data Columns

The following is a list of data column names used in snapshot data requests.

Data Column Code 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
sd Short Description
ld Long Description
sic Stock SIC Code
sik Stock SIK Code
pex Stock Primary Exchange
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
opoi Option Open Interest
opnpv Option Theoretical 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
divtype Dividend Type
divamt Dividend Amount
divdecldt Dividend Declare Date
divexdt Dividend Ex-Div Date
divrecdt Dividend Record Date
divpaydt Dividend Payable Date

Quote Conditions

The following is a list of exchange-specific stock quote conditions used in historical tick data and streaming data.

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 Conditions

The following is a list of exchange-specific stock trade conditions used in historical tick data and streaming data.

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

The following is a list of exchange-specific stock option trade conditions used in historical tick data and streaming data.

Quote Condition Value
OptionTradeConditionRegular 0
OptionTradeConditionCanc 1
OptionTradeConditionOseq 2
OptionTradeConditionCncl 3
OptionTradeConditionLate 4
OptionTradeConditionCnco 5
OptionTradeConditionOpen 6
OptionTradeConditionCnol 7
OptionTradeConditionOpnl 8
OptionTradeConditionAuto 9
OptionTradeConditionReop 10
OptionTradeConditionAjst 11
OptionTradeConditionSprd 12
OptionTradeConditionStdl 13
OptionTradeConditionStpd 14
OptionTradeConditionCstp 15
OptionTradeConditionBwrt 16
OptionTradeConditionCmbo 17
OptionTradeConditionSpim 18
OptionTradeConditionIsoi 19
OptionTradeConditionBnmt 20
OptionTradeConditionXmpt 21

Trade Flags

The following is a list of trade flags used in historical tick trade data and streaming trade data.

Trade flag can contain multiple flags ORed together.

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

Error Codes

When an error is encountered you will receive an HTTP status code along with a message and error code in the body of the response. 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.

We use the following status codes for errors:

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