NAV
shell javascript python csharp

Introduction

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.

Our API has a wide range of endpoints that developers can use to interact with the system, such as retrieving static data snapshots, query for historical data, and subscribing to real-time streams. The API endpoints are well-documented and easy to understand, making it simple for developers to get started and quickly integrate the API into their applications.

To ensure quick responses and high availability, our API runs on a farm of load-balanced servers. This infrastructure allows the API to handle a large number of requests and provide quick responses, even during periods of high traffic. The load balancing also ensures that if one server goes down, the others can take over, minimizing downtime and ensuring that the API is always available to developers.

All data in MarketFeed is accessible via a single address. This documentation describes each endpoint available 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

ActiveTick provides development support for MarketFeed API through various channels including online web chat, phone, and email. Developers can connect with our tech support team in real-time through chat, speak with a representative by phone, or document their issues through email. Our goal is to provide developers with the support they need to successfully implement and use our API.

Please visit Contact Us for more information.

Connectivity

Developers can access MarketFeed API by connecting to it over the internet using the HTTPS protocol. This protocol ensures that all data exchanged between the developer's client and our API is encrypted using Transport Layer Security (TLS) encryption.

Our primary production API endpoint is

https://api.activetick.com

Compression

A server can require that certain requests that produce a large response, include an "Accept-Encoding" in request. This header specifies the types of compression that the client is able to handle. This allows the server to compress the response before sending it to the client, reducing the amount of data that needs to be transferred for large responses. The two most commonly supported types of compression are "gzip" and "deflate".

When a client sends a request to a server that requires the "Accept-Encoding" header, it must include the header and list the types of compression that it is able to handle. For example, a client that supports both "gzip" and "deflate" would include the following header in its request: "Accept-Encoding: gzip, deflate".

If the server chooses to compress the response using one of the methods listed in the "Accept-Encoding" header, it will do so and include a "Content-Encoding" header in the response to indicate the type of compression used. The client can then decompress the response before processing it.

If a client sends a request to a server that requires the "Accept-Encoding" header, and the header is not included in the request, the server will typically return a "400 Bad Request" error.

Limits

To ensure stable and reliable service for all users, the implements reasonable rate limiting when making requests to the server. Rate limiting is a technique used to control the rate at which a user or an application can make requests to an API. This is done to ensure that all users have a positive experience when using MarketFeed API and to prevent any single user or application from overwhelming the API with too many requests, which can cause slow response times, errors, and even outages.

In most cases, a rate limit can be bypassed by using a different API call or leveraging other API features, such as using streaming API instead of polling for data. This allows developers to continue to access the data they need, while also ensuring that the API remains stable and reliable for all users.

The MarketFeed API limits the number of requests that can be made by a user or application to 200 per minute.

The request counter is reset on a rolling basis each minute, giving full 200 requests at the beginning of each minute. If a user or application exceeds the rate limit, the server will return a 429 HTTP "Too many requests" error. This error message will include the number of requests remaining and when the rate limit will reset. Developers can check the remaining requests and reset time using the response headers in the HTTP headers, which will help them to implement smart retry mechanisms in their application.

In certain situations, when too many 429 errors are generated, the originating IP or session token might be temporarily added to a ban list, blocking further requests. This is done to prevent any malicious or automated requests from overwhelming the API. However, if a user believes that they have been banned mistakenly, they can contact our support team to review the ban.

The server returns a custom X-Available-Requests-Left header in the response to indicate the number of requests that are left in the current minute. This header can be used to track the rate limit of the API and prevent exceeding the maximum number of requests per minute. By checking this header, the client can determine how many requests they have left before they need to wait for the rate limit to reset.

Errors

MarketFeed API uses conventional HTTP response codes to communicate the success or failure of an API request to the developer. These codes are standard codes that are used across the web and are recognized by most programming languages and development environments.

In general, codes in the 2xx range indicate success, which means the request was processed successfully and the desired outcome was achieved. Codes in the 4xx range indicate an error that failed given the information provided, such as a missing required parameter, exceeding a limit, and so on. These errors are generally caused by the developer and can be resolved by fixing the request. Codes in the 5xx range indicate an error with MarketFeed servers, which is rare. These errors are usually caused by internal issues on the server side and are beyond the control of the developer.

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

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 a straightforward process that can be done easily using any programming language or directly from a web browser. To make an API call, developers will need to have an active MarketFeed account with their credentials and API key. Additionally, they will need to have a valid SessionId token which is used for authentication and authorization. The SessionId token ensures that only authorized users can access the API and prevents unauthorized access to the data.

To initiate a request, developers will also need to know the endpoint URL for the dataset they wish to access and any endpoint-specific parameters that may be required. The endpoint URL is the address of the specific resource or data that the developer wants to access. The endpoint-specific parameters are used to filter or query the data, and the format of these parameters may vary depending on the endpoint.

When initiating a REST request, a sender (for example, a browser or a program) creates a 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. The HTTP response code will indicate the success or failure of the request, headers will contain additional information about the response, and the response payload will contain the actual data that was requested.

It is important to note that REST API calls are stateless, meaning that each request is self-contained and contains all the information needed for the server to understand and respond to the request. This allows for flexibility and scalability, as the server does not need to maintain a stateful connection with the client.

Multiple Requests

When making multiple API requests, it is highly recommended to reuse the same HTTP session rather than closing down the session and opening a new one for each request. This approach is more efficient and can help reduce the overall latency of the API calls.

In order to reuse the same session, developers must include a "Connection: Keep-Alive" header in each request. This header tells the server to keep the connection open after sending the response, allowing the client to reuse the same session for subsequent requests. If the "Connection: Keep-Alive" header is omitted, the server will close the socket after sending the response, and the session cannot be reused for another request.

To reuse the same session, developers simply need to send another request after the previous response has been received. The server will use the same session and will not need to re-authenticate or establish a new connection. This approach can significantly improve the performance of the API calls, especially when making multiple requests in a short period of time.

Query Parameters

A query in the MarketFeed API typically consists of an endpoint name followed by query parameters. These parameters are used to filter or specify the data that should be returned by the API. Most MarketFeed endpoints require a few parameters to be passed inside the query in the form of name/value pairs. When multiple parameters are present in the query, they are combined into a single query string using an ampersand character (&), for example: param1=123&param2=abc.

The MarketFeed API supports both GET and POST HTTP requests. GET requests are used when query string is small, while POST requests are used to submit query strings that are large and complex in size to the server. Depending on the endpoint and the type of data being accessed, a developer may need to use a specific type of request.

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

It is important to note that the format of the query parameters may vary depending on the endpoint and type of requests. Developers should consult the API documentation for more information on the required parameters for each endpoint and type of requests, as well as for guidance on how to format the query string. Additionally, the API documentation also provides examples of query string for each endpoint which can be helpful to understand how to format the query string.

Data Formats

The MarketFeed API returns all response data in JSON format.

Symbology

ActiveTick MarketFeed API supports a wide range of financial instruments including stocks, indices, currencies, futures, stock options, future options, and futures spreads.

The formatting for each instrument type is made up of an instrument-specific body, followed by a 3-character code representing the type, exchange, and country of the instrument. The body and 3-character code are joined together by an underscore '_' character.

For example, the symbol for Apple Inc. stock traded on the NASDAQ exchange would be "AAPL_SQU", where "AAPL" is the symbol for Apple Inc., “S” represents Stock, “Q” represents NASDAQ exchange, and "U" represents United States.

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

The following tables provide codes for different types of instruments, exchanges, and countries that the MarketFeed API supports.

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 constructed from an instrument body, an instrument type code for "Stock", an exchange code, and a country code. They are the most basic form of instrument symbols in the MarketFeed API.

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)
'T' OTC Markets, LLC
'U' Members Exchange, LLC (MEMX)
'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 This is the symbol for Apple Inc. traded on consolidated exchanges
MSFT_SZU This is the symbol for Microsoft Corp. traded on Cboe BZX Exchange

Indices

Index symbols in the MarketFeed API are similar to stock symbols, with the only exception of using an instrument type code for "Index". They are constructed from an instrument body, an instrument type code for "Index", and a country code.

Additionally, all index instruments use the Consolidated Exchange code.

Some examples of index instrument symbols:

Symbol Description
DJI_I U This is the symbol for Dow Jones Industrial Index
SPX_I U This is the symbol for S&P 500 index

Currencies

Currency symbols in the MarketFeed API are composed of a pair of currencies as its body, followed by an instrument type code for "Currency", a country code for "International" (used for currencies), and an exchange code for "Forex".

Currency Exchanges

Exchange Code Description
'F' Forex

Some examples of currency instrument symbols:

Symbol Description
EUR/USD_CFI This is the symbol for the Euro/US dollar currency pair
USD/CAD_CFI This is the symbol for the US dollar/Canadian dollar currency pair

Futures

Future symbols in the MarketFeed API are composed of a future group, maturity date, an instrument type code for "Future", an exchange code for the specific exchange on which the future is traded and a country code. An underscore character, ‘_’, is used as a separator between the group, maturity date, and 3-character code.

The group portion of the symbol represents an exchange-specific group, such as “ES” for CME e-Minis, “CL” for NYMEX oil, etc. The maturity portion of the symbol is represented in the format of YYMMDD. For instruments with standard maturity month, the day portion is set to “00”.

The format of future instrument symbols is as follows:

AAAA_YYMMDD_IEC

Where:

For example, for the future instrument symbol "GC_220200_FXU"

AAAA = "GC" representing the underlying group YYMMDD = "220200" representing the maturity date of February 2022 I = "F" representing the Future instrument code E = "X" representing the COMEX exchange X = "U" representing the United States

US-based Futures Exchanges

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

Some more examples of future instrument symbols:

Symbol Description
ES_220300_FCU This is the symbol for ESH2 CME e-Mini S&P 500 contract with March 2022 maturity
GC_220200_FXU This is the symbol for GCG2 COMEX Gold contract with February 2022 maturity.

Options

Option symbols in the MarketFeed API are composed of the underlying symbol, expiration date, call/put indicator, strike price, strike price decimal code, followed by 3-character code. The format of the symbols is as follows:

AAAA_YYMMDDXNNNNNP_IEC

Where:

If the option is a weekly option, the DD portion of the expiration date will indicate the week number in which the option expires, from W1 through W5.

Call/Put Codes

The call/put code included in option symbols, indicates whether the option is a call option or a put option.

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

The precision code in option symbols represents the number of decimal places used in the strike price, which can range from 0 to 4. The following table shows the different codes used for precision and their corresponding decimal places:

Precision Code Decimal Places
'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)

Option symbols in the MarketFeed API are composed of the underlying symbol, expiration date, call/put indicator, strike price, strike price decimal code, followed by 3-character code. Here are some examples of option instrument symbols:

Symbol Symbol Description
JNJ_211022C14700C_O U This is a symbol for a JNJ stock call option with an expiration date of October 22nd, 2021 and a strike price of 147.00. The 'C' in the symbol represents that this is a call option, and the 'O U' at the end of the symbol indicates that this option is traded on consolidated exchanges in the United States.
MSFT_220114P31000C_O U This is a symbol for a MSFT stock put option with an expiration date of January 14th, 2022 and a strike price of 310.00. The 'P' in the symbol represents that this is a put option, and the 'O U' at the end of the symbol indicates that this option is traded on consolidated exchanges in the United States.
AAPL_1203W3C1234567B_O U This is a symbol for a AAPL weekly stock call option with an expiration date of the third week of March, 2012 and a strike price of 12345.67. The 'W3' in the symbol represents that this is a weekly option and the third week of March is the expiration date. 'C' in the symbol represents that this is a call option, and the 'O U' at the end of the symbol indicates that this option is traded on consolidated exchanges in the United States.
ES_120331C1234567A_PCU This is a symbol for a ES e-Mini S&P 500 call option with an expiration date of March 31st, 2012 and a strike price of 12345.67. The 'C' in the symbol represents that this is a call option, the 'PCU' at the end of the symbol indicates that this option is traded on CME exchange in the United States.

Authentication

To use the MarketFeed API, a user must first have an active SessionId token. This token is a unique string of hexadecimal characters that is required for every API call. It acts as an authentication mechanism that verifies the user's identity and grants access to the API's resources.

The token can be generated by calling the authorize endpoint with the user's login credentials and API key. The authorize endpoint is responsible for validating the user's credentials, and if successful, it returns a SessionId token that can be used to make subsequent API calls. Once generated, the token is valid for 24 hours, after which it will expire. This is done to ensure the security of the API by regularly invalidating tokens that may have been compromised.

If the token has expired, a new token must be generated through another authorize API call to continue using the API. It's important to note that if multiple calls to the authorize API are made within 24 hours of creating the initial token, the same session token information will be returned. To avoid unnecessary calls, it's recommended to only generate a new token when the previous one has expired. Additionally, each call to the authorize API will decrement the number of available API calls that can be made, so it's recommended to minimize the number of authorize calls made.

IP-based Authentication

The MarketFeed API has a security feature that stores the IP address of the device that made the initial authorize API call to create a SessionId token. For all subsequent API calls, the API compares the source IP address of the request with this stored IP address. If the source IP address does not match the stored IP address, the API will reject the request with a 401 - Unauthorized error. This means that the API can only be accessed from the device that made the initial authorize API call.

This security feature is designed to prevent unauthorized access to the API by ensuring that only the device that has been granted access can make API calls.

Users who are unable to access the API due to this security feature should contact the MarketFeed support team to have their sessions reset.

Requesting Session Tokens

Example authorize request:

curl -i -X GET 'https://api.activetick.com/authorize.json?username=MY_USERNAME&password=MY_PASSWORD&apikey=MY_APIKEY'
$.ajax({
    url: "https://api.activetick.com/authorize.json",
    method: "GET",
    data: {
        username: "MY_USERNAME",
        password: "MY_PASSWORD",
        apikey: "MY_APIKEY"
    },
    success: function(response) {
        console.log("Authorization status: " + response.status);
        console.log("Session ID: " + response.sessionid);
        console.log("Real-time data: " + response.is_realtime);
    },
    error: function(xhr, status, error) {
        console.log("Error: " + error);
    }
});
import requests

# Define the API endpoint
url = "https://api.activetick.com/authorize.json"

# Define the request parameters
params = {
    "username": "MY_USERNAME",
    "password": "MY_PASSWORD",
    "apikey": "MY_APIKEY"
}

# Send the GET request
response = requests.get(url, params=params)

# Extract the JSON response
data = response.json()

# Print the output
print("Type: ", data["type"])
print("Status: ", data["status"])
print("Session ID: ", data["sessionid"])
print("Created At: ", data["created_at"])
print("Is Realtime: ", data["is_realtime"])
using System;
using System.Net;
using Newtonsoft.Json.Linq;

class Program
{
    static void Main(string[] args)
    {
        // Get parameters from command prompt
        string username = args[0];
        string password = args[1];
        string apikey = args[2];

        // Create the request URL
        string requestUrl = "https://api.activetick.com/authorize.json?username=" + username + "&password=" + password + "&apikey=" + apikey;

        // Make the request
        using (WebClient client = new WebClient())
        {
            // Get the response as a string
            string response = client.DownloadString(requestUrl);

            // Parse the response JSON
            JObject json = JObject.Parse(response);

            // Get the values from the JSON and print them to the console
            Console.WriteLine("Type: " + json["type"]);
            Console.WriteLine("Status: " + json["status"]);
            Console.WriteLine("Session ID: " + json["sessionid"]);
            Console.WriteLine("Created At: " + json["created_at"]);
            Console.WriteLine("Is Realtime: " + json["is_realtime"]);
        }
    }
}

Example authorize response:

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

{
"type":"authorize",
"status":"ok",
"sessionid":"581a01a4c5004a8490d89ff8737faafd",
"created_at":"2023-01-27T17:38:23",
"is_realtime":"true"
}
Authorization status: ok
Session ID: 581a01a4c5004a8490d89ff8737faafd
Real-time data: true
Type:  authorize
Status:  ok
Session ID:  581a01a4c5004a8490d89ff8737faafd
Created At:  2023-01-27T17:38:23
Is Realtime:  true
Type: authorize
Status: ok
Session ID: 581a01a4c5004a8490d89ff8737faafd
Created At: 1/27/2023 5:38:23 PM
Is Realtime: true

Authorization Request Endpoint

https://api.activetick.com/authorize.json?username=<username>&password=<password>&apikey=<apikey>

Authorization Request Parameters

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

Response

The following table lists the fields returned in the response of an authorize API call:

Name Description
type This field will always have the value of "authorize"
status Indicates the success or failure of the authorization process. The possible values are "ok" and "fail".
sessionid A 24-hour session token that is required for all subsequent API requests.
created_at The time when the initial authorization was created.
is_realtime Indicates if the market data is real-time. The possible values are "true" and "false".

Core Data

The MarketFeed API uses the snapshot endpoint to return core market datasets. This includes data such as:

To access this data, the snapshot endpoint accepts a list of instrument symbols and data columns to query. This is similar to a typical SQL SELECT query, where multiple symbols and columns can be passed using a comma separator.

Requesting Snapshots

Example snapshot request:

curl -X POST https://api.activetick.com/snapshot.json \ 
 -i -d 'sessionid=MY_SESSIONID&symbols=EUR/USD_CFI,AAPL_S-U,IBM_S-U&columns=pc,l,b,a,bsz,asz,vol,ltm'
const $ = require("jquery");

// Define session ID, symbols and columns
const sessionId = "MY_SESSIONID";
const symbols = "EUR/USD_CFI,AAPL_S-U,IBM_S-U";
const columns = "pc,l,b,a,bsz,asz,v,ltm";

// Define snapshot API endpoint URL
const url = "https://api.activetick.com/snapshot.json";

// Make a GET request to snapshot API endpoint
$.ajax({
  type: "GET",
  url: url,
  data: {
    sessionid: sessionId,
    symbols: symbols,
    columns: columns,
  },
  success: function (response) {
    console.log(response);
    // Iterate through response rows
    response.rows.forEach(function (row) {
      console.log("Symbol: " + row.symbol);
      console.log("  Status: " + row.status);
      // Iterate through data in each row
      row.data.forEach(function (data) {
        if(data.c === 'pc')
          console.log("\tPrevious Close: " + data.v);
        else if(data.c === 'l')
          console.log("\tLast Trade Price: " + data.v);
        else if(data.c === 'b')
          console.log("\tBid Price: " + data.v);
        else if(data.c === 'a')
          console.log("\tAsk Price: " + data.v);
        else if(data.c === 'bsz')
          console.log("\tBid Size: " + data.v);
        else if(data.c === 'asz')
          console.log("\tAsk Size: " + data.v);
        else if(data.c === 'v')
          console.log("\tVolume: " + data.v);
        else if(data.c === 'ltm')
          console.log("\tLast Trade Time: " + data.v);
      });
    });
  },
  error: function (error) {
    console.log(error);
  },
});

import requests

# Define session ID, symbols and columns
session_id = "MY_SESSIONID"
symbols = "EUR/USD_CFI,AAPL_S-U,IBM_S-U"
columns = "pc,l,b,a,bsz,asz,v,ltm"

# Define snapshot API endpoint URL
url = "https://api.activetick.com/snapshot.json"

# Make a GET request to snapshot API endpoint
response = requests.get(url, params={'sessionid': session_id, 'symbols': symbols, 'columns': columns})

# Check if request was successful
if response.status_code == 200:
    # Parse response json
    data = response.json()
    # Iterate through response rows
    for row in data['rows']:
        print(f"Symbol: {row['symbol']}")
        print(f"  Status: {row['status']}")
        # Iterate through data in each row
        for item in row['data']:
            if item['c'] == "pc":
                print(f"\tPrevious Close: {item['v']}")
            elif item['c'] == "l":
                print(f"\tLast Trade Price: {item['v']}")
            elif item['c'] == "b":
                print(f"\tBid Price: {item['v']}")
            elif item['c'] == "a":
                print(f"\tAsk Price: {item['v']}")
            elif item['c'] == "bsz":
                print(f"\tBid Size: {item['v']}")
            elif item['c'] == "asz":
                print(f"\tAsk Size: {item['v']}")
            elif item['c'] == "v":
                print(f"\tVolume: {item['v']}")
            elif item['c'] == "ltm":
                print(f"\tLast Trade Time: {item['v']}")
else:
    print(f"Request failed with status code: {response.status_code}")
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using System.Net.Http;

class Program
{
    static void Main(string[] args)
    {
        // Define session ID, symbols and columns
        string sessionId = "MY_SESSION";
        string symbols = "EUR/USD_CFI,AAPL_S-U,IBM_S-U";
        string columns = "pc,l,b,a,bsz,asz,v,ltm";

        // Define snapshot API endpoint URL
        string url = "https://api.activetick.com/snapshot.json";

        // Make a GET request to snapshot API endpoint
        HttpClient client = new HttpClient();
        var queryString = "sessionid=" + sessionId + "&symbols=" + symbols + "&columns=" + columns;
        var response = client.GetAsync(url + "?" + queryString).Result;

        if (response.IsSuccessStatusCode)
        {
            var json = response.Content.ReadAsStringAsync().Result;
            JObject o = JObject.Parse(json);

            // Iterate through response rows
            foreach (var row in o["rows"])
            {
                Console.WriteLine("Symbol: " + row["symbol"]);
                Console.WriteLine("  Status: " + row["status"]);

                // Iterate through data in each row
                foreach (var data in row["data"])
                {
                    string columnName = (string)data["c"];
                    if (columnName == "pc")
                        Console.WriteLine("\tPrevious Close: " + data["v"]);
                    else if (columnName == "l")
                        Console.WriteLine("\tLast Trade Price: " + data["v"]);
                    else if (columnName == "b")
                        Console.WriteLine("\tBid Price: " + data["v"]);
                    else if (columnName == "a")
                        Console.WriteLine("\tAsk Price: " + data["v"]);
                    else if (columnName == "bsz")
                        Console.WriteLine("\tBid Size: " + data["v"]);
                    else if (columnName == "asz")
                        Console.WriteLine("\tAsk Size: " + data["v"]);
                    else if (columnName == "vol")
                        Console.WriteLine("\tVolume: " + data["v"]);
                    else if (columnName == "ltm")
                        Console.WriteLine("\tLast Trade Time: " + data["v"]);
                }
            }
        }
        else
        {
            Console.WriteLine("Error: " + response.StatusCode);
        }
    }
}

Example snapshot response:

HTTP/1.1 200 OK
Content-Type: application/json
X-Available-Requests-Left: 199
Content-Length: 1051

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"EUR/USD_CFI","status":"ok",
        "data":[
                {"c":"pc","s":"ok","v":"1.08953"},
                {"c":"l","s":"ok","v":"1.08681"},
                {"c":"b","s":"ok","v":"1.08674"},
                {"c":"a","s":"ok","v":"1.08687"},
                {"c":"bsz","s":"ok","v":"0"},
                {"c":"asz","s":"ok","v":"0"},
                {"c":"ltm","s":"ok","v":"2023-01-27T21:44:56.960000000"}
                ]
        },
        {"symbol":"AAPL_S U","status":"ok",
        "data":[
                {"c":"pc","s":"ok","v":"143.96"},
                {"c":"l","s":"ok","v":"145.93"},
                {"c":"b","s":"ok","v":"145.96"},
                {"c":"a","s":"ok","v":"145.98"},
                {"c":"bsz","s":"ok","v":"5"},
                {"c":"asz","s":"ok","v":"1"},
                {"c":"ltm","s":"ok","v":"2023-01-27T21:44:56.737464530"}
                ]
        },
        {"symbol":"IBM_S U","status":"ok",
        "data":[
                {"c":"pc","s":"ok","v":"134.45"},
                {"c":"l","s":"ok","v":"134.39"},
                {"c":"b","s":"ok","v":"134.35"},
                {"c":"a","s":"ok","v":"134.50"},
                {"c":"bsz","s":"ok","v":"1"},
                {"c":"asz","s":"ok","v":"10"},
                {"c":"ltm","s":"ok","v":"2023-01-27T21:42:47.949069568"}
                ]
        }
]
}
Symbol: EUR/USD_CFI
   Status: ok
    Previous Close: 1.08953
    Last Trade Price: 1.08685
    Bid Price: 1.08664
    Ask Price: 1.08705
    Bid Size: 0
    Ask Size: 0
    Volume: 0
    Last Trade Time: 2023-01-27T21:59:59.057000000

Symbol: AAPL_S U
  Status: ok
    Previous Close: 143.96
    Last Trade Price: 145.93
    Bid Price: 145.85
    Ask Price: 145.90
    Bid Size: 13
    Ask Size: 4
    Volume: 70560507
    Last Trade Time: 2023-01-27T23:28:05.743251151

Symbol: IBM_S U
  Status: ok
    Previous Close: 134.45
    Last Trade Price: 134.39
    Bid Price: 134.40
    Ask Price: 134.50
    Bid Size: 7
    Ask Size: 1
    Volume: 8142373
    Last Trade Time: 2023-01-27T23:25:05.287452672
Symbol: EUR/USD_CFI
  Status: ok
    Previous Close: 1.08953
    Last Trade Price: 1.08685
    Bid Price: 1.08664
    Ask Price: 1.08705
    Bid Size: 0
    Ask Size: 0
    Volume: 0
    Last Trade Time: 2023-01-27T21:59:59.057000000

Symbol: AAPL_S U
  Status: ok
    Previous Close: 143.96
    Last Trade Price: 145.93
    Bid Price: 145.85
    Ask Price: 145.89
    Bid Size: 13
    Ask Size: 1
    Volume: 70562197
    Last Trade Time: 2023-01-27T23:33:26.099760059

Symbol: IBM_S U
  Status: ok
    Previous Close: 134.45
    Last Trade Price: 134.39
    Bid Price: 134.40
    Ask Price: 134.50
    Bid Size: 7
    Ask Size: 1
    Volume: 8142373
    Last Trade Time: 2023-01-27T23:30:00.004172032
Symbol: EUR/USD_CFI
  Status: ok
    Previous Close: 1.08953
    Last Trade Price: 1.08685
    Bid Price: 1.08664
    Ask Price: 1.08705
    Bid Size: 0
    Ask Size: 0
    Last Trade Time: 1/27/2023 9:59:59 PM

Symbol: AAPL_S U
  Status: ok
    Previous Close: 143.96
    Last Trade Price: 145.93
    Bid Price: 145.85
    Ask Price: 145.89
    Bid Size: 3
    Ask Size: 2
    Last Trade Time: 1/27/2023 11:58:24 PM

Symbol: IBM_S U
  Status: ok
    Previous Close: 134.45
    Last Trade Price: 134.39
    Bid Price: 134.41
    Ask Price: 134.50
    Bid Size: 1
    Ask Size: 2
    Last Trade Time: 1/27/2023 11:51:05 PM

Snapshot Request

The Snapshot Request is a type of request in the API that allows users to request a snapshot of data for a specific set of instrument symbols and data columns. The request is made by sending a GET or POST request to the endpoint https://api.activetick.com/snapshot.json and including the required parameters in the query string. These parameters include a valid sessionid, which is obtained through a prior authorization request, a list of symbols, and a list of data columns.

The Snapshot Response is a collection of data for each requested instrument symbol. The response includes information about the response itself, as well as an array of rows, with one row for each requested symbol. The rows contain information about the symbol, such as the symbol itself, and the data for each requested column. In some cases, a row may not contain data because the symbol may be invalid, the user may not have access to the specific exchange, or the maximum amount of rows allowed in the response has been exceeded. In such cases, the response will include information about why data for the symbol is not available.

Each row in the response will contain a list of values for each requested column. The values are contained in an array with information about the data column id, the data column status, and the data value itself.

Snapshot Request Endpoint

https://api.activetick.com/snapshot.json?sessionid=<sessionid>&symbols=<symbol1,symbol2>2&columns=<column1,column2>

Snapshot Request Parameters

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 Indicates the type of response, in this case "snapshot"
status Indicates if the request was completed successfully. Possible values are "ok" and "fail"
rows An array of snapshot row items, each containing information for a specific requested instrument symbol

Snapshot Row Item

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

Snapshot Data Item

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

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.

Intraday Pricing Data

Intraday pricing example:

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

Another example:

{
"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 Conditions
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

Calculated data example:

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

The calculated data fields include statistical information and other calculations based on the pricing and volume data, which are updated at regular intervals. These calculated data columns provide additional insights and can be used to help identify trends and patterns in the underlying data.

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 Data

Option greeks example:

{
"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 option contracts. This dataset is updated periodically throughout the trading session. Greeks, also known as risk measures, are used to measure the sensitivity of an option's price to changes in underlying asset price, volatility, and time to expiration.

It's important to note that because of the nature of how American option Greeks are derived, not all contracts have Greek values.

The following table shows the Data Column Ids and the corresponding Description of the Option Greeks data that is returned by the API:

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 Data

Company dividends example:

{
"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 dividends data includes information on dividends declared by a particular company, such as the amount of the dividend, the type of dividend (monthly, quarterly, or annual), and important dates related to the dividend. This information is updated on the date the dividend is declared. The following table provides a list of all available data columns:

Data Column Description
divtype The type of dividend, which can be monthly, quarterly, or annual.
divamt The amount of the dividend.
divdecldt The date on which the dividend was declared.
divexdt The ex-dividend date, which is the date on which the stock starts trading without the dividend.
divrecdt The record date, which is the date on which the stockholder must be registered in the company's books to receive the dividend.
divpaydt The payable date, which is the date on which the dividend is paid to stockholders.

Company Information Data

Company information data example:

{
"type":"snapshot",
"status":"ok",
"rows":[
        {"symbol":"AAPL_S U","status":"ok",
         "data":[
                 {"c":"sd","s":"ok","v":"Apple Inc."}
                ]
        }
       ]
}

Company information is updated periodically and includes various details about the company such as a short and long description, SIC and SIK codes, and primary stock exchange. The following table provides a list of data columns and their respective descriptions:

Data Column Id Description
sd Short Description
ld Long Description
sic Stock SIC Code
sik Stock SIK Code
pex Stock Primary Exchange

Historical Data

MarketFeed processes exchange feeds in real-time and stores the data in its historical databases. The historical data provided by MarketFeed's API includes:

Overall, the primary way to query historical data using the API is by providing an instrument symbol, a historical time range, and additional query parameters. These parameters can include bar intervals, trade conditions, and other relevant information to narrow down the results to the specific data needed.

Chart Bar Data

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, the API supports intraday minutely bars ranging between 1-60 minutes, as well as daily and weekly bars. In addition to standard timeframes, the API also supports custom tick bars, which are created using tick data where each bar is made up from a number of ticks.

With exception of tick bars, all historical bar data is adjusted for splits and dividends. This means that the prices in the historical charting data have been modified to reflect the impact of any stock splits or dividends that have occurred.

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.

Request Limits

Bar type Limit
Tick Limit 1 hour
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.

Requesting Chart Bar Data

Example bar history request:

curl -X POST https://api.activetick.com/bars.json \
 -H "Accept-Encoding: gzip, deflate" \
 -i -d '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'
$.ajax({
  type: 'POST',
  url: 'https://api.activetick.com/bars.json',
  data: {
    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
  },
  success: function(data) {
    console.log('Bar data:');
    data.bars.forEach(function(bar) {
      console.log('Time: ' + bar.tm + ', Open: ' + bar.o + ', High: ' + bar.h + ', Low: ' + bar.l + ', Close: ' + bar.c + ', Volume: ' + bar.v + ', Trades: ' + bar.t);
    });
  }
});

import requests

url = "https://api.activetick.com/bars.json"
data = {
"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
}
headers = {
"Accept-Encoding": "gzip, deflate"
}
response = requests.post(url, data=data, headers=headers)

print("Status code: ", response.status_code,  " Available Requests Left: ", response.headers["X-Available-Requests-Left"])

bars_data = response.json()
for bar in bars_data["bars"]:
    print("Time: ", bar["tm"], "Open: ", bar["o"], "High: ", bar["h"], "Low: ", bar["l"], "Close: ", bar["c"], "Volume: ", bar["v"], "Ticks: ", bar["t"])
using System;
using System.Collections.Generic;
using System.Net.Http;
using Newtonsoft.Json;

namespace BarsData
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var client = new HttpClient())
            {
                // Set base address
                client.BaseAddress = new Uri("https://api.activetick.com/");

                // Create the POST request
                var request = new HttpRequestMessage
                {
                    Method = HttpMethod.Post,
                    RequestUri = new Uri("bars.json", UriKind.Relative),
                    Content = new FormUrlEncodedContent(new[]
                    {
                        new KeyValuePair<string, string>("sessionid", "MY_SESSIONID"),
                        new KeyValuePair<string, string>("symbol", "IBM_S-U"),
                        new KeyValuePair<string, string>("bartype", "intraday"),
                        new KeyValuePair<string, string>("minute", "30"),
                        new KeyValuePair<string, string>("begintime", "2022-01-10T00:00:00"),
                        new KeyValuePair<string, string>("endtime", "2022-01-13T00:00:00"),
                        new KeyValuePair<string, string>("sessiontype", "regular"),
                        new KeyValuePair<string, string>("include_empty_bars", "false")
                    })
                };

                // Send the POST request and get the response
                var response = client.SendAsync(request).Result;
                if (response.IsSuccessStatusCode)
                {
                    // Read the response content
                    var content = response.Content.ReadAsStringAsync().Result;

                    // Deserialize the JSON data
                    var data = JsonConvert.DeserializeObject<BarsData>(content);

                    // Print the bars data with descriptions
                    Console.WriteLine("Type: " + data.Type);
                    Console.WriteLine("Status: " + data.Status);
                    Console.WriteLine("Symbol: " + data.Symbol);
                    Console.WriteLine("Bars: ");
                    foreach (var bar in data.Bars)
                    {
                        Console.WriteLine("Time: " + bar.Tm + ", Open: " + bar.O + ", High: " + bar.H + ", Low: " + bar.L + ", Close: " + bar.C + ", Volume: " + bar.V + ", Ticks: " + bar.T);
                    }
                }
                else
                {
                    // Print the error message
                    Console.WriteLine("Request failed: " + response.StatusCode);
                }
            }
        }
    }

    class BarsData
    {
        public string Type { get; set; }
        public string Status { get; set; }
        public string Symbol { get; set; }
        public Bar[] Bars { get; set; }
    }

    class Bar
    {
        public string Tm { get; set; }
        public string O { get; set; }
        public string H { get; set; }
        public string L { get; set; }
        public string C { get; set; }
        public string T { get; set; }
        public string V { get; set; }
    }
}

Example bar history response:

HTTP/1.1 200 OK
Content-Type: application/json
X-Available-Requests-Left: 199
Content-Length: 4640

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

The Bar Data Request is a RESTful API endpoint that allows clients to request historical bar data for a specific instrument symbol. The endpoint is accessed by sending a GET or POST request to the URL https://api.activetick.com/bars.json, along with several required parameters and optional parameters.

The Bar Data Request Parameters section defines the available parameters for the API request and what each of them represents. The Bar Types section defines the different types of bars that can be requested, and the Bar Session Types section defines the different trading sessions that data can be requested for.

The Bar data response is the response returned by the API after a successful request. The response contains a JSON object that includes response metadata (type, status, and symbol) and an array of pricing information for each bar in the form of bar items. The Bar Item section defines the different pieces of information included in each bar item, such as timestamp, prices, volume, and tick count.

Bar Data Request Endpoint

https://api.activetick.com/bars.json?sessionid=<sessionid>&symbol=<symbol>&bartype=<bartype>&minute=<minute>&begintime=<begintime>&endtime=<endtime>&sessiontype=<sessiontype>&include_empty_bars=<include_empty_bars>

Bar Data Request Parameters

Parameter Required Description
sessionid Yes A valid sessionid value returned from prior authorization. This is necessary for authentication and identification of the user making the request.
symbol Yes The instrument symbol, such as the stock ticker, for which historical data is being requested.
bartype Yes The type of bars to be returned, such as tick, intraday, daily, or weekly.
minute No The intraday minute compression is only required for intraday bars. This parameter determines the duration of each bar, with options ranging from 1-60 minutes.
ticks No The ticks parameter is only required when tick bartype is selected. The ticks parameter determines how many ticks to include in each generated bar. Valid range is 1-1000 ticks.
begintime Yes The start time for the historical data being requested. This parameter should be in the format of "YYYY-MM-DDTHH:MM:SS" and specify the date and time in UTC.
endtime Yes The end time for the historical data being requested. This parameter should be in the format of "YYYY-MM-DDTHH:MM:SS" and specify the date and time in UTC.
sessiontype No An optional parameter that specifies the type of session for which data is being requested. The default value is "both" if this parameter is not set. This can be set to "regular" or "extended" to specify the trading session.
include_empty_bars No An optional boolean parameter to include empty bars in response even if trades didn't happen for those bars. The default is false if this parameter is not set. This is useful for technical analysis calculations.

Bar Types

Bar Type Description
tick Tick bars based on number of ticks rather than time span. Each bar represents the pricing movement and volume accumulation for a number of ticks.
intraday Intraday bars with a minute timeframe. Each bar represents the pricing movements and volume accumulation for the specified number of minutes passed in the request.
daily Daily bars with a timeframe of one day. Each bar represents the pricing movements and volume accumulation for a single day.
weekly Weekly bars with a timeframe of one week. Each bar represents the pricing movements and volume accumulation for an entire week.

Bar Session Types

Session Type Description
regular Returns data for regular trading sessions only. This typically includes trading hours for the primary exchange for the symbol.
extended Returns data for extended hours trading sessions only. This typically includes pre-market and post-market trading sessions for the primary exchange for the symbol.
both Returns data for both regular and extended hours trading sessions. This includes trading hours for the primary exchange for the symbol, as well as any pre-market and post-market sessions that are available.

Bar Data Response

Bar data response contains response metadata and an array of pricing information for each bar. The following table lists everything included in the response, including the bar's timestamp, opening price, high price, low price, closing price, volume, and tick count.

Name Description
type "bars"
status Indicates if the request completed successfully. Possible values are "ok" and "fail".
symbol Original request symbol.
bars Array of bar items with pricing information, including the timestamp (tm), opening price (o), high price (h), low price (l), closing price (c), volume (v), and tick count (t).

Bar Item

Name Description
tm Bar time in the format of YYYY-MM-DDTHH:MM:SS
o Open price for the bar
h High price for the bar
l Low price for the bar
c Close price for the bar
v Volume of trades during the bar
t Number of trades during the bar

Time Series Data

Historical time series data is made up of all original market events received from exchange data feeds, including information on all trade transactions and full bid/ask quote pricing. This type of data is primarily used for market analysis, back-testing trading strategies, market research and other applications.

When dealing with instruments that trade 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 is not adjusted for splits or dividends.

When requesting time series data, there are limits on the number of rows that can be requested in a single request. Each request must include a maximum number of expected rows, and cannot exceed 50,000. Additionally, the time range for the request cannot exceed more than 24 hours.

All time series tick data records contain nanosecond timestamps for precise timing of the market events

It's important to take into consideration the size of the datasets when querying data for active symbols, as some actively traded instruments could contain several million rows of data each trading session.

Requesting Time Series Data

Example time series request:

curl -X POST https://api.activetick.com/ticks.json \
  -H "Accept-Encoding: gzip" \
 --compressed -i -d 'MY_SESSIONID&symbol=AAPL_S U&ticktype=both&maxrecords=20&begintime=2022-01-21T10:00:00&endtime=2022-01-21T12:00:00'
$.ajax({
  type: "POST",
  url: "https://api.activetick.com/ticks.json",
  data: {
    sessionid: "MY_SESSION",,
    symbol: "AAPL_S U",
    ticktype: "both",
    maxrecords: 20,
    begintime: "2022-01-21T10:00:00",
    endtime: "2022-01-21T12:00:00"
  },
  headers: {
    "Accept-Encoding": "gzip"
  },
  success: function(response) {
    console.log("Type: ", response.type);
    console.log("Status: ", response.status);
    console.log("Symbol: ", response.symbol);

    var ticks = response.ticks;
    for (var i = 0; i < ticks.length; i++) {
      var tick = ticks[i];
      if (tick.t === "q") {
        console.log(`Quote Tick: [Index: ${tick.i}] [Time: ${tick.tm}] [Bid price: ${tick.b}] [Ask price: ${tick.a}] [Bid exchange: ${tick.bx}] [Ask exchange: ${tick.ax}] [Bid size: ${tick.bz}] [Ask size: ${tick.az}] [Quote condition: ${tick.c}]`);        
      } else if (tick.t === "t") {
        console.log(`Trade Tick: [Index: ${tick.i}] [Time: ${tick.tm}] [Last traded price: ${tick.l}] [Last traded exchange: ${tick.x}] [Last traded size: ${tick.z}] [Trade flags: ${tick.f}] [Trade conditions: ${tick.c}]`);        
      }
    }
  },
  error: function(error) {
    console.error("Error in fetching data: ", error);
  }
});

import requests

url = "https://api.activetick.com/ticks.json"
headers = {
    "Accept-Encoding": "gzip"
}

data = {
    "sessionid": "MY_SESSIONID",
    "symbol": "AAPL_S U",
    "ticktype": "both",
    "maxrecords": 20,
    "begintime": "2022-01-21T10:00:00",
    "endtime": "2022-01-21T12:00:00"
}

response = requests.post(url, headers=headers, data=data)

if response.status_code == 200:
    response_json = response.json()
    print(f"Type: {response_json['type']}")
    print(f"Status: {response_json['status']}")
    print(f"Symbol: {response_json['symbol']}")

    for tick in response_json['ticks']:
        if tick['t'] == 'q':
            print(f"Quote Tick: [Index: {tick['i']}] [Time: {tick['tm']}] [Bid price: {tick['b']}] [Ask price: {tick['a']}] [Bid exchange: {tick['bx']}] [Ask exchange: {tick['ax']}] [Bid size: {tick['bz']}] [Ask size: {tick['az']}] [Quote condition: {tick['c']}]")
        elif tick['t'] == 't':
            print(f"Trade Tick: [Index: {tick['i']}] [Time: {tick['tm']}] [Last traded price: {tick['l']}] [Last traded exchange: {tick['x']}] [Last traded size: {tick['z']}] [Trade flags: {tick['f']}] [Trade conditions: {tick['c']}]")
else:
    print(f"Error in fetching data: {response.text}")
using System;
using System.Net.Http;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.IO;
using System.IO.Compression;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {

            using (var client = new HttpClient())
            {
                // Set base address
                client.BaseAddress = new Uri("https://api.activetick.com/");

                //set acceptable encoding to gzip
                client.DefaultRequestHeaders.Add("Accept-Encoding", "gzip");

                // Create the POST request
                var request = new HttpRequestMessage
                {
                    Method = HttpMethod.Post,
                    RequestUri = new Uri("ticks.json", UriKind.Relative),
                    Content = new FormUrlEncodedContent(new[]
                    {
                        new KeyValuePair<string, string>("sessionid", "MY_SESSIONID"),
                        new KeyValuePair<string, string>("symbol", "AAPL_S U"),
                        new KeyValuePair<string, string>("ticktype", "both"),
                        new KeyValuePair<string, string>("maxrecords", "20"),
                        new KeyValuePair<string, string>("begintime",  "2022-01-21T10:00:00"),
                        new KeyValuePair<string, string>("endtime", "2022-01-21T12:00:00"),
                    })
                };

                // Send the POST request and get the response
                var response = client.SendAsync(request).Result;

                using (var stream = response.Content.ReadAsStreamAsync().Result)
                {
                    using (var decompressedStream = new GZipStream(stream, CompressionMode.Decompress))
                    {
                        using (var streamReader = new StreamReader(decompressedStream))
                        {
                            var responseData = streamReader.ReadToEnd();
                            dynamic result = JsonConvert.DeserializeObject(responseData);
                            Console.WriteLine("Type: " + result.type);
                            Console.WriteLine("Status: " + result.status);
                            Console.WriteLine("Symbol: " + result.symbol);

                            foreach (var tick in result.ticks)
                            {
                                if (tick.t == "q")
                                {
                                    Console.WriteLine("Quote Tick: [Index: " + tick.i + "] [Time: " + tick.tm + "] [Bid price: " + tick.b + "] [Ask price: " + tick.a + "] [Bid exchange: " + tick.bx + "] [Ask exchange: " + tick.ax + "] [Bid size: " + tick.bz + "] [Ask size: " + tick.az + "] [Quote condition: " + tick.c + "]");
                                }
                                else if (tick.t == "t")
                                {
                                    Console.WriteLine("Trade Tick: [Index: " + tick.i + "] [Time: " + tick.tm + "] [Last traded price: " + tick.l + "] [Last traded exchange: " + tick.x + "] [Last traded size: " + tick.z + "] [Trade flags: " + tick.f + "] [Trade conditions: " + tick.c[0] + "," + tick.c[1] + "," + tick.c[2] + "," + tick.c[3] + "]");
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Encoding: gzip
X-Available-Requests-Left: 199
Content-Length: 948

{
"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"]},
    {"t":"q","i":"2838","tm":"2022-01-21T10:00:13.337792402","b":"163.81","a":"163.93","bx":"P","ax":"P","bz":"4","az":"1","c":"0"},
    {"t":"t","i":"6637","tm":"2022-01-21T10:00:13.337794549","l":"163.88","x":"P","z":"5","f":"194","c":["37","12","14","0"]},
    {"t":"t","i":"6638","tm":"2022-01-21T10:00:13.337794691","l":"163.87","x":"P","z":"10","f":"194","c":["37","12","14","0"]},
    {"t":"t","i":"6639","tm":"2022-01-21T10:00:13.337794904","l":"163.86","x":"P","z":"3","f":"194","c":["37","12","14","0"]},
    {"t":"t","i":"6640","tm":"2022-01-21T10:00:13.337795046","l":"163.86","x":"P","z":"1","f":"194","c":["37","12","14","0"]},
    {"t":"t","i":"6641","tm":"2022-01-21T10:00:13.337802821","l":"163.85","x":"P","z":"10","f":"194","c":["37","12","14","0"]}
    ]
}

Type:  ticks
Status:  ok
Symbol:  AAPL_S U
Quote Tick: [Index: 2835] [Time: 2022-01-21T10:00:01.265742794] [Bid price: 163.82] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: Q] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6626] [Time: 2022-01-21T10:00:02.986469412] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6627] [Time: 2022-01-21T10:00:03.998868509] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 20] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6628] [Time: 2022-01-21T10:00:03.998873260] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 7] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6629] [Time: 2022-01-21T10:00:03.999450924] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 29] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Quote Tick: [Index: 2836] [Time: 2022-01-21T10:00:05.082729164] [Bid price: 163.82] [Ask price: 163.94] [Bid exchange: P] [Ask exchange: P] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6630] [Time: 2022-01-21T10:00:05.082732879] [Last traded price: 163.93] [Last traded exchange: Q] [Last traded size: 30] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6631] [Time: 2022-01-21T10:00:07.042183294] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 21] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6632] [Time: 2022-01-21T10:00:07.042183412] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Quote Tick: [Index: 2837] [Time: 2022-01-21T10:00:11.993624918] [Bid price: 163.82] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: P] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6633] [Time: 2022-01-21T10:00:12.314534157] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 9] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6634] [Time: 2022-01-21T10:00:12.314593373] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 125] [Trade flags: 194] [Trade conditions: 0,12,14,0]
Trade Tick: [Index: 6635] [Time: 2022-01-21T10:00:13.337067632] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 73] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6636] [Time: 2022-01-21T10:00:13.337070429] [Last traded price: 163.87] [Last traded exchange: Q] [Last traded size: 27] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Quote Tick: [Index: 2838] [Time: 2022-01-21T10:00:13.337792402] [Bid price: 163.81] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: P] [Bid size: 4] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6637] [Time: 2022-01-21T10:00:13.337794549] [Last traded price: 163.88] [Last traded exchange: P] [Last traded size: 5] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6638] [Time: 2022-01-21T10:00:13.337794691] [Last traded price: 163.87] [Last traded exchange: P] [Last traded size: 10] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6639] [Time: 2022-01-21T10:00:13.337794904] [Last traded price: 163.86] [Last traded exchange: P] [Last traded size: 3] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6640] [Time: 2022-01-21T10:00:13.337795046] [Last traded price: 163.86] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6641] [Time: 2022-01-21T10:00:13.337802821] [Last traded price: 163.85] [Last traded exchange: P] [Last traded size: 10] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Type: ticks
Status: ok
Symbol: AAPL_S U
Quote Tick: [Index: 2835] [Time: 2022-01-21T10:00:01.265742794] [Bid price: 163.82] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: Q] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6626] [Time: 2022-01-21T10:00:02.986469412] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: ['37', '12', '0', '0']]
Trade Tick: [Index: 6627] [Time: 2022-01-21T10:00:03.998868509] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 20] [Trade flags: 194] [Trade conditions: ['37', '12', '0', '0']]
Trade Tick: [Index: 6628] [Time: 2022-01-21T10:00:03.998873260] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 7] [Trade flags: 194] [Trade conditions: ['37', '12', '0', '0']]
Trade Tick: [Index: 6629] [Time: 2022-01-21T10:00:03.999450924] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 29] [Trade flags: 194] [Trade conditions: ['37', '12', '0', '0']]
Quote Tick: [Index: 2836] [Time: 2022-01-21T10:00:05.082729164] [Bid price: 163.82] [Ask price: 163.94] [Bid exchange: P] [Ask exchange: P] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6630] [Time: 2022-01-21T10:00:05.082732879] [Last traded price: 163.93] [Last traded exchange: Q] [Last traded size: 30] [Trade flags: 194] [Trade conditions: ['37', '12', '0', '0']]
Trade Tick: [Index: 6631] [Time: 2022-01-21T10:00:07.042183294] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 21] [Trade flags: 194] [Trade conditions: ['37', '12', '0', '0']]
Trade Tick: [Index: 6632] [Time: 2022-01-21T10:00:07.042183412] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: ['37', '12', '0', '0']]
Quote Tick: [Index: 2837] [Time: 2022-01-21T10:00:11.993624918] [Bid price: 163.82] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: P] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6633] [Time: 2022-01-21T10:00:12.314534157] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 9] [Trade flags: 194] [Trade conditions: ['37', '12', '0', '0']]
Trade Tick: [Index: 6634] [Time: 2022-01-21T10:00:12.314593373] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 125] [Trade flags: 194] [Trade conditions: ['0', '12', '14', '0']]
Trade Tick: [Index: 6635] [Time: 2022-01-21T10:00:13.337067632] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 73] [Trade flags: 194] [Trade conditions: ['37', '12', '14', '0']]
Trade Tick: [Index: 6636] [Time: 2022-01-21T10:00:13.337070429] [Last traded price: 163.87] [Last traded exchange: Q] [Last traded size: 27] [Trade flags: 194] [Trade conditions: ['37', '12', '14', '0']]
Quote Tick: [Index: 2838] [Time: 2022-01-21T10:00:13.337792402] [Bid price: 163.81] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: P] [Bid size: 4] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6637] [Time: 2022-01-21T10:00:13.337794549] [Last traded price: 163.88] [Last traded exchange: P] [Last traded size: 5] [Trade flags: 194] [Trade conditions: ['37', '12', '14', '0']]
Trade Tick: [Index: 6638] [Time: 2022-01-21T10:00:13.337794691] [Last traded price: 163.87] [Last traded exchange: P] [Last traded size: 10] [Trade flags: 194] [Trade conditions: ['37', '12', '14', '0']]
Trade Tick: [Index: 6639] [Time: 2022-01-21T10:00:13.337794904] [Last traded price: 163.86] [Last traded exchange: P] [Last traded size: 3] [Trade flags: 194] [Trade conditions: ['37', '12', '14', '0']]
Trade Tick: [Index: 6640] [Time: 2022-01-21T10:00:13.337795046] [Last traded price: 163.86] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: ['37', '12', '14', '0']]
Trade Tick: [Index: 6641] [Time: 2022-01-21T10:00:13.337802821] [Last traded price: 163.85] [Last traded exchange: P] [Last traded size: 10] [Trade flags: 194] [Trade conditions: ['37', '12', '14', '0']]
Type: ticks
Status: ok
Symbol: AAPL_S U
Quote Tick: [Index: 2835] [Time: 1/21/2022 10:00:01 AM] [Bid price: 163.82] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: Q] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6626] [Time: 1/21/2022 10:00:02 AM] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6627] [Time: 1/21/2022 10:00:03 AM] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 20] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6628] [Time: 1/21/2022 10:00:03 AM] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 7] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6629] [Time: 1/21/2022 10:00:03 AM] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 29] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Quote Tick: [Index: 2836] [Time: 1/21/2022 10:00:05 AM] [Bid price: 163.82] [Ask price: 163.94] [Bid exchange: P] [Ask exchange: P] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6630] [Time: 1/21/2022 10:00:05 AM] [Last traded price: 163.93] [Last traded exchange: Q] [Last traded size: 30] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6631] [Time: 1/21/2022 10:00:07 AM] [Last traded price: 163.90] [Last traded exchange: P] [Last traded size: 21] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6632] [Time: 1/21/2022 10:00:07 AM] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Quote Tick: [Index: 2837] [Time: 1/21/2022 10:00:11 AM] [Bid price: 163.82] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: P] [Bid size: 2] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6633] [Time: 1/21/2022 10:00:12 AM] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 9] [Trade flags: 194] [Trade conditions: 37,12,0,0]
Trade Tick: [Index: 6634] [Time: 1/21/2022 10:00:12 AM] [Last traded price: 163.89] [Last traded exchange: P] [Last traded size: 125] [Trade flags: 194] [Trade conditions: 0,12,14,0]
Trade Tick: [Index: 6635] [Time: 1/21/2022 10:00:13 AM] [Last traded price: 163.90] [Last traded exchange: Q] [Last traded size: 73] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6636] [Time: 1/21/2022 10:00:13 AM] [Last traded price: 163.87] [Last traded exchange: Q] [Last traded size: 27] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Quote Tick: [Index: 2838] [Time: 1/21/2022 10:00:13 AM] [Bid price: 163.81] [Ask price: 163.93] [Bid exchange: P] [Ask exchange: P] [Bid size: 4] [Ask size: 1] [Quote condition: 0]
Trade Tick: [Index: 6637] [Time: 1/21/2022 10:00:13 AM] [Last traded price: 163.88] [Last traded exchange: P] [Last traded size: 5] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6638] [Time: 1/21/2022 10:00:13 AM] [Last traded price: 163.87] [Last traded exchange: P] [Last traded size: 10] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6639] [Time: 1/21/2022 10:00:13 AM] [Last traded price: 163.86] [Last traded exchange: P] [Last traded size: 3] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6640] [Time: 1/21/2022 10:00:13 AM] [Last traded price: 163.86] [Last traded exchange: P] [Last traded size: 1] [Trade flags: 194] [Trade conditions: 37,12,14,0]
Trade Tick: [Index: 6641] [Time: 1/21/2022 10:00:13 AM] [Last traded price: 163.85] [Last traded exchange: P] [Last traded size: 10] [Trade flags: 194] [Trade conditions: 37,12,14,0]

The Time Series Data Request is a RESTful API endpoint that allows clients to request historical time series data for a specific instrument symbol. The endpoint is accessed by sending a GET or POST request to the URL https://api.activetick.com/ticks.json, along with several required parameters and optional parameters.

The Time Series Data Request Parameters section defines the available parameters for the API request and what each of them represents. The Tick Types section defines the different types of tick records that can be requested.

The Tick data response is the response returned by the API after a successful request. The response contains a JSON object that includes response metadata (type, status, and symbol) and an array of tick records.

The tick array can contain various types of tick records, each distinguished by a unique code which must be parsed first. The rest of the record should then be parsed according to its type.

Time Series Request Endpoint

https://api.activetick.com/ticks.json?sessionid=<sessionid>&symbol=<symbol>&ticktype=<ticktype>&maxrecords=<maxrecords>&begintime=<begintime>&endtime=<endtime>

Time Series Request Parameters

Parameter Required Description
sessionid Yes A valid sessionid value returned from prior authorization.
symbol Yes The symbol of the instrument for which the tick data is requested.
ticktype Yes The type of tick data to be returned, such as trades, quotes, etc.
maxrecords Yes The maximum number of records to return within the specified time range. The limit is 50,000.
begintime Yes The start time for the requested time range, formatted in YYYY-MM-DDThh:mm:ss.
endtime Yes The end time for the requested time range, formatted in YYYY-MM-DDThh:mm:ss.

Tick Types

Tick Type Description
trades Only return trade records. Trade records contain information on all trade transactions.
extended_trades Return trade records, along with quote information at the time of the trade transaction.
quotes Only return quote records. Quote records contain full bid/ask pricing information.
both Return both trade and quote records. This option includes both trade transaction information and bid/ask pricing information.

Time Series Response

Time series response contains detailed information about the request made, as well as an array of pricing information matching the requested parameters. The response will include information such as the type of data returned, the status of the request, and the original instrument symbol. Additionally, based on the requested tickType, the array may contain different types of items in its response.

The following table lists all the items included in the response:

Name Description
type "ticks"
status Indicates if the request was completed successfully. Possible values are "ok" and "fail".
symbol Original instrument symbol.
ticks Array of data ticks consisting of time series data. Each tick item includes information specific to a single trade or quote event, depending on the requested tickType.

Times Series Records

Quote Tick Record

Example of a single quote tick record:

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

The quote tick record contains bid/ask information for a specific instrument. The information is typically updated whenever new orders are added, updated, or removed on either side of the order book, or after a trade is made and the order is no longer advertised. The tick record includes details such as the bid and ask prices, the exchange on which the bid and ask orders were placed, the size of the bid and ask orders, and any conditions that may be associated with the quote. The following table lists all of the items included in the 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, in the format of YYYY-MM-DDThh:mm:ss
b Bid price.
a Ask price.
bx Exchange that the bid price is coming from.
ax Exchange that the ask price is coming from.
bz Bid size.
az Ask size.
c Quote condition, such as "regular" or "closed"

Quote Conditions

Exchange-specific conditions are included in quotes. The following table lists the US-based equity quote conditions and their corresponding values:

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 Record

Example of a single trade tick record:

{  
  "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 indicators that are added by MarketFeed to indicate the presence of certain trade attributes. These flags can be used to denote specific characteristics of a trade event, such as whether the trade price is the highest or lowest of the day, or whether the trade occurred during regular or extended market hours.

Multiple trade flags can exist for a single trade event. For example, a trade's price may be the highest price of the day, and it may also be the opening price at the same time. To accommodate this, MarketFeed combines all possible trade flags into a single integer using bitwise OR. This allows for multiple flags to be set for a single trade event.

To check for the existence of a specific flag, a simple bitwise AND check for the trade flag bit can be made. The following table lists all the trade flags, their values and descriptions:

Trade Flag Value Description
RegularMarketLastPrice 0x1 Indicates that the last trade price is valid and occurred during regular trading hours.
RegularMarketVolume 0x2 Indicates that the last trade size is valid and occurred during regular trading hours.
HighPrice 0x4 Indicates that the last trade price is the highest price of the day, and occurred during regular trading hours.
LowPrice 0x8 Indicates that the last trade price is the lowest price of the day, and occurred during regular trading hours.
DayHighPrice 0x10 Indicates that the last trade price is the highest price of the day, and occurred during both regular and extended trading hours.
DayLowPrice 0x20 Indicates that the last trade price is the lowest price of the day, and occurred during both regular and extended trading hours.
ExtendedMarketLastPrice 0x40 Indicates that the last trade price is valid and occurred during extended trading hours.
PreMarketVolume 0x80 Indicates that the last trade size is valid and occurred during pre-market extended trading hours.
AfterMarketVolume 0x100 Indicates that the last trade size is valid and occurred during after-market extended trading hours.
ClosePrice 0x200 Indicates that the last trade price is the closing price for the current trading session.
OpenPrice 0x400 Indicates that the last trade price is the opening price for the current trading session.

Trade Conditions

Trade conditions are exchange-specific values that provide additional information about a trade event. These conditions can include information such as whether the trade was executed during regular or extended trading hours, if it was a block trade, or if it was a trade that occurred at the opening or closing of the market. A single trade event can contain up to 4 different trade conditions, depending on the exchange. These conditions can be used to provide a more detailed understanding of the trade, and can be useful in analyzing market activity.

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

Extended Trade Tick Record

Example of a single extended trade tick record:

{
  "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"],
  "b":"163.82",
  "a":"163.94",
  "bx":"P",
  "ax":"P",
  "bz":"2",
  "az":"1",
  "c":"0"
}

Extended trade record contains information about a sale transaction, along with last quote information.

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.
b Bid price.
a Ask price.
bx Exchange that the bid price is coming from.
ax Exchange that the ask price is coming from.
bz Bid size.
az Ask size.
c Quote condition, such as "regular" or "closed"

Dividend Data

Historical dividend data is a record of all dividends that have been paid out by a particular company over a specified period of time. This dataset can be used to track a company's dividend payout history, and can be useful for investment analysis and portfolio management. When accessing this data, it is possible to specify which specific pieces of information (such as ex-dividend date, dividend amount, or record date) should be included in the response by passing a list of relevant columns to the query.

Example dividend history request:

curl -i -X GET 'https://api.activetick.com/dividends.json?sessionid=MY_SESSIONID&symbol=AAPL_S-U&columns=divtype,divamt,divdecldt,divexdt,divrecdt'

var sessionid = "MY_SESSIONID";
var symbol = "AAPL_S-U";
var columns = "divtype,divamt,divdecldt,divexdt,divrecdt";
var url = "https://api.activetick.com/dividends.json?sessionid=" + sessionid + "&symbol=" + symbol + "&columns=" + columns;

$.ajax({
  type: "GET",
  url: url,
  success: function(response) {
    var rows = response.rows;
    for (var i = 0; i < rows.length; i++) {
      var data = rows[i].data;
      var rowData = "";

      for (var j = 0; j < data.length; j++) {
        var column = data[j];
        switch (column.c) {
          case "divtype":
            rowData += "Dividend type: " + column.v + ", ";
            break;
          case "divamt":
            rowData += "Dividend amount: " + column.v + ", ";
            break;
          case "divdecldt":
            rowData += "Date dividend declared: " + column.v + ", ";
            break;
          case "divexdt":
            rowData += "Ex-dividend date: " + column.v + ", ";
            break;
          case "divrecdt":
             rowData += "Record date: " + column.v + ", ";
            break;
          case "divpaydt":
            rowData += "Dividend payment date: " + column.v;
            break;
          default:
            rowData += "Unknown column: " + column.c;
            break;
        }
      }

      console.log(rowData);
    }
  }
});

import requests

session_id = "MY_SESSIONID"
symbol = "AAPL_S-U"
columns = "divtype,divamt,divdecldt,divexdt,divrecdt"

url = f"https://api.activetick.com/dividends.json?sessionid={session_id}&symbol={symbol}&columns={columns}"

response = requests.get(url).json()
rows = response["rows"]
for row in rows:
    data = row["data"]
    row_data = ""
    for column in data:
        if column["c"] == "divtype":
            row_data += f"Dividend type: {column['v']}, "
        elif column["c"] == "divamt":
            row_data += f"Dividend amount: {column['v']}, "
        elif column["c"] == "divdecldt":
            row_data += f"Date dividend declared: {column['v']}, "
        elif column["c"] == "divexdt":
            row_data += f"Ex-dividend date: {column['v']}, "
        elif column["c"] == "divrecdt":
            row_data += f"Record date: {column['v']}, "
        elif column["c"] == "divpaydt":
            row_data += f"Dividend payment date: {column['v']}"
        else:
            row_data += f"Unknown column: {column['c']}"
    print(row_data)

using System;
using System.Net;
using System.IO;
using Newtonsoft.Json;

namespace ActiveTickAPI
{
    class Program
    {
        static void Main(string[] args)
        {
            string sessionID = "MY_SESSIONID";
            string symbol = "AAPL_S-U";
            string columns = "divtype,divamt,divdecldt,divexdt,divrecdt";
            string url = "https://api.activetick.com/dividends.json?sessionid=" + sessionID + "&symbol=" + symbol + "&columns=" + columns;

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = "GET";

            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            string json;
            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
            {
                json = reader.ReadToEnd();
            }

            var dividendData = JsonConvert.DeserializeObject<DividendData>(json);
            foreach (var row in dividendData.rows)
            {
                string rowData = "";
                foreach (var data in row.data)
                {
                    switch (data.c)
                    {
                        case "divtype":
                            rowData += "Dividend type: " + data.v + ", ";
                            break;
                        case "divamt":
                            rowData += "Dividend amount: " + data.v + ", ";
                            break;
                        case "divdecldt":
                            rowData += "Date dividend declared: " + data.v + ", ";
                            break;
                        case "divexdt":
                            rowData += "Ex-dividend date: " + data.v + ", ";
                            break;
                        case "divrecdt":
                            rowData += "Record date: " + data.v + ", ";
                            break;
                        case "divpaydt":
                            rowData += "Dividend payment date: " + data.v;
                            break;
                        default:
                            rowData += "Unknown column: " + data.c;
                            break;
                    }
                }

                Console.WriteLine(rowData);
            }

            Console.ReadLine();
        }
    }

    public class DividendData
    {
        public Row[] rows { get; set; }
    }

    public class Row
    {
        public Data[] data { get; set; }
    }

    public class Data
    {
        public string c { get; set; }
        public string v { get; set; }
    }
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
X-Available-Requests-Left: 197
Content-Length: 23214

{
"type":"dividends",
"status":"ok",
"rows":[
    {"data":[
                 {"c":"divtype","s":"ok","v":"1"},
                 {"c":"divamt","s":"ok","v":"0.220"},
                 {"c":"divdecldt","s":"ok","v":"2245-03-20T04:11:11.427362816"},
                 {"c":"divexdt","s":"ok","v":"2021-08-06T00:00:00.000000000"},
                 {"c":"divrecdt","s":"ok","v":"2021-08-09T00:00:00.000000000"}
         ]
        },
        {"data":[
                 {"c":"divtype","s":"ok","v":"1"},
                 {"c":"divamt","s":"ok","v":"0.630"},
                 {"c":"divdecldt","s":"ok","v":"2017-05-02T00:00:00.000000000"},
                 {"c":"divexdt","s":"ok","v":"2017-05-11T00:00:00.000000000"},
                 {"c":"divrecdt","s":"ok","v":"2017-05-15T00:00:00.000000000"}
         ]
        },
        {"data":[
                 {"c":"divtype","s":"ok","v":"1"},
                 {"c":"divamt","s":"ok","v":"0.630"},
                 {"c":"divdecldt","s":"ok","v":"2017-08-01T00:00:00.000000000"},
                 {"c":"divexdt","s":"ok","v":"2017-08-10T00:00:00.000000000"},
                 {"c":"divrecdt","s":"ok","v":"2017-08-14T00:00:00.000000000"}
         ]
        },
        {"data":[
                 {"c":"divtype","s":"ok","v":"1"},
                 {"c":"divamt","s":"ok","v":"0.630"},
                 {"c":"divdecldt","s":"ok","v":"2017-11-02T00:00:00.000000000"},
                 {"c":"divexdt","s":"ok","v":"2017-11-10T00:00:00.000000000"},
                 {"c":"divrecdt","s":"ok","v":"2017-11-13T00:00:00.000000000"}
         ]
        },
        {"data":[
                 {"c":"divtype","s":"ok","v":"1"},
                 {"c":"divamt","s":"ok","v":"0.630"},
                 {"c":"divdecldt","s":"ok","v":"2018-02-01T00:00:00.000000000"},
                 {"c":"divexdt","s":"ok","v":"2018-02-09T00:00:00.000000000"},
                 {"c":"divrecdt","s":"ok","v":"2018-02-12T00:00:00.000000000"}
         ]
        },
        ..
        ..
       ]
}
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2245-03-20T04:11:11.427362816, Ex-dividend date: 2021-08-06T00:00:00.000000000, Record date: 2021-08-09T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-05-02T00:00:00.000000000, Ex-dividend date: 2017-05-11T00:00:00.000000000, Record date: 2017-05-15T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-08-01T00:00:00.000000000, Ex-dividend date: 2017-08-10T00:00:00.000000000, Record date: 2017-08-14T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-11-02T00:00:00.000000000, Ex-dividend date: 2017-11-10T00:00:00.000000000, Record date: 2017-11-13T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2018-02-01T00:00:00.000000000, Ex-dividend date: 2018-02-09T00:00:00.000000000, Record date: 2018-02-12T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-05-01T00:00:00.000000000, Ex-dividend date: 2018-05-11T00:00:00.000000000, Record date: 2018-05-14T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-07-31T00:00:00.000000000, Ex-dividend date: 2018-08-10T00:00:00.000000000, Record date: 2018-08-13T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-11-01T00:00:00.000000000, Ex-dividend date: 2018-11-08T00:00:00.000000000, Record date: 2018-11-12T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2019-01-29T00:00:00.000000000, Ex-dividend date: 2019-02-08T00:00:00.000000000, Record date: 2019-02-11T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-04-30T00:00:00.000000000, Ex-dividend date: 2019-05-10T00:00:00.000000000, Record date: 2019-05-13T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-07-30T00:00:00.000000000, Ex-dividend date: 2019-08-09T00:00:00.000000000, Record date: 2019-08-12T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-10-30T00:00:00.000000000, Ex-dividend date: 2019-11-07T00:00:00.000000000, Record date: 2019-11-11T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2020-01-28T00:00:00.000000000, Ex-dividend date: 2020-02-07T00:00:00.000000000, Record date: 2020-02-10T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.820, Date dividend declared: 2020-04-30T00:00:00.000000000, Ex-dividend date: 2020-05-08T00:00:00.000000000, Record date: 2020-05-11T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.820, Date dividend declared: 2020-07-30T00:00:00.000000000, Ex-dividend date: 2020-08-07T00:00:00.000000000, Record date: 2020-08-10T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.2050, Date dividend declared: 2020-10-29T00:00:00.000000000, Ex-dividend date: 2020-11-06T00:00:00.000000000, Record date: 2020-11-09T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.2050, Date dividend declared: 2021-01-27T00:00:00.000000000, Ex-dividend date: 2021-02-05T00:00:00.000000000, Record date: 2021-02-08T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2021-04-28T00:00:00.000000000, Ex-dividend date: 2021-05-07T00:00:00.000000000, Record date: 2021-05-10T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2021-10-28T00:00:00.000000000, Ex-dividend date: 2021-11-05T00:00:00.000000000, Record date: 2021-11-08T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2022-01-27T00:00:00.000000000, Ex-dividend date: 2022-02-04T00:00:00.000000000, Record date: 2022-02-07T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-04-28T00:00:00.000000000, Ex-dividend date: 2022-05-06T00:00:00.000000000, Record date: 2022-05-09T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-07-28T00:00:00.000000000, Ex-dividend date: 2022-08-07T00:00:00.000000000, Record date: 2022-08-08T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-10-27T00:00:00.000000000, Ex-dividend date: 2022-11-06T00:00:00.000000000, Record date: 2022-11-07T00:00:00.000000000, 
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2245-03-20T04:11:11.427362816, Ex-dividend date: 2021-08-06T00:00:00.000000000, Record date: 2021-08-09T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-05-02T00:00:00.000000000, Ex-dividend date: 2017-05-11T00:00:00.000000000, Record date: 2017-05-15T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-08-01T00:00:00.000000000, Ex-dividend date: 2017-08-10T00:00:00.000000000, Record date: 2017-08-14T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-11-02T00:00:00.000000000, Ex-dividend date: 2017-11-10T00:00:00.000000000, Record date: 2017-11-13T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2018-02-01T00:00:00.000000000, Ex-dividend date: 2018-02-09T00:00:00.000000000, Record date: 2018-02-12T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-05-01T00:00:00.000000000, Ex-dividend date: 2018-05-11T00:00:00.000000000, Record date: 2018-05-14T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-07-31T00:00:00.000000000, Ex-dividend date: 2018-08-10T00:00:00.000000000, Record date: 2018-08-13T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-11-01T00:00:00.000000000, Ex-dividend date: 2018-11-08T00:00:00.000000000, Record date: 2018-11-12T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2019-01-29T00:00:00.000000000, Ex-dividend date: 2019-02-08T00:00:00.000000000, Record date: 2019-02-11T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-04-30T00:00:00.000000000, Ex-dividend date: 2019-05-10T00:00:00.000000000, Record date: 2019-05-13T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-07-30T00:00:00.000000000, Ex-dividend date: 2019-08-09T00:00:00.000000000, Record date: 2019-08-12T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-10-30T00:00:00.000000000, Ex-dividend date: 2019-11-07T00:00:00.000000000, Record date: 2019-11-11T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2020-01-28T00:00:00.000000000, Ex-dividend date: 2020-02-07T00:00:00.000000000, Record date: 2020-02-10T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.820, Date dividend declared: 2020-04-30T00:00:00.000000000, Ex-dividend date: 2020-05-08T00:00:00.000000000, Record date: 2020-05-11T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.820, Date dividend declared: 2020-07-30T00:00:00.000000000, Ex-dividend date: 2020-08-07T00:00:00.000000000, Record date: 2020-08-10T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.2050, Date dividend declared: 2020-10-29T00:00:00.000000000, Ex-dividend date: 2020-11-06T00:00:00.000000000, Record date: 2020-11-09T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.2050, Date dividend declared: 2021-01-27T00:00:00.000000000, Ex-dividend date: 2021-02-05T00:00:00.000000000, Record date: 2021-02-08T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2021-04-28T00:00:00.000000000, Ex-dividend date: 2021-05-07T00:00:00.000000000, Record date: 2021-05-10T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2021-10-28T00:00:00.000000000, Ex-dividend date: 2021-11-05T00:00:00.000000000, Record date: 2021-11-08T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2022-01-27T00:00:00.000000000, Ex-dividend date: 2022-02-04T00:00:00.000000000, Record date: 2022-02-07T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-04-28T00:00:00.000000000, Ex-dividend date: 2022-05-06T00:00:00.000000000, Record date: 2022-05-09T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-07-28T00:00:00.000000000, Ex-dividend date: 2022-08-07T00:00:00.000000000, Record date: 2022-08-08T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-10-27T00:00:00.000000000, Ex-dividend date: 2022-11-06T00:00:00.000000000, Record date: 2022-11-07T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2245-03-20T04:11:11.427362816, Ex-dividend date: 2021-08-06T00:00:00.000000000, Record date: 2021-08-09T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-05-02T00:00:00.000000000, Ex-dividend date: 2017-05-11T00:00:00.000000000, Record date: 2017-05-15T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-08-01T00:00:00.000000000, Ex-dividend date: 2017-08-10T00:00:00.000000000, Record date: 2017-08-14T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2017-11-02T00:00:00.000000000, Ex-dividend date: 2017-11-10T00:00:00.000000000, Record date: 2017-11-13T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.630, Date dividend declared: 2018-02-01T00:00:00.000000000, Ex-dividend date: 2018-02-09T00:00:00.000000000, Record date: 2018-02-12T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-05-01T00:00:00.000000000, Ex-dividend date: 2018-05-11T00:00:00.000000000, Record date: 2018-05-14T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-07-31T00:00:00.000000000, Ex-dividend date: 2018-08-10T00:00:00.000000000, Record date: 2018-08-13T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2018-11-01T00:00:00.000000000, Ex-dividend date: 2018-11-08T00:00:00.000000000, Record date: 2018-11-12T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.730, Date dividend declared: 2019-01-29T00:00:00.000000000, Ex-dividend date: 2019-02-08T00:00:00.000000000, Record date: 2019-02-11T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-04-30T00:00:00.000000000, Ex-dividend date: 2019-05-10T00:00:00.000000000, Record date: 2019-05-13T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-07-30T00:00:00.000000000, Ex-dividend date: 2019-08-09T00:00:00.000000000, Record date: 2019-08-12T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2019-10-30T00:00:00.000000000, Ex-dividend date: 2019-11-07T00:00:00.000000000, Record date: 2019-11-11T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.770, Date dividend declared: 2020-01-28T00:00:00.000000000, Ex-dividend date: 2020-02-07T00:00:00.000000000, Record date: 2020-02-10T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.820, Date dividend declared: 2020-04-30T00:00:00.000000000, Ex-dividend date: 2020-05-08T00:00:00.000000000, Record date: 2020-05-11T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.820, Date dividend declared: 2020-07-30T00:00:00.000000000, Ex-dividend date: 2020-08-07T00:00:00.000000000, Record date: 2020-08-10T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.2050, Date dividend declared: 2020-10-29T00:00:00.000000000, Ex-dividend date: 2020-11-06T00:00:00.000000000, Record date: 2020-11-09T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.2050, Date dividend declared: 2021-01-27T00:00:00.000000000, Ex-dividend date: 2021-02-05T00:00:00.000000000, Record date: 2021-02-08T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2021-04-28T00:00:00.000000000, Ex-dividend date: 2021-05-07T00:00:00.000000000, Record date: 2021-05-10T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2021-10-28T00:00:00.000000000, Ex-dividend date: 2021-11-05T00:00:00.000000000, Record date: 2021-11-08T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.220, Date dividend declared: 2022-01-27T00:00:00.000000000, Ex-dividend date: 2022-02-04T00:00:00.000000000, Record date: 2022-02-07T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-04-28T00:00:00.000000000, Ex-dividend date: 2022-05-06T00:00:00.000000000, Record date: 2022-05-09T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-07-28T00:00:00.000000000, Ex-dividend date: 2022-08-07T00:00:00.000000000, Record date: 2022-08-08T00:00:00.000000000,
Dividend type: 1, Dividend amount: 0.230, Date dividend declared: 2022-10-27T00:00:00.000000000, Ex-dividend date: 2022-11-06T00:00:00.000000000, Record date: 2022-11-07T00:00:00.000000000,

Dividend Request Endpoint

https://api.activetick.com/dividends.json?sessionid=sessionid&symbol=<symbol>&columns=<column1,column2>

Request Parameters

The parameters listed below are required for querying historical dividend data.

Parameter Required Description
sessionid yes A valid sessionid value obtained from previous authorization
symbol yes The symbol of the instrument for which dividend data is being requested
columns yes A list of dividend columns to include in the data returned

Dividend Columns

Data Column Id Description
divtype The type of dividend, which can be one of the following: monthly, quarterly, or annual
divamt The amount of the dividend payment
divdecldt The date on which the dividend was declared
divexdt The date on which the stock will go ex-dividend, meaning that any shares purchased on or after this date will not receive the dividend payment
divrecdt The date on which a shareholder must be on the company's record to be eligible for the dividend payment
divpaydt The date on which the dividend payment will be made to shareholders who are eligible for the payment.

Dividend Data Response

The response from querying the historical dividend data API will include several pieces of information to provide context and indicate the status of the request. This information includes:

Name Description
type The type of data being returned, in this case "dividends"
status Indicates if the request completed successfully. The possible values for this field are "ok" and "fail".
rows An array of data rows for each requested instrument symbol. Each data row will contain an array of information for each requested dividend column.

Within the rows array, each data element will have the following fields:

Name Description
c The data column id, corresponding to the column requested in the original API call.
s The status of the data column. The possible values for this field are "ok" and "fail".
v The actual data value for the column.

Streaming Data

The MarketFeed API allows clients to stream real-time market data using standard HTTP protocol. To initiate a data stream, a client sends a subscription request, which is a standard HTTP GET or POST request, to a specified endpoint on the server. The request must include a list of instruments for which the client wants to receive market data. Once the server receives the request, it performs validation checks and, if the request is valid, begins streaming the requested market data to the client.

Since streaming data is an ongoing process, there are some specific requirements that must be met when using the MarketFeed API for streaming data. One of these requirements is the use of chunked transfer encoding, which is a mechanism for streaming data transfer that is available in HTTP version 1.1 and above. In chunked transfer encoding, the data stream is divided into non-overlapping chunks, and each chunk is preceded by its size in bytes. The transmission ends when a zero-length chunk is received. All HTTP streaming responses from the MarketFeed API include a header, Transfer-Encoding: chunked, to indicate that chunked transfer encoding is being used.

Another requirement for streaming data using the API is that all stream subscription requests must include a Connection: Keep-Alive header. This header indicates to the server that the connection should not be closed by the server right after the stream subscription response is sent to the client. If this header is missing, the server will close the stream connection immediately after responding to the request, even if the subscription request is valid.

Additionally, the MarketFeed API periodically sends a heartbeat message with the server's timestamp to validate the connection state. These heartbeat messages can be ignored by the receiver.

Subscribing to Streams

Example subscription request:

curl -i -X GET 'https://api.activetick.com/stream.json?sessionid=MY_SESSIONID&symbols=AAPL_S-U,EUR/USD_CFI,ES_230300_FCU' \
 -H "Connection: Keep-Alive"
function splitJSONMessages(chunk) {
  const messages = [];
  let currentMessage = '';
  let openBrackets = 0;
  let remainingBytes = chunk.length;

  for (let i = 0; i < chunk.length; i++) {
    const char = chunk[i];
    currentMessage += char;
    if (char === '{') {
      openBrackets += 1;
    }
    if (char === '}') {
      openBrackets -= 1;
    }
    if (openBrackets === 0) {           
      messages.push(currentMessage.trim());
      remainingBytes -= currentMessage.length;
      currentMessage = '';
    }
  }

  // Return all messages, and remaining bytes in chunk if anything was partial
  return {
    messages: messages,
    remainingBytes: remainingBytes,
  };
}

let remainingMessage = '';

fetch('https://api.activetick.com/stream.json?sessionid=MY_SESSIONID&symbols=EUR/JPY_CFI,SPY_S U')
  .then(response => {
    const reader = response.body.getReader();

    function read() {
      return reader.read().then(({ value, done }) => {
        if (done) {
          return;
        }

        // Process the chunk of data
        const chunk = new TextDecoder("utf-8").decode(value);

        // Merge any previous partial chunks with new data
        const completeChunk = remainingMessage + chunk;

        // Split complete chunk into json strings
        const result = splitJSONMessages(completeChunk);

        // For each message try to parse json object
        result.messages.forEach(message => {
          try {
            if(message.length === 0)
                return;
            const json = JSON.parse(message);            

            switch (json.type) {
            case 'q':
              console.log(`Parsed Quote:`);
              console.log(`\tSymbol: ${json.s}`);
              console.log(`\tTime: ${json.tm}`);
              if (json.so) console.log(`\tSource: ${json.so}`);
              if (json.f) console.log(`\tFlags: ${json.f}`);
              if (json.co) console.log(`\tQuote Condition: ${json.co}`);
              if (json.b) console.log(`\tBid price: ${json.b}`);
              if (json.bsz) console.log(`\tBid size: ${json.bsz}`);
              if (json.bex) console.log(`\tBid exchange: ${json.bex}`);
              if (json.a) console.log(`\tAsk price: ${json.a}`);
              if (json.asz) console.log(`\tAsk size: ${json.asz}`);
              if (json.aex) console.log(`\tAsk exchange: ${json.aex}`);
              break;
            case 't':
              console.log(`Parsed Trade:`);
              console.log(`\tSymbol: ${json.s}`);
              console.log(`\tTime: ${json.tm}`);
              if (json.so) console.log(`\tSource: ${json.so}`);
              if (json.f) console.log(`\tFlags: ${json.f}`);
              if (json.co) console.log(`\tConditions: ${json.co}`);
              if (json.l) console.log(`\tLast Price: ${json.l}`);
              if (json.sz) console.log(`\tLast Size: ${json.sz}`);
              if (json.ex) console.log(`\tLast Exchange: ${json.ex}`);
            }                               
          } catch (e) {
            console.error('Failed to parse JSON:', e);                  
          }
        });

        // Save anything that's partial into remainingMessage for next read
        remainingMessage = completeChunk.substr(completeChunk.length - result.remainingBytes);

        return read();
      });
    }

    return read();
  });

import requests
import json

url = "https://api.activetick.com/stream.json"
data = {
 "sessionid": "MY_SESSIONID",
 "symbols": "AAPL_S-U,EUR/USD_CFI,ES_230300_FCU"
}
headers = {
 "Connection": "Keep-Alive"
}

response = requests.post(url, data=data, headers=headers, stream=True)
print("Status code: ", response.status_code,  " Available Requests Left: ", response.headers["X-Available-Requests-Left"])

for chunk in (response.raw.read_chunked()):
    try:
        parsed_json = json.loads(chunk)
        print(parsed_json)

        if parsed_json["type"] == "q":
            print("Parsed Quote:")
            print("\tSymbol:", parsed_json["s"])
            print("\tTime:", parsed_json["tm"])
            if "so" in parsed_json:
                print("\tSource:", parsed_json["so"])
            if "f" in parsed_json:
                print("\tFlag:", parsed_json["f"])
            if "co" in parsed_json:
                print("\tCondition:", parsed_json["co"])
            if "b" in parsed_json:
                print("\tBid:", parsed_json["b"])
            if "bsz" in parsed_json:
                print("\tBid Size:", parsed_json["bsz"])
            if "bex" in parsed_json:
                print("\tBid Exchange:", parsed_json["bex"])
            if "a" in parsed_json:
                print("\tAsk:", parsed_json["a"])
            if "asz" in parsed_json:
                print("\tAsk Size:", parsed_json["asz"])
            if "aex" in parsed_json:
                print("\tAsk Exchange:", parsed_json["aex"])
        elif parsed_json["type"] == "t":
            print("Parsed Trade:")
            print("\tSymbol:", parsed_json["s"])
            print("\tTime:", parsed_json["tm"])
            if "so" in parsed_json:
                print("\tSource:", parsed_json["so"])
            if "f" in parsed_json:
                print("\tFlag:", parsed_json["f"])
            if "co" in parsed_json:
                print("\tCondition:", parsed_json["co"])
            if "l" in parsed_json:
                print("\tLast Price:", parsed_json["l"])
            if "sz" in parsed_json:
                print("\tLast Size:", parsed_json["sz"])
            if "ex" in parsed_json:
                print("\tLast Exchange:", parsed_json["ex"])

    except Exception as e:
        print("An error occurred while parsing the JSON string:", e, chunk)


using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using System.Net.Http;
using System.Text;

namespace HttpChunkedReader
{
    using System;
    using System.Linq;
    using System.Net.Http;
    using System.Text;
    using System.Threading.Tasks;

    namespace ChunkedStreamReader
    {
        class Program
        {
            static void Main(string[] args)
            {
                MainAsync().GetAwaiter().GetResult();
            }
            static void PrintMessage(string message)
            {
                dynamic json = JObject.Parse(message);
                if (json.type == "q")
                {

                    Console.WriteLine("Message type: Quote");
                    Console.WriteLine("\tInstrument symbol: " + json.s);
                    Console.WriteLine("\tTime: " + json.tm);
                    if (json["so"] != null) Console.WriteLine("\tSource data feed: " + json.so);
                    if (json["f"] != null) Console.WriteLine("\tQuote flags: " + json.f);
                    if (json["co"] != null) Console.WriteLine("\tQuote condition: " + json.co);
                    if (json["b"] != null) Console.WriteLine("\tBid price: " + json.b);
                    if (json["bsz"] != null) Console.WriteLine("\tBid size: " + json.bsz);
                    if (json["bex"] != null) Console.WriteLine("\tBid exchange: " + json.bex);
                    if (json["a"] != null) Console.WriteLine("\tAsk price: " + json.a);
                    if (json["asz"] != null) Console.WriteLine("\tAsk size: " + json.asz);
                    if (json["aex"] != null) Console.WriteLine("\tAsk exchange: " + json.aex);
                }
                else if (json.type == "t")
                {
                    Console.WriteLine("Message type: Trade");
                    Console.WriteLine("\tInstrument symbol: " + json.s);
                    Console.WriteLine("\tTime: " + json.tm);
                    if (json["so"] != null) Console.WriteLine("\tSource data feed: " + json.so);
                    if (json["f"] != null) Console.WriteLine("\tTrade flags: " + json.f);
                    if (json["co"] != null) Console.WriteLine("\tTrade conditions: " + string.Join(", ", json.co));
                    if (json["l"] != null) Console.WriteLine("\tLast price: " + json.l);
                    if (json["sz"] != null) Console.WriteLine("\tLast size: " + json.sz);
                    if (json["ex"] != null) Console.WriteLine("\tLast exchange: " + json.ex);
                }
            }

            // This is the MainAsync method that starts the program.
            static async Task MainAsync()
            {
                // Create an instance of HttpClient.
                var client = new HttpClient();
                // Streaming connections require header "Connection" "Keep-Alive".
                client.DefaultRequestHeaders.Add("Connection", "Keep-Alive");

                var baseUrl = "https://api.activetick.com/stream.json";
                var queryParams = new Dictionary<string, string>
                {
                    { "sessionid", "MY_SESSIONID" },
                    { "symbols", "SPY_S U,AAPL_S U,EUR/USD_CFI,ES_230300_FCU" }
                };

                // Join the query parameters into a query string.
                var queryString = string.Join("&", queryParams.Select(kvp => $"{kvp.Key}={kvp.Value}"));
                var url = $"{baseUrl}?{queryString}";

                var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead);
                var stream = await response.Content.ReadAsStreamAsync();

                var buffer = new byte[4096];
                var incompleteMessage = string.Empty;

                // Read data from the stream continuously.
                while (true)
                {
                    var bytesRead = await stream.ReadAsync(buffer, 0, buffer.Length);
                    // If the stream has no more data to read, break the loop.
                    if (bytesRead == 0)
                        break;

                    var chunk = Encoding.UTF8.GetString(buffer, 0, bytesRead);
                    // Split the chunk into complete JSON messages and any remaining bytes.
                    var result = SplitJSONMessages(incompleteMessage + chunk);

                    // Loop through each complete message and print it.
                    foreach (var message in result.Messages)
                    {
                        if (message.Length > 0)
                            PrintMessage(message);
                    }

                    // Store any remaining bytes for the next read.
                    incompleteMessage = result.RemainingBytes;
                }
            }


            // SplitJSONMessages method takes in a chunk of string as input
            // and returns a tuple of string array and string
            static (string[] Messages, string RemainingBytes) SplitJSONMessages(string chunk)
            {
                var messages = new List<string>();
                var currentMessage = string.Empty;
                var openBrackets = 0;

                // Loop through each character in the chunk
                foreach (var c in chunk)
                {
                    currentMessage += c;
                    if (c == '{')
                        openBrackets++;
                    else if (c == '}')
                        openBrackets--;
                    // If the open brackets counter reaches 0, it means a complete JSON object has been found
                    if (openBrackets == 0)
                    {
                        // Add the complete JSON object to the list of messages
                        messages.Add(currentMessage.Trim());
                        currentMessage = string.Empty;
                    }
                }

                // Return the list of messages as an array and the remaining bytes as a string
                return (messages.ToArray(), currentMessage);
            }

        }
    }
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
X-Available-Requests-Left: 125
Transfer-Encoding: chunked

{
"type":"stream",
"status":"ok",
"symbols":
 [
  {"AAPL_S U":"ok"},
  {"EUR/USD_CFI":"ok"},
  {"ES_230300_FCU":"ok"}
 ]
}
{
 "type":"t",
 "s":"ES_230300_FCU",
 "tm":"1675221040628055503",
 "so":"1",
 "f":"3",
 "co":["0","0","0","0"],
 "l":"4078.75",
 "sz":"1",
 "ex":"C"
}
{
 "type":"q",
 "s":"ES_230300_FCU",
 "tm":"1675221040628055503",
 "so":"1",
 "f":"0",
 "co":"0",
 "b":"4078.75",
 "bsz":"1",
 "bex":"C",
 "a":"4078.75",
 "asz":"1",
 "aex":"C"
}
{
 "type":"q",
 "s":"ES_230300_FCU",
 "tm":"1675221040628055503",
 "asz":"62"
}
Parsed Quote:
    Symbol: EUR/JPY_CFI
    Time: 1675287423986000000
    Source: 80
    Flags: 0
    Quote Condition: 0
    Bid price: 141.74799
    Bid size: 0
    Bid exchange: F
    Ask price: 141.77099
    Ask size: 0
    Ask exchange: F
Parsed Trade:
    Symbol: SPY_S U
    Time: 1675287424651903488
    Source: 22
    Flags: 322
    Conditions: 0,0,12,37
    Last Price: 411.455
    Last Size: 1
    Last Exchange: D
Parsed Trade:
    Symbol: EUR/JPY_CFI
    Time: 1675287425345000000
    Source: 80
    Flags: 3
    Conditions: 0,0,0,0
    Last Price: 141.76100
    Last Size: 0
    Last Exchange: F
Parsed Quote:
    Symbol: EUR/JPY_CFI
    Time: 1675287425345000000
    Bid price: 141.74900
    Ask price: 141.77300
Status code:  200  Available Requests Left:  97
{'type': 'stream', 'status': 'ok', 'symbols': [{'AAPL_S U': 'ok'}, {'EUR/USD_CFI': 'ok'}, {'ES_230300_FCU': 'ok'}]}
{'type': 't', 's': 'EUR/USD_CFI', 'tm': '1675223665731000000', 'so': '80', 'f': '3', 'co': ['0', '0', '0', '0'], 'l': '1.08622', 'sz': '0', 'ex': 'F'}
Parsed Trade:
        Symbol: EUR/USD_CFI
        Time: 1675223665731000000
        Source: 80
        Flag: 3
        Condition: ['0', '0', '0', '0']
        Last Price: 1.08622
        Last Size: 0
        Last Exchange: F
{'type': 'q', 's': 'EUR/USD_CFI', 'tm': '1675223665731000000', 'so': '80', 'f': '0', 'co': '0', 'b': '1.08616', 'bsz': '0', 'bex': 'F', 'a': '1.08629', 'asz': '0', 'aex': 'F'}
Parsed Quote:
        Symbol: EUR/USD_CFI
        Time: 1675223665731000000
        Source: 80
        Flag: 0
        Condition: 0
        Bid: 1.08616
        Bid Size: 0
        Bid Exchange: F
        Ask: 1.08629
        Ask Size: 0
        Ask Exchange: F
{'type': 't', 's': 'EUR/USD_CFI', 'tm': '1675223665981000000', 'l': '1.08623'}
Parsed Trade:
        Symbol: EUR/USD_CFI
        Time: 1675223665981000000
        Last Price: 1.08623
{'type': 'q', 's': 'EUR/USD_CFI', 'tm': '1675223665981000000', 'b': '1.08617', 'a': '1.08630'}
Message type: Trade
        Instrument symbol: SPY_S U
        Time: 1675293245861240064
        Source data feed: 22
        Trade flags: 322
        Trade conditions: 0, 0, 12, 37
        Last price: 412.305
        Last size: 1
        Last exchange: D
Message type: Trade
        Instrument symbol: EUR/USD_CFI
        Time: 1675293245975000000
        Source data feed: 80
        Trade flags: 3
        Trade conditions: 0, 0, 0, 0
        Last price: 1.10263
        Last size: 0
        Last exchange: F
Message type: Quote
        Instrument symbol: EUR/USD_CFI
        Time: 1675293245975000000
        Source data feed: 80
        Quote flags: 0
        Quote condition: 0
        Bid price: 1.10254
        Bid size: 0
        Bid exchange: F
        Ask price: 1.10271
        Ask size: 0
        Ask exchange: F

In order to initiate a stream subscription with the MarketFeed API, a client sends a GET or POST request to the provided stream.json endpoint. Along with the request, the client must provide a list of instrument symbols for which they would like to receive market data, the type of stream requested, and any additional relevant parameters. Once the subscription request is validated by the server, it will begin streaming the requested market data events to the client.

When passing multiple symbols in the subscription request, they should be separated by a comma, for example symbols=ABC,EFG,XYZ.

Stream Request Endpoint

https://api.activetick.com/stream.json?sessionid=<sessionid>&symbols=<symbol1,symbol2>&type=<type>&source=<source>

Stream Request Parameters

The following table lists the parameters required to initiate a stream request.

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 initiating a stream subscription, an optional type parameter can be included in the request to specify the type of data stream desired. If the type parameter is not included in the request, the server will default to the quotes_and_trades type stream to include full data stream.

Data Stream Types

Type Description
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 Market depth book stream.
option_greeks Calculated values for options such as implied volatility, Greeks and NPV.

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.

Quote Streams

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 Streams

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.

Aggregate Book Streams

An aggregate book is a consolidated record of buy and sell orders in a financial market, grouped by price level. Each price level in the book reflects the total number of shares or contracts available at that price, aggregating all orders.

Book streams consist of market events managing the book's state, including add, update, and delete operations for each price level.

Book Add Item Event

Book add item event example:

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

The 'Add item' event is triggered to insert new data into an aggregate book, either due to the placement of a new order at a different price level or modifications to current orders.

Book Add Item Event

Name Description
type "aba" (aggregate 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 Item Event

Book change event example:

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

The 'Change Item' event is initiated when updates occur in an aggregate book, such as modifications to order size, price levels, or when orders are added or canceled at the same price level.

Book Change Item Message Event

Name Description
type "abc" (aggregate 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 Item Event

Book delete event example:

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

The 'Delete Item' event is triggered when an existing order is removed from the book due to cancellation or execution, specifically when the last order at a particular price level is removed.

Book Delete Item Message Event

Name Description
type "abd" (aggregate 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":"abdr",
   "s":"CL_230100_FNU",
   "tm":"1665588637646140029",
   "x":"a",
   "f":"0",
   "if":"5",
   "it":"8" 
}

The 'Delete Range' event is triggered when a range of price levels, spanning from a specified starting price level to an ending price level, is removed from the book.

Book Delete Range Message Event

Name Description
type "abdr" (aggregate 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 Event

Book trade event example:

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

Aggregated book trade 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 "abt" (aggregate 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.

Order Book Streams

An order book is a real-time, continuously updated list of buy and sell orders in a market, each listed with its specific details such as price, quantity and order ID. Unlike an aggregate book, an order book displays every individual order, not consolidating orders at the same price level.

Order book stream events are designed to update the book’s state, with additions of new orders, adjustments to existing ones, cancellations, and fills.

Book Add Order Event

Book add order event example:

{
 "type":"oba",
 "s":"AAPL_S U",
 "tm":"1696420901372072120",
 "x":"a",
 "f":"0",
 "q":"100",
 "id":"196391177",
 "p":"176.40",
 "a":"NSDQ"
}

An Add Order event indicates that a new order has been accepted by the exchange and was added to the displayable book. The message includes a day-unique order id used by exchange to track the order.

Add Order Event

Name Description
type "oba" (order 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.
f Flags, reserved for future use.
q Quantity of shares/contracts.
id Order ID, assigned by exchange and unique for each order.
p Order price.
a Attribution source, can be a market maker, exchange, etc.

Book Fill Order Event

Book fill order event example:

{
 "type":"obf",
 "s":"AAPL_S U",
 "tm":"1696420901512321564",
 "f":"1",
 "q":"100",
 "id":"196392825",
 "mid":"5652548",
 "p":"0"
}

Order Fill event is sent whenever an order on the book is executed in whole or in part. It is possible to receive several order fills for the same order id number if that order is executed in several parts. The multiple order fills on the same order are cumulative.

When the number of display quantity for an order reaches zero, the order is dead and should be removed from the book.

It is possible to have an order fill with a different price than original order. In this case, the order price field will contain the price of the fill. These fills may be marked as non-printable. If the order fill is marked as non-printed, it means that the quantity will be included into a later bulk print (e.g., in the case of cross executions).

Fill Order Event

Name Description
type "obf" (order book fill)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
f Flags, reserved for future use.
q Quantity of shares/contracts filled.
id Order ID, assigned by exchange and unique for each order.
mid Match ID, assigned by exchange, and can be referenced in Order Break event.
p Price at which the order is filled. If not set, the fill is at the same price as the original order.

Fill Flags

Name Value Description
IsPrintable 0x1 Indicates that quantity is printable, and should be included in time&sales calculations.
IsNonDisplayableOrder 0x2 Indicates that original order was a non-displayable order.
OpeningCross 0x4 Indicates that the fill is an opening cross-trade event.
ClosingCross 0x8 Indicates that the fill is a closing cross-trade event.
HaltCross 0x10 Indicates that the fill is a halting cross-trade event.

Book Cancel Order Event

Book cancel order event example:

{
 "type":"obc",
 "s":"AAPL_S U",
 "tm":"1696420901377281798",
 "f":"0",
 "id":"196389645"
}

Cancel Order is sent whenever an order on the book is modified as a result of a partial cancellation.

Cancel Order Event

Name Description
type "obc" (order book cancel)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
f Flags, reserved for future use.
id Order ID, assigned by exchange and unique for each order.

Book Delete Order Event

Book delete order event example:

{
 "type":"obd",
 "s":"AAPL_S U",
 "tm":"1696420901377281798",
 "f":"0",
 "id":"196389645"
}

Delete Order is sent whenever an order on the book is being cancelled. All remaining quantity is no longer accessible so the order must be removed from the book.

Delete Order Event

Name Description
type "obd" (order book delete)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
f Flags, reserved for future use.
id Order ID, assigned by exchange and unique for each order.

Book Replace Order Event

Book replace order event example:

{
 "type":"obr",
 "s":"AAPL_S U",
 "tm":"1696420901512793085",
 "f":"0",
 "oid":"196393973",
 "nid":"196394037",
 "nq":"100",
 "np":"176.36"
}

Order Replace is sent whenever an order on the book has been cancel-replaced. All remaining quantity from the original order are no longer accessible, and must be removed. The new order details are provided for the replacement, along with a new order id which will be used henceforth.

Replace Order Event

Name Description
type "obr" (order book replace)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
f Flags, reserved for future use.
oid Original Order ID, assigned by exchange and unique for each order.
nid New Order ID.
nq New quantity.
np New price.

Book Break Order Event

Book break order event example:

{
 "type":"obb",
 "s":"AAPL_S U",
 "tm":"1696420901377281798",
 "f":"0",
 "mid":"196389645"
}

The Broken Trade event is sent whenever a fill on is broken. A fill may be broken if it is found to be “clearly erroneous”. A trade break is final, once a trade is broken, it cannot be reinstated.

Break Order Event

Name Description
type "obb" (order book break)
s Instrument symbol.
tm Time of event in UTC epoch nanoseconds.
f Flags, reserved for future use.
mid Match ID, assigned by exchange for each order fill.

Option Greeks Streams

Option Greeks are updates that are periodically calculated by the server and sent to subscribed clients who have requested the "option_greeks" stream. The updates contain option theoretical net present value (NPV), implied volatility, and various Greeks like delta, gamma, theta, vega, and rho. These values are recalculated whenever there's a change in the underlying pricing or a change in the pricing of the option contract.

Option greeks event example:

{
 "type":"og",
 "s":"AAPL_230915C16000C_O U",
 "npv":"14.4204",
 "delta":"0.548258",
 "gamma":"0.011089",
 "rho":"0.351251",
 "vega":"0.436656",
 "iv":"0.323233"
}

Option greeks update is sent whenever a new calculation is made by the server based on underlying and option contract pricing changes.

Option Greeks Event

Name Description
type "og" (option greeks)
s Option contract symbol.
npv Net Present Value (NPV).
delta Delta greek value.
gamma Gamma greek value.
rho Rho greek value.
vega Vega greek value.
iv Implied Volatility value.

Heartbeats

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.

Chains

About Chains

Instrument chains are a way to retrieve a list of financial instruments that are linked to a specific key, such as a stock symbol. The data returned from the instrument chain request is similar to a snapshot request, and includes rows of instruments linked to the specified key, along with the requested data columns.

For example, when a user inputs a stock symbol as the key, the instrument chain will return a list of all option contracts that are linked to that stock. The resulting data includes information such as strike prices, expiration dates, and open interest. This information can be useful for options traders who need to access a comprehensive view of all the option contracts related to a specific underlying asset.

ActiveTick MarketFeed API supports various types of chains, including:

Chain Type Description
Equity Options A list of options contracts linked to an underlying equity security.
Futures A list of futures contracts linked to a specific underlying commodity or financial instrument.
Future Options A list of options contracts that are based on a futures contract.
Future Option Spreads A list of option spreads that are based on a futures contract.
Future Mixed Spreads A list of mixed spreads that are based on a futures contract.
Future Spreads A list of spreads that are based on a futures contract.
Future Spread Legs A list of legs that make up a spread based on a futures contract.

Option chain request example:

curl -i -X POST https://api.activetick.com/chain.json \
 -i -d 'sessionid=MY_SESSIONID&key=JNJ_S U&chaintype=equity_options&columns=pc,l,b,a,bsz,asz,vol,ltm&begin_maturity_time=2023-02-01T00:00:00&end_maturity_time=2023-02-10T00:00:00&ignore_empty=true'

// Define session ID, symbols, chain type and columns
 const sessionId = "MY_SESSIONID";
 const key = "JNJ_S U";
 const chainType = "equity_options";
 const columns = "pc,l,b,a,bsz,asz,v,ltm";
 const beginMaturityTime = "2023-02-01T00:00:00";
 const endMaturityTime = "2023-02-10T00:00:00";
 const ignoreEmpty = "true";

 // Define chain API endpoint URL
 const url = "https://api.activetick.com/chain.json";

 // Make a POST request to chain API endpoint
 $.ajax({
     type: "POST",
     url: url,
     data: {
         sessionid: sessionId,
         key: key,
         chaintype: chainType,
         columns: columns,
         begin_maturity_time: beginMaturityTime,
         end_maturity_time: endMaturityTime,
         ignore_empty: ignoreEmpty
     },
     success: function (response) {
         console.log(response);
         // Iterate through response rows
         response.rows.forEach(function (row) {
             console.log("Symbol: " + row.s);
             console.log(" Status: " + row.st);
             // Iterate through data in each row
             row.data.forEach(function (data) {
                 if (data.c === 'pc')
                     console.log("\tPrevious Close: " + data.v);
                 else if (data.c === 'l')
                     console.log("\tLast Trade Price: " + data.v);
                 else if (data.c === 'b')
                     console.log("\tBid Price: " + data.v);
                 else if (data.c === 'a')
                     console.log("\tAsk Price: " + data.v);
                 else if (data.c === 'bsz')
                     console.log("\tBid Size: " + data.v);
                 else if (data.c === 'asz')
                     console.log("\tAsk Size: " + data.v);
                 else if (data.c === 'v')
                     console.log("\tVolume: " + data.v);
                 else if (data.c === 'ltm')
                     console.log("\tLast Trade Time: " + data.v);
             });
         });
     },
     error: function (error) {
         console.log(error);
     },
 });

import requests

# Define session ID, symbols and columns
session_id = "MY_SESSIONID"
key = "JNJ_S U"
chaintype = "equity_options"
columns = "pc,l,b,a,bsz,asz,vol,ltm"
begin_maturity_time = "2023-02-01T00:00:00"
end_maturity_time = "2023-02-10T00:00:00"
ignore_empty = "true"

# Define snapshot API endpoint URL
url = "https://api.activetick.com/chain.json"

payload = {
    "sessionid": session_id,
    "key": key,
    "chaintype": chaintype,
    "columns": columns,
    "begin_maturity_time": begin_maturity_time,
    "end_maturity_time": end_maturity_time,
    "ignore_empty": ignore_empty
}
# Make a GET request to snapshot API endpoint
response = requests.post(url, data=payload)

# Check if request was successful
if response.status_code == 200:
    # Parse response json
    data = response.json()
    # Iterate through response rows
    rows = data.get("rows")

for row in rows:
    symbol = row.get("s")
    status = row.get("st")
    print("Symbol:", symbol)
    print("Status:", status)
    data_list = row.get("data")
    # Iterate through data in each row
    for data_item in data_list:
        col = data_item.get("c")
        val = data_item.get("v")
        if col == "pc":
            print("\tPrevious Close:", val)
        elif col == "l":
            print("\tLast Trade Price:", val)
        elif col == "b":
            print("\tBid Price:", val)
        elif col == "a":
            print("\tAsk Price:", val)
        elif col == "bsz":
            print("\tBid Size:", val)
        elif col == "asz":
            print("\tAsk Size:", val)
        elif col == "v":
            print("\tVolume:", val)
        elif col == "ltm":
            print("\tLast Trade Time:", val)
        else:
            print("Request failed with status code:", response.status_code)
using System;
using System.Net;
using Newtonsoft.Json;

namespace ChainRequest
{
    class Program
    {
        static void Main(string[] args)
        {
            // Define session ID
            string sessionId = "MY_SESSIONID";

            // Define request parameters
            string key = "JNJ_S U";
            string chainType = "equity_options";
            string columns = "pc,l,b,a,bsz,asz,vol,ltm";
            string beginMaturityTime = "2023-02-01T00:00:00";
            string endMaturityTime = "2023-02-10T00:00:00";
            string ignoreEmpty = "true";

            // Define request URL
            string requestUrl = $"https://api.activetick.com/chain.json?sessionid={sessionId}&key={key}&chaintype={chainType}&columns={columns}&begin_maturity_time={beginMaturityTime}&end_maturity_time={endMaturityTime}&ignore_empty={ignoreEmpty}";

            // Send request to API and get response
            using (WebClient client = new WebClient())
            {
                // Get response as string
                string response = client.DownloadString(requestUrl);

                // Parse response as JSON
                dynamic data = JsonConvert.DeserializeObject(response);

                // Access data in JSON
                Console.WriteLine("Type: " + data.type);
                Console.WriteLine("Status: " + data.status);
                Console.WriteLine("Key: " + data.key);

                foreach (var row in data.rows)
                {
                    Console.WriteLine("\nSymbol: " + row.s);
                    Console.WriteLine("Status: " + row.st);

                    foreach (var item in row.data)
                    {
                        if (item.c == "pc")
                            Console.WriteLine("\tPrevious Close: " + item.v);
                        else if (item.c == "l")
                            Console.WriteLine("\tLast Trade Price: " + item.v);
                        else if (item.c == "b")
                            Console.WriteLine("\tBid Price: " + item.v);
                        else if (item.c == "a")
                            Console.WriteLine("\tAsk Price: " + item.v);
                        else if (item.c == "bsz")
                            Console.WriteLine("\tBid Size: " + item.v);
                        else if (item.c == "asz")
                            Console.WriteLine("\tAsk Size: " + item.v);
                        else if (item.c == "vol")
                            Console.WriteLine("\tVolume: " + item.v);
                        else if (item.c == "ltm")
                            Console.WriteLine("\tLast Trade Time: " + item.v);
                    }
                }
            }
            Console.ReadLine();
        }
    }
}

Reponse example:

HTTP/1.1 200 OK
Content-Type: application/json
X-Available-Requests-Left: 196
Content-Length: 69203

{
"type":"chain",
"status":"ok",
"key":"JNJ_S U",
"rows":[
    {"s":"JNJ_230203C10000C_O U","st":"ok","data":[
        {"c":"pc","s":"ok","v":"0"},
        {"c":"l","s":"ok","v":"0"},
        {"c":"b","s":"ok","v":"64.50"},
        {"c":"a","s":"ok","v":"65.40"},
        {"c":"bsz","s":"ok","v":"37"},
        {"c":"asz","s":"ok","v":"36"},
        {"c":"ltm","s":"ok","v":"0000-00-00T00:00:00.000000000"}
        ]
    },
    {"s":"JNJ_230203C10500C_O U","st":"ok","data":[
        {"c":"pc","s":"ok","v":"0"},
        {"c":"l","s":"ok","v":"0"},
        {"c":"b","s":"ok","v":"59.50"},
        {"c":"a","s":"ok","v":"60.30"},
        {"c":"bsz","s":"ok","v":"36"},
        {"c":"asz","s":"ok","v":"39"},
        {"c":"ltm","s":"ok","v":"0000-00-00T00:00:00.000000000"}
        ]
    },
    {"s":"JNJ_230203C11000C_O U","st":"ok","data":[
        {"c":"pc","s":"ok","v":"58.75"},
        {"c":"l","s":"ok","v":"58.75"},
        {"c":"b","s":"ok","v":"54.50"},
        {"c":"a","s":"ok","v":"55.30"},
        {"c":"bsz","s":"ok","v":"37"},
        {"c":"asz","s":"ok","v":"18"},
        {"c":"ltm","s":"ok","v":"2023-01-27T19:56:00.848242944"}
        ]
    },
    {"s":"JNJ_230203C11500C_O U","st":"ok","data":[
        {"c":"pc","s":"ok","v":"0"},
        {"c":"l","s":"ok","v":"0"},
        {"c":"b","s":"ok","v":"49.45"},
        {"c":"a","s":"ok","v":"50.35"},
        {"c":"bsz","s":"ok","v":"39"},
        {"c":"asz","s":"ok","v":"37"},
        {"c":"ltm","s":"ok","v":"0000-00-00T00:00:00.000000000"}
        ]
    },
        ..
    ..
       ]
}
Symbol: JNJ_230203C10000C_O U
    Status: ok
    Previous Close: 0
    Last Trade Price: 0
    Bid Price: 64.50
    Ask Price: 65.40
    Bid Size: 37
    Ask Size: 36
    Volume: 0
    Last Trade Time: 0000-00-00T00:00:00.000000000
Symbol: JNJ_230203C10500C_O U
    Status: ok
    Previous Close: 0
    Last Trade Price: 0
    Bid Price: 59.50
    Ask Price: 60.30
    Bid Size: 36
    Ask Size: 39
    Volume: 0
    Last Trade Time: 0000-00-00T00:00:00.000000000
Symbol: JNJ_230203C11000C_O U
    Status: ok
    Previous Close: 58.75
    Last Trade Price: 58.75
    Bid Price: 54.50
    Ask Price: 55.30
    Bid Size: 37
    Ask Size: 18
    Volume: 0
    Last Trade Time: 2023-01-27T19:56:00.848242944
Symbol: JNJ_230203C11500C_O U
    Status: ok
    Previous Close: 0
    Last Trade Price: 0
    Bid Price: 49.45
    Ask Price: 50.35
    Bid Size: 39
    Ask Size: 37
    Volume: 0
    Last Trade Time: 0000-00-00T00:00:00.000000000
Symbol: JNJ_230203C10000C_O U
Status: ok
        Previous Close: 0
        Last Trade Price: 0
        Bid Price: 64.50
        Ask Price: 65.40
        Bid Size: 37
        Ask Size: 36
        Last Trade Time: 0000-00-00T00:00:00.000000000
Symbol: JNJ_230203C10500C_O U
Status: ok
        Previous Close: 0
        Last Trade Price: 0
        Bid Price: 59.50
        Ask Price: 60.30
        Bid Size: 36
        Ask Size: 39
        Last Trade Time: 0000-00-00T00:00:00.000000000
Symbol: JNJ_230203C11000C_O U
Status: ok
        Previous Close: 58.75
        Last Trade Price: 58.75
        Bid Price: 54.50
        Ask Price: 55.30
        Bid Size: 37
        Ask Size: 18
        Last Trade Time: 2023-01-27T19:56:00.848242944
Symbol: JNJ_230203C11500C_O U
Status: ok
        Previous Close: 0
        Last Trade Price: 0
        Bid Price: 49.45
        Ask Price: 50.35
        Bid Size: 39
        Ask Size: 37
        Last Trade Time: 0000-00-00T00:00:00.000000000
Symbol: JNJ_230203C10000C_O U
Status: ok
        Previous Close: 0
        Last Trade Price: 0
        Bid Price: 64.50
        Ask Price: 65.40
        Bid Size: 37
        Ask Size: 36
        Last Trade Time: 0000-00-00T00:00:00.000000000
Symbol: JNJ_230203C10500C_O U
Status: ok
        Previous Close: 0
        Last Trade Price: 0
        Bid Price: 59.50
        Ask Price: 60.30
        Bid Size: 36
        Ask Size: 39
        Last Trade Time: 0000-00-00T00:00:00.000000000
Symbol: JNJ_230203C11000C_O U
Status: ok
        Previous Close: 58.75
        Last Trade Price: 58.75
        Bid Price: 54.50
        Ask Price: 55.30
        Bid Size: 37
        Ask Size: 18
        Last Trade Time: 2023-01-27T19:56:00.848242944
Symbol: JNJ_230203C11500C_O U
Status: ok
        Previous Close: 0
        Last Trade Price: 0
        Bid Price: 49.45
        Ask Price: 50.35
        Bid Size: 39
        Ask Size: 37
        Last Trade Time: 0000-00-00T00:00:00.000000000

Chain Request Endpoint

https://api.activetick.com/chain.json?sessionid=<sessionid>&key=<key>&chaintype=<chaintype>&columns=<column1,column2>&begin_maturity_time=<begin_maturity_time>&end_maturity_time=<end_maturity_time>&ignore_empty=<ignore_empty>

Chain Request Parameters

The Chain Request Parameters are used to specify the details of a request to retrieve a list of instruments linked to a certain key. The parameters include:

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

The different types of chain requests that can be made through the MarketFeed API have specific key formats that must be used in order to retrieve the desired data. These chain types and their corresponding key formats are listed in the table below:

Chain Type Key Format Example
equity_options Standard Stock "AAPL_S U" - Apple Inc Stock
futures A_FUT_BC "ES_FUT_CU" - CME S&P500 eMini, "GC_FUT_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

In this table, "A" stands for the future group name, such as "ES"; "B" stands for the future exchange code; and "C" stands for the future country code. These key formats must be used in order to properly format the key parameter when making a chain request.

Data Columns: Intraday Pricing | Calculated Data | Option Greeks

Chain Response

The chain response is similar to the Snapshot response in the way that data is returned. The response includes the following fields:

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. The following table describes the fields in the data row:

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.

For each data value, the following table describes the fields in the data array:

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

Market Depth

About Market Depth

Market depth order books provide an electronic list of buy and sell orders for a financial instrument sorted by price level. This type of data provides a real-time view of the market's supply and demand. An order book displays the number of shares or contracts being bid and offered at each price point, or market depth. It also identifies the participants behind buy and sell orders.

MarketFeed offers a book snapshot feature that provides dynamically updated list of current orders using the book_snapshot endpoint. This allows for easy access to real-time order book data, allowing traders and investors to make informed decisions based on the current market conditions.

Depending on the type of order book data feed, the dataset offered can be either aggregated or full order book. With an aggregated order book, all orders at the same price level are grouped together into a single line. This can be useful for quickly identifying the overall market sentiment at a specific price point. On the other hand, a full order book shows all orders individually within each price level. This type of data feed is useful for more advanced traders who want to see all orders in the market and make decisions accordingly.

Aggregate books use an index to track changes at specific price levels, whereas order books employ an orderId identifier for each entry for tracking and modification of individual orders. Snapshot book responses from the book_snapshot endpoint include a book_type identifier, specifying whether the snapshot is for an aggregate or order book.

Market book depth request example:

curl -i -X GET 'https://api.activetick.com/book_snapshot.json?sessionid=MY_SESSIONID&symbol=ES_230300_FCU&source=cme'
$.ajax({
  type: "GET",
  url: "https://api.activetick.com/book_snapshot.json",
  data: {
    sessionid: "MY_SESSIONID",
    symbol: "ES_230300_FCU",
    source: "cme"
  },
  success: function(data) {
   var book = data.book;
    for (var i = 0; i < book.length; i++) {
      console.log("Side: " + book[i].x + " | Index: " + book[i].i + " | Flags: " + book[i].f + " | Attribution: " + book[i].a + " | Price: " + book[i].p + " | Quantity: " + book[i].q + " | Orders: " + book[i].o + " | Timestamp: " + book[i].tm);
    }

  }
});
import requests

url = "https://api.activetick.com/book_snapshot.json"
params = {
    "sessionid": "MY_SESSIONID",
    "symbol": "ES_230300_FCU",
    "source": "cme"
}

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

if response.status_code == 200:
    data = response.json()
    book = data["book"]
    for i in range(len(book)):
        entry = book[i]
        print(f"Side: {entry['x']} | Index: {entry['i']} | Flags: {entry['f']} | Attribution: {entry['a']} | Price: {entry['p']} | Quantity: {entry['q']} | Orders: {entry['o']} | Timestamp: {entry['tm']}")
else:
    print(f"Request failed with status code {response.status_code}")

using System;
using System.Collections.Generic;
using System.Net.Http;
using Newtonsoft.Json;

namespace BookSnapshotExample
{
    class Program
    {
        static void Main(string[] args)
        {
            var url = "https://api.activetick.com/book_snapshot.json";
            var client = new HttpClient();

            var data = new FormUrlEncodedContent(new[]
            {
                new KeyValuePair<string, string>("sessionid", "MY_SESSIONID"),
                new KeyValuePair<string, string>("symbol", "ES_230300_FCU"),
                new KeyValuePair<string, string>("source", "cme"),
            });

            var response = client.PostAsync(url, data).Result;
            var content = response.Content.ReadAsStringAsync().Result;
            var bookData = JsonConvert.DeserializeObject<BookData>(content);

            foreach (var book in bookData.book)
            {
                Console.WriteLine("Side: " + book.x + " | Index: " + book.i + " | Flags: " + book.f + " | Attribution: " + book.a + " | Price: " + book.p + " | Quantity: " + book.q + " | Orders: " + book.o + " | Timestamp: " + book.tm);
            }

            Console.ReadLine();
        }
    }

    class BookData
    {
        public Book[] book { get; set; }
    }

    class Book
    {
        public string x { get; set; }
        public int i { get; set; }
        public int f { get; set; }
        public string a { get; set; }
        public double p { get; set; }
        public int q { get; set; }
        public int o { get; set; }
        public string tm { get; set; }
    }
}

Response example:

HTTP/1.1 200 OK
Content-Type: application/json
X-Available-Requests-Left: 199
Content-Length: 2266

{
"type":"book_snapshot",
"status":"ok",
"symbol":"ES_230300_FCU",
"book":[
    {"x":"b","i":"0","f":"0","a":"XCME","p":"4141.25","q":"24","o":"18","tm":"2023-02-02T01:45:21.874914519"},
    {"x":"b","i":"1","f":"0","a":"XCME","p":"4141.00","q":"34","o":"21","tm":"2023-02-02T01:45:24.057874407"},
    {"x":"b","i":"2","f":"0","a":"XCME","p":"4140.75","q":"42","o":"25","tm":"2023-02-02T01:45:17.142894949"},
    {"x":"b","i":"3","f":"0","a":"XCME","p":"4140.50","q":"37","o":"23","tm":"2023-02-02T01:45:24.304621879"},
    {"x":"b","i":"4","f":"0","a":"XCME","p":"4140.25","q":"42","o":"26","tm":"2023-02-02T01:45:16.052969791"},
    {"x":"b","i":"5","f":"0","a":"XCME","p":"4140.00","q":"45","o":"26","tm":"2023-02-02T01:45:23.994018383"},
    {"x":"b","i":"6","f":"0","a":"XCME","p":"4139.75","q":"41","o":"24","tm":"2023-02-02T01:45:16.178535797"},
    {"x":"b","i":"7","f":"0","a":"XCME","p":"4139.50","q":"54","o":"28","tm":"2023-02-02T01:45:05.988063791"},
    {"x":"b","i":"8","f":"0","a":"XCME","p":"4139.25","q":"43","o":"25","tm":"2023-02-02T01:45:16.999320993"},
    {"x":"b","i":"9","f":"0","a":"XCME","p":"4139.00","q":"64","o":"26","tm":"2023-02-02T01:45:24.282089917"},
    {"x":"a","i":"0","f":"0","a":"XCME","p":"4141.75","q":"24","o":"17","tm":"2023-02-02T01:45:24.282475555"},
    {"x":"a","i":"1","f":"0","a":"XCME","p":"4142.00","q":"30","o":"16","tm":"2023-02-02T01:45:23.989095319"},
    {"x":"a","i":"2","f":"0","a":"XCME","p":"4142.25","q":"40","o":"23","tm":"2023-02-02T01:45:21.874548729"},
    {"x":"a","i":"3","f":"0","a":"XCME","p":"4142.50","q":"45","o":"26","tm":"2023-02-02T01:45:24.343821385"},
    {"x":"a","i":"4","f":"0","a":"XCME","p":"4142.75","q":"45","o":"23","tm":"2023-02-02T01:45:17.122785059"},
    {"x":"a","i":"5","f":"0","a":"XCME","p":"4143.00","q":"45","o":"24","tm":"2023-02-02T01:45:14.304474009"},
    {"x":"a","i":"6","f":"0","a":"XCME","p":"4143.25","q":"66","o":"28","tm":"2023-02-02T01:45:24.055875767"},
    {"x":"a","i":"7","f":"0","a":"XCME","p":"4143.50","q":"47","o":"24","tm":"2023-02-02T01:45:23.989876031"},
    {"x":"a","i":"8","f":"0","a":"XCME","p":"4143.75","q":"52","o":"30","tm":"2023-02-02T01:45:13.707155425"},
    {"x":"a","i":"9","f":"0","a":"XCME","p":"4144.00","q":"57","o":"37","tm":"2023-02-02T01:45:24.057464905"}
  ]
}

Side: b | Index: 0 | Flags: 0 | Attribution: XCME | Price: 4141.50 | Quantity: 7 | Orders: 6 | Timestamp: 2023-02-02T01:51:29.020970333
Side: b | Index: 1 | Flags: 0 | Attribution: XCME | Price: 4141.25 | Quantity: 42 | Orders: 24 | Timestamp: 2023-02-02T01:51:27.064616129
Side: b | Index: 2 | Flags: 0 | Attribution: XCME | Price: 4141.00 | Quantity: 35 | Orders: 22 | Timestamp: 2023-02-02T01:51:15.437831955
Side: b | Index: 3 | Flags: 0 | Attribution: XCME | Price: 4140.75 | Quantity: 43 | Orders: 24 | Timestamp: 2023-02-02T01:51:28.157888911
Side: b | Index: 4 | Flags: 0 | Attribution: XCME | Price: 4140.50 | Quantity: 37 | Orders: 22 | Timestamp: 2023-02-02T01:51:29.012420939
Side: b | Index: 5 | Flags: 0 | Attribution: XCME | Price: 4140.25 | Quantity: 42 | Orders: 26 | Timestamp: 2023-02-02T01:51:12.904874553
Side: b | Index: 6 | Flags: 0 | Attribution: XCME | Price: 4140.00 | Quantity: 46 | Orders: 27 | Timestamp: 2023-02-02T01:51:21.642161359
Side: b | Index: 7 | Flags: 0 | Attribution: XCME | Price: 4139.75 | Quantity: 46 | Orders: 27 | Timestamp: 2023-02-02T01:51:13.153872509
Side: b | Index: 8 | Flags: 0 | Attribution: XCME | Price: 4139.50 | Quantity: 50 | Orders: 28 | Timestamp: 2023-02-02T01:50:44.661083207
Side: b | Index: 9 | Flags: 0 | Attribution: XCME | Price: 4139.25 | Quantity: 40 | Orders: 24 | Timestamp: 2023-02-02T01:51:12.858617651
Side: a | Index: 0 | Flags: 0 | Attribution: XCME | Price: 4141.75 | Quantity: 20 | Orders: 15 | Timestamp: 2023-02-02T01:51:29.020846871
Side: a | Index: 1 | Flags: 0 | Attribution: XCME | Price: 4142.00 | Quantity: 36 | Orders: 24 | Timestamp: 2023-02-02T01:51:15.923227705
Side: a | Index: 2 | Flags: 0 | Attribution: XCME | Price: 4142.25 | Quantity: 62 | Orders: 25 | Timestamp: 2023-02-02T01:51:12.845347455
Side: a | Index: 3 | Flags: 0 | Attribution: XCME | Price: 4142.50 | Quantity: 46 | Orders: 27 | Timestamp: 2023-02-02T01:51:15.437616599
Side: a | Index: 4 | Flags: 0 | Attribution: XCME | Price: 4142.75 | Quantity: 49 | Orders: 26 | Timestamp: 2023-02-02T01:51:15.257865493
Side: a | Index: 5 | Flags: 0 | Attribution: XCME | Price: 4143.00 | Quantity: 48 | Orders: 25 | Timestamp: 2023-02-02T01:51:20.909557481
Side: a | Index: 6 | Flags: 0 | Attribution: XCME | Price: 4143.25 | Quantity: 69 | Orders: 29 | Timestamp: 2023-02-02T01:51:15.257865493
Side: a | Index: 7 | Flags: 0 | Attribution: XCME | Price: 4143.50 | Quantity: 49 | Orders: 27 | Timestamp: 2023-02-02T01:50:44.494568851
Side: a | Index: 8 | Flags: 0 | Attribution: XCME | Price: 4143.75 | Quantity: 52 | Orders: 30 | Timestamp: 2023-02-02T01:51:12.846041043
Side: a | Index: 9 | Flags: 0 | Attribution: XCME | Price: 4144.00 | Quantity: 65 | Orders: 36 | Timestamp: 2023-02-02T01:51:21.801529049
Side: b | Index: 0 | Flags: 0 | Attribution: XCME | Price: 4141.50 | Quantity: 24 | Orders: 16 | Timestamp: 2023-02-02T01:53:32.830651617
Side: b | Index: 1 | Flags: 0 | Attribution: XCME | Price: 4141.25 | Quantity: 40 | Orders: 21 | Timestamp: 2023-02-02T01:53:32.104033449
Side: b | Index: 2 | Flags: 0 | Attribution: XCME | Price: 4141.00 | Quantity: 40 | Orders: 26 | Timestamp: 2023-02-02T01:53:32.097609119
Side: b | Index: 3 | Flags: 0 | Attribution: XCME | Price: 4140.75 | Quantity: 40 | Orders: 21 | Timestamp: 2023-02-02T01:53:32.097301529
Side: b | Index: 4 | Flags: 0 | Attribution: XCME | Price: 4140.50 | Quantity: 34 | Orders: 20 | Timestamp: 2023-02-02T01:53:32.344640123
Side: b | Index: 5 | Flags: 0 | Attribution: XCME | Price: 4140.25 | Quantity: 41 | Orders: 25 | Timestamp: 2023-02-02T01:53:19.396872477
Side: b | Index: 6 | Flags: 0 | Attribution: XCME | Price: 4140.00 | Quantity: 48 | Orders: 28 | Timestamp: 2023-02-02T01:53:32.593631151
Side: b | Index: 7 | Flags: 0 | Attribution: XCME | Price: 4139.75 | Quantity: 42 | Orders: 26 | Timestamp: 2023-02-02T01:53:32.324304603
Side: b | Index: 8 | Flags: 0 | Attribution: XCME | Price: 4139.50 | Quantity: 56 | Orders: 30 | Timestamp: 2023-02-02T01:53:32.100091469
Side: b | Index: 9 | Flags: 0 | Attribution: XCME | Price: 4139.25 | Quantity: 42 | Orders: 24 | Timestamp: 2023-02-02T01:53:19.466958831
Side: a | Index: 0 | Flags: 0 | Attribution: XCME | Price: 4141.75 | Quantity: 17 | Orders: 8 | Timestamp: 2023-02-02T01:53:32.795144711
Side: a | Index: 1 | Flags: 0 | Attribution: XCME | Price: 4142.00 | Quantity: 23 | Orders: 18 | Timestamp: 2023-02-02T01:53:32.786458619
Side: a | Index: 2 | Flags: 0 | Attribution: XCME | Price: 4142.25 | Quantity: 56 | Orders: 21 | Timestamp: 2023-02-02T01:53:26.822773013
Side: a | Index: 3 | Flags: 0 | Attribution: XCME | Price: 4142.50 | Quantity: 49 | Orders: 29 | Timestamp: 2023-02-02T01:53:32.097367857
Side: a | Index: 4 | Flags: 0 | Attribution: XCME | Price: 4142.75 | Quantity: 48 | Orders: 26 | Timestamp: 2023-02-02T01:53:32.097634935
Side: a | Index: 5 | Flags: 0 | Attribution: XCME | Price: 4143.00 | Quantity: 46 | Orders: 25 | Timestamp: 2023-02-02T01:53:32.097293157
Side: a | Index: 6 | Flags: 0 | Attribution: XCME | Price: 4143.25 | Quantity: 65 | Orders: 29 | Timestamp: 2023-02-02T01:53:32.097367857
Side: a | Index: 7 | Flags: 0 | Attribution: XCME | Price: 4143.50 | Quantity: 50 | Orders: 28 | Timestamp: 2023-02-02T01:53:10.217245099
Side: a | Index: 8 | Flags: 0 | Attribution: XCME | Price: 4143.75 | Quantity: 50 | Orders: 30 | Timestamp: 2023-02-02T01:53:19.364823713
Side: a | Index: 9 | Flags: 0 | Attribution: XCME | Price: 4144.00 | Quantity: 64 | Orders: 35 | Timestamp: 2023-02-02T01:53:32.100913883
Side: b | Index: 0 | Flags: 0 | Attribution: XCME | Price: 4143.75 | Quantity: 9 | Orders: 6 | Timestamp: 2023-02-02T01:57:12.278805575
Side: b | Index: 1 | Flags: 0 | Attribution: XCME | Price: 4143.5 | Quantity: 34 | Orders: 24 | Timestamp: 2023-02-02T01:57:11.456701373
Side: b | Index: 2 | Flags: 0 | Attribution: XCME | Price: 4143.25 | Quantity: 43 | Orders: 26 | Timestamp: 2023-02-02T01:57:11.001967271
Side: b | Index: 3 | Flags: 0 | Attribution: XCME | Price: 4143 | Quantity: 46 | Orders: 28 | Timestamp: 2023-02-02T01:57:11.001786423
Side: b | Index: 4 | Flags: 0 | Attribution: XCME | Price: 4142.75 | Quantity: 42 | Orders: 23 | Timestamp: 2023-02-02T01:57:12.461248573
Side: b | Index: 5 | Flags: 0 | Attribution: XCME | Price: 4142.5 | Quantity: 48 | Orders: 27 | Timestamp: 2023-02-02T01:57:12.392067201
Side: b | Index: 6 | Flags: 0 | Attribution: XCME | Price: 4142.25 | Quantity: 45 | Orders: 29 | Timestamp: 2023-02-02T01:57:11.456814439
Side: b | Index: 7 | Flags: 0 | Attribution: XCME | Price: 4142 | Quantity: 50 | Orders: 27 | Timestamp: 2023-02-02T01:57:11.177295869
Side: b | Index: 8 | Flags: 0 | Attribution: XCME | Price: 4141.75 | Quantity: 47 | Orders: 29 | Timestamp: 2023-02-02T01:57:11.001795371
Side: b | Index: 9 | Flags: 0 | Attribution: XCME | Price: 4141.5 | Quantity: 46 | Orders: 30 | Timestamp: 2023-02-02T01:57:11.001801923
Side: a | Index: 0 | Flags: 0 | Attribution: XCME | Price: 4144 | Quantity: 41 | Orders: 27 | Timestamp: 2023-02-02T01:57:11.901369871
Side: a | Index: 1 | Flags: 0 | Attribution: XCME | Price: 4144.25 | Quantity: 48 | Orders: 22 | Timestamp: 2023-02-02T01:57:11.001785041
Side: a | Index: 2 | Flags: 0 | Attribution: XCME | Price: 4144.5 | Quantity: 45 | Orders: 23 | Timestamp: 2023-02-02T01:57:05.816396193
Side: a | Index: 3 | Flags: 0 | Attribution: XCME | Price: 4144.75 | Quantity: 44 | Orders: 24 | Timestamp: 2023-02-02T01:57:11.011585879
Side: a | Index: 4 | Flags: 0 | Attribution: XCME | Price: 4145 | Quantity: 55 | Orders: 34 | Timestamp: 2023-02-02T01:57:05.816397759
Side: a | Index: 5 | Flags: 0 | Attribution: XCME | Price: 4145.25 | Quantity: 45 | Orders: 25 | Timestamp: 2023-02-02T01:57:11.001791147
Side: a | Index: 6 | Flags: 0 | Attribution: XCME | Price: 4145.5 | Quantity: 61 | Orders: 30 | Timestamp: 2023-02-02T01:57:11.001829827
Side: a | Index: 7 | Flags: 0 | Attribution: XCME | Price: 4145.75 | Quantity: 60 | Orders: 27 | Timestamp: 2023-02-02T01:57:00.000401043
Side: a | Index: 8 | Flags: 0 | Attribution: XCME | Price: 4146 | Quantity: 59 | Orders: 33 | Timestamp: 2023-02-02T01:57:05.816996675
Side: a | Index: 9 | Flags: 0 | Attribution: XCME | Price: 4146.25 | Quantity: 61 | Orders: 31 | Timestamp: 2023-02-02T01:57:11.001800913

Market Depth Snapshot Request Endpoint

https://api.activetick.com/book_snapshot.json?sessionid=<sessionid>&symbol=<symbol>&source=<source>

Market Depth Snapshot 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"
book_type Indicates type of book. Possible values are "aggregated" and "order".
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.

Aggregated 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 aggregated book item contains information about a price level at specific index..

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.

Order Book Item

{
  "x": "b",
  "f": "0",
  "a": "NSDQ",
  "p": "118.25",
  "q": "100",
  "id": "41231235",
  "tm": "2023-10-05T17:23:48.654594523"
}

Each order book item contains information about a single order.

Name Description
x Market side for the order. Possible values are "b" for bid, and "a" for ask sides.
f Flags. Exchange-specific flags.
a Attribution value. Value can be a market maker, exchange, ETN, etc.
p Price.
q Share/contract quantity.
id OrderId. Unique value assigned by an exchange to track a specific order. Value is guaranteed to be unique for current session.
tm Timestamp of last update. The value is formatted in YYYY-MM-DDTHH:MM:SS.nnnnnnnnnn format.

Market Performers

About Market Performers

MarketFeed servers constantly monitor real-time data feeds from major exchanges to calculate and update lists of top performers in various categories. These calculations are based on various performance metrics such as stock price, volume, and volatility. The performers lists are updated throughout the trading session, providing a real-time view of the securities that are currently performing in the market.

The performers dataset is accessible using the performers endpoint of the MarketFeed API. This endpoint allows clients to request 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 the response, clients can use the same data columns described in the Core Data Snapshots to select and return specific data. This allows clients to tailor the performers data to their specific needs and use cases.

Market performers request example:

curl -i -X GET https://api.activetick.com/performers.json?sessionid=MY_SESSIONID&type=volume&source=nyse&columns=l,b,a,v,ltm'
$.ajax({
  type: "GET",
  url: "https://api.activetick.com/performers.json", 
  data: {
    sessionid: "MY_SESSIONID",
    type: "volume",
    source: "nyse",
    columns: "l,b,a,v,ltm"
  },
  success: function(data) {
    // Check if the status is "ok"
    if (data.status === "ok") {
      // Get the rows from the response
      var rows = data.rows;
      // Iterate through all rows
      for (var i = 0; i < rows.length; i++) {
        // Get the data of the current row
        var rowData = rows[i].data;
        // Store the values of each column in variables
        var symbol = rows[i].s;
        var last = "";
        var bid = "";
        var ask = "";
        var volume = "";
        var lastTime = "";
        // Iterate through all columns of the current row
        for (var j = 0; j < rowData.length; j++) {
          switch (rowData[j].c) {
            case "l": last = rowData[j].v; break;
            case "b": bid = rowData[j].v; break;
            case "a": ask = rowData[j].v; break;
            case "v": volume = rowData[j].v; break;
            case "ltm": lastTime = rowData[j].v; break;
          }
        }
        // Print the details of the current row
        console.log("Symbol: " + symbol + " | Last: " + last + " | Bid: " + bid + " | Ask: " + ask + " | Volume: " + volume + " | Last Time: " + lastTime);
      }
    } else {
      console.error("Failed to fetch performers data");
    }
  },
  error: function(jqXHR, textStatus, errorThrown) {
    console.error("Failed to fetch performers data: " + errorThrown);
  }
});

import requests

# API endpoint to make the GET request to
url = "https://api.activetick.com/performers.json"

# Query parameters to pass in the request
params = {
    "sessionid": "MY_SESSIONID",
    "type": "volume",
    "source": "nyse",
    "columns": "l,b,a,v,ltm"
}

# Make the GET request to the API
response = requests.get(url, params=params)

# Check if the request was successful
if response.status_code == 200:
    # Extract the JSON data from the response
    data = response.json()

    # Check if the status in the response is 'ok'
    if data['status'] == 'ok':
        # Extract the rows from the response
        rows = data['rows']

        # Iterate through all the rows and print the details
        for row in rows:
            # Extract the details for the current row
            symbol = row['s']
            last_price = row['data'][0]['v']
            bid_price = row['data'][1]['v']
            ask_price = row['data'][2]['v']
            volume = row['data'][3]['v']
            last_trade_time = row['data'][4]['v']

            # Print the details in a single line
            print(f"Symbol: {symbol} | Last Price: {last_price} | Bid Price: {bid_price} | Ask Price: {ask_price} | Volume: {volume} | Last Trade Time: {last_trade_time}")
else:
    print(f"Request failed with status code {response.status_code}")

using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            // Use HttpClient to send a GET request to the API endpoint
            HttpClient client = new HttpClient();
            Task<string> response = client.GetStringAsync("https://api.activetick.com/performers.json?sessionid=MY_SESSIONID&type=volume&source=nyse&columns=l,b,a,v,ltm");
            response.Wait();

            // Deserialize the response JSON into a dynamic object
            dynamic data = Newtonsoft.Json.JsonConvert.DeserializeObject(response.Result);

            // Check if the API returned 'ok' for the status
            if (data.status == "ok")
            {
                // Iterate through all rows of the response
                foreach (var row in data.rows)
                {
                    Console.WriteLine("Symbol: " + row.s + " | Status: " + row.st);
                    Console.WriteLine("Last: " + row.data[0].v + " | Bid: " + row.data[1].v + " | Ask: " + row.data[2].v + " | Volume: " + row.data[3].v + " | Last Timestamp: " + row.data[4].v);
                    Console.WriteLine("-------------------------------------");
                }
            }
            else
            {
                Console.WriteLine("API returned an error: " + data.status);
            }
        }
    }
}

Response example:

HTTP/1.1 200 OK
Content-Type: application/json
X-Available-Requests-Left: 199
Content-Length: 7502

{
"type":"performers",
"status":"ok",
"category_type":"volume",
"rows":[
    {"s":"SNAP_S U","st":"ok","data":[
        {"c":"l","s":"ok","v":"10.37"},
        {"c":"b","s":"ok","v":"10.54"},
        {"c":"a","s":"ok","v":"10.55"},
        {"c":"v","s":"ok","v":"118582265"},
        {"c":"ltm","s":"ok","v":"2023-02-02T00:59:59.680432128"}
        ]
    },
    {"s":"ABEV_S U","st":"ok","data":[
        {"c":"l","s":"ok","v":"2.59"},
        {"c":"b","s":"ok","v":"2.60"},
        {"c":"a","s":"ok","v":"2.67"},
        {"c":"v","s":"ok","v":"95169888"},
        {"c":"ltm","s":"ok","v":"2023-02-02T00:59:17.168307968"}
        ]
    },
    {"s":"CVNA_S U","st":"ok","data":[
        {"c":"l","s":"ok","v":"13.56"},
        {"c":"b","s":"ok","v":"16.85"},
        {"c":"a","s":"ok","v":"16.97"},
        {"c":"v","s":"ok","v":"89344196"},
        {"c":"ltm","s":"ok","v":"2023-02-02T00:59:59.883685120"}
        ]
    },
    {"s":"F_S U","st":"ok","data":[
        {"c":"l","s":"ok","v":"13.79"},
        {"c":"b","s":"ok","v":"13.92"},
        {"c":"a","s":"ok","v":"13.99"},
        {"c":"v","s":"ok","v":"70769495"},
        {"c":"ltm","s":"ok","v":"2023-02-02T00:59:53.946333696"}
        ]
    },
    ..
    ..
 ]
}

Symbol: SNAP_S U | Last: 10.37 | Bid: 10.54 | Ask: 10.55 | Volume: 118582265 | Last Time: 2023-02-02T00:59:59.680432128
Symbol: ABEV_S U | Last: 2.59 | Bid: 2.60 | Ask: 2.67 | Volume: 95169888 | Last Time: 2023-02-02T00:59:17.168307968
Symbol: CVNA_S U | Last: 13.56 | Bid: 16.85 | Ask: 16.97 | Volume: 89344196 | Last Time: 2023-02-02T00:59:59.883685120
Symbol: F_S U | Last: 13.79 | Bid: 13.92 | Ask: 13.99 | Volume: 70769495 | Last Time: 2023-02-02T00:59:53.946333696
Symbol: NIO_S U | Last: 12.10 | Bid: 12.22 | Ask: 12.25 | Volume: 66275887 | Last Time: 2023-02-02T00:59:57.106572288
Symbol: PLTR_S U | Last: 8.20 | Bid: 8.32 | Ask: 8.35 | Volume: 50218457 | Last Time: 2023-02-02T00:59:51.004558336
Symbol: CCL_S U | Last: 11.34 | Bid: 11.39 | Ask: 11.43 | Volume: 47343318 | Last Time: 2023-02-02T00:59:57.421929472
Symbol: BAC_S U | Last: 35.92 | Bid: 36.08 | Ask: 36.10 | Volume: 44451104 | Last Time: 2023-02-02T00:59:31.814250496
Symbol: T_S U | Last: 20.18 | Bid: 20.22 | Ask: 20.25 | Volume: 40196334 | Last Time: 2023-02-02T00:59:47.381609472
Symbol: APE_S U | Last: 2.56 | Bid: 2.61 | Ask: 2.63 | Volume: 38605535 | Last Time: 2023-02-02T00:59:56.040789504
Symbol: RIG_S U | Last: 7.14 | Bid: 7.17 | Ask: 7.19 | Volume: 38225275 | Last Time: 2023-02-02T00:59:21.138934272
Symbol: AMC_S U | Last: 5.71 | Bid: 5.75 | Ask: 5.77 | Volume: 37202169 | Last Time: 2023-02-02T00:59:58.995016704
Symbol: AI_S U | Last: 21.68 | Bid: 22.70 | Ask: 22.74 | Volume: 37149362 | Last Time: 2023-02-02T00:59:58.841176064
Symbol: ITUB_S U | Last: 4.91 | Bid: 4.72 | Ask: 5.35 | Volume: 35513533 | Last Time: 2023-02-02T00:56:02.358047488
Symbol: NU_S U | Last: 4.77 | Bid: 4.78 | Ask: 4.79 | Volume: 34971079 | Last Time: 2023-02-02T00:59:37.968365824
Symbol: SWN_S U | Last: 5.35 | Bid: 5.36 | Ask: 5.40 | Volume: 32178039 | Last Time: 2023-02-02T00:57:17.716867840
Symbol: SHOP_S U | Last: 50.26 | Bid: 51.45 | Ask: 51.75 | Volume: 26991291 | Last Time: 2023-02-02T00:59:55.136860160
Symbol: CS_S U | Last: 3.63 | Bid: 3.66 | Ask: 3.70 | Volume: 26315058 | Last Time: 2023-02-02T00:55:58.280201216
Symbol: PBR_S U | Last: 11.42 | Bid: 11.43 | Ask: 11.47 | Volume: 26304875 | Last Time: 2023-02-02T00:59:51.606611456
Symbol: GM_S U | Last: 39.30 | Bid: 39.35 | Ask: 39.38 | Volume: 25601549 | Last Time: 2023-02-02T00:59:21.034920960
Symbol: SNAP_S U | Last Price: 10.37 | Bid Price: 10.54 | Ask Price: 10.55 | Volume: 118582265 | Last Trade Time: 2023-02-02T00:59:59.680432128
Symbol: ABEV_S U | Last Price: 2.59 | Bid Price: 2.60 | Ask Price: 2.67 | Volume: 95169888 | Last Trade Time: 2023-02-02T00:59:17.168307968
Symbol: CVNA_S U | Last Price: 13.56 | Bid Price: 16.85 | Ask Price: 16.97 | Volume: 89344196 | Last Trade Time: 2023-02-02T00:59:59.883685120
Symbol: F_S U | Last Price: 13.79 | Bid Price: 13.92 | Ask Price: 13.99 | Volume: 70769495 | Last Trade Time: 2023-02-02T00:59:53.946333696
Symbol: NIO_S U | Last Price: 12.10 | Bid Price: 12.22 | Ask Price: 12.25 | Volume: 66275887 | Last Trade Time: 2023-02-02T00:59:57.106572288
Symbol: PLTR_S U | Last Price: 8.20 | Bid Price: 8.32 | Ask Price: 8.35 | Volume: 50218457 | Last Trade Time: 2023-02-02T00:59:51.004558336
Symbol: CCL_S U | Last Price: 11.34 | Bid Price: 11.39 | Ask Price: 11.43 | Volume: 47343318 | Last Trade Time: 2023-02-02T00:59:57.421929472
Symbol: BAC_S U | Last Price: 35.92 | Bid Price: 36.08 | Ask Price: 36.10 | Volume: 44451104 | Last Trade Time: 2023-02-02T00:59:31.814250496
Symbol: T_S U | Last Price: 20.18 | Bid Price: 20.22 | Ask Price: 20.25 | Volume: 40196334 | Last Trade Time: 2023-02-02T00:59:47.381609472
Symbol: APE_S U | Last Price: 2.56 | Bid Price: 2.61 | Ask Price: 2.63 | Volume: 38605535 | Last Trade Time: 2023-02-02T00:59:56.040789504
Symbol: RIG_S U | Last Price: 7.14 | Bid Price: 7.17 | Ask Price: 7.19 | Volume: 38225275 | Last Trade Time: 2023-02-02T00:59:21.138934272
Symbol: AMC_S U | Last Price: 5.71 | Bid Price: 5.75 | Ask Price: 5.77 | Volume: 37202169 | Last Trade Time: 2023-02-02T00:59:58.995016704
Symbol: AI_S U | Last Price: 21.68 | Bid Price: 22.70 | Ask Price: 22.74 | Volume: 37149362 | Last Trade Time: 2023-02-02T00:59:58.841176064
Symbol: ITUB_S U | Last Price: 4.91 | Bid Price: 4.72 | Ask Price: 5.35 | Volume: 35513533 | Last Trade Time: 2023-02-02T00:56:02.358047488
Symbol: NU_S U | Last Price: 4.77 | Bid Price: 4.78 | Ask Price: 4.79 | Volume: 34971079 | Last Trade Time: 2023-02-02T00:59:37.968365824
Symbol: SWN_S U | Last Price: 5.35 | Bid Price: 5.36 | Ask Price: 5.40 | Volume: 32178039 | Last Trade Time: 2023-02-02T00:57:17.716867840
Symbol: SHOP_S U | Last Price: 50.26 | Bid Price: 51.45 | Ask Price: 51.75 | Volume: 26991291 | Last Trade Time: 2023-02-02T00:59:55.136860160
Symbol: CS_S U | Last Price: 3.63 | Bid Price: 3.66 | Ask Price: 3.70 | Volume: 26315058 | Last Trade Time: 2023-02-02T00:55:58.280201216
Symbol: PBR_S U | Last Price: 11.42 | Bid Price: 11.43 | Ask Price: 11.47 | Volume: 26304875 | Last Trade Time: 2023-02-02T00:59:51.606611456
Symbol: GM_S U | Last Price: 39.30 | Bid Price: 39.35 | Ask Price: 39.38 | Volume: 25601549 | Last Trade Time: 2023-02-02T00:59:21.034920960
Symbol: SNAP_S U | Status: ok
Last: 10.37 | Bid: 10.54 | Ask: 10.55 | Volume: 118582265 | Last Timestamp: 2/2/2023 12:59:59 AM
-------------------------------------
Symbol: ABEV_S U | Status: ok
Last: 2.59 | Bid: 2.60 | Ask: 2.67 | Volume: 95169888 | Last Timestamp: 2/2/2023 12:59:17 AM
-------------------------------------
Symbol: CVNA_S U | Status: ok
Last: 13.56 | Bid: 16.85 | Ask: 16.97 | Volume: 89344196 | Last Timestamp: 2/2/2023 12:59:59 AM
-------------------------------------
Symbol: F_S U | Status: ok
Last: 13.79 | Bid: 13.92 | Ask: 13.99 | Volume: 70769495 | Last Timestamp: 2/2/2023 12:59:53 AM
-------------------------------------
Symbol: NIO_S U | Status: ok
Last: 12.10 | Bid: 12.22 | Ask: 12.25 | Volume: 66275887 | Last Timestamp: 2/2/2023 12:59:57 AM
-------------------------------------
Symbol: PLTR_S U | Status: ok
Last: 8.20 | Bid: 8.32 | Ask: 8.35 | Volume: 50218457 | Last Timestamp: 2/2/2023 12:59:51 AM
-------------------------------------
Symbol: CCL_S U | Status: ok
Last: 11.34 | Bid: 11.39 | Ask: 11.43 | Volume: 47343318 | Last Timestamp: 2/2/2023 12:59:57 AM
-------------------------------------
Symbol: BAC_S U | Status: ok
Last: 35.92 | Bid: 36.08 | Ask: 36.10 | Volume: 44451104 | Last Timestamp: 2/2/2023 12:59:31 AM
-------------------------------------
Symbol: T_S U | Status: ok
Last: 20.18 | Bid: 20.22 | Ask: 20.25 | Volume: 40196334 | Last Timestamp: 2/2/2023 12:59:47 AM
-------------------------------------

Market Performers Request Endpoint

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

Market Performers 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

Market Performers Category Types table provides a list of different categories that can be used to retrieve top performing securities.

Type Description
volume Type provides the most active securities by trading volume.
net_gainers Type provides securities that have gained the most value.
net_losers Type provides securities that have lost the most value.
percent_gainers Type provides securities that have gained the most percentage-wise.
percent_losers Type provides securities that have lost the most percentage-wise.

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

The Market Performers response provides information on the top-performing securities in a given category, such as volume, net gainers, net losers, percent gainers, and percent losers. The response is similar to a Snapshot response and includes the following information:

Name Description
type "performers"
status Indicates if the request was completed successfully. Possible values are "ok" and "fail".
category_type The original request type, such as "volume", "net_gainers", etc.
rows An array of data rows for each instrument symbol.

For each included instrument, the server responds with a row of data that includes information about the row and the data itself. The data array inside the row contains information for each requested column.

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 Scanner

About MarketScanner

ActiveTick's Market Scanner is a powerful tool that allows users to monitor the market in real-time and receive alerts when certain conditions are met. The scanner utilizes server-based technology to scan the entire universe of stocks and includes over 100 different types of scanners and filters that can be applied to narrow down the alerts that are generated.

The Market Scanner API allows users to access the full functionality of the server-based alerting engine. This includes the ability to subscribe to real-time streaming alerts and to query the servers for historical alerts that have been generated in the past.

To help users narrow down the selection of alerts, the scanner provides over 100 different filters that can be applied when requesting streaming or historical alerts from the servers. These filters include options for filtering by symbols, prices, volume, and many other criteria. This feature allows users to customize their alerts to suit their specific needs and requirements.

When an alert event is generated, it includes information such as the type of alert, the time of the event, the stock symbol, and any additional data specific to that alert. Real-time subscribers who have matching alert subscriptions will receive a notification with the newly generated alert information.

An alert event is generated by the Market Scanner when a predefined condition is met while monitoring the market. The alert event contains important information such as the type of alert, the time of the event, the number of occurrences for that day, the stock symbol, and any additional alert-specific data. Real-time subscribers that have matching alert subscriptions will receive a notification event with the newly generated alert information.

The Market Scanner offers a wide range of filters that can be applied to alert subscriptions or historical alert lookups to help narrow down the selection of generated alerts. The filters are designed to exclude alerts that do not match the specified criteria, and this can be done using generic filters that can be applied to any type of alert, or alert-specific filters that only work for specific alerts.

For example, a client can subscribe to two alerts, alert_high and alert_low, to receive notifications when stocks are making new daily highs and lows. These types of alerts typically generate a large number of notifications, particularly during the market open or close. To further narrow down the notifications, filter_last_price filters can be applied to exclude anything that trades outside a certain price range, such as between $5 and $50. Additionally, another filter such as filter_volume_current can be applied to further exclude stocks that have less than 5mil shares.

Alerts and Filters

MarketScanner request example:

curl -i -X POST https://api.activetick.com/alerts_history.json \
-d 'sessionid=MY_SESSIONID&
    begintime=2022-12-05T00:00:00&
    endtime=2022-12-06T00:00:00&
    records=10&
    alerts=[
        {"alert":"alert_high","alert_filter":
            {"filter":"filter_alert_days","value":"1"}
        },
        {"alert":"alert_low","alert_filter":
            {"filter":"filter_alert_days","value":"1"}
        }]&
    filters=[
            {"filter":filter_last_price","operator":"operator_greater_than","value":"5.00"}
        ]'
$.ajax({
  type: "POST",
  url: "https://api.activetick.com/alerts_history.json",
  data: {
    sessionid: "MY_SESSIONID",
    begintime: "2022-12-05T00:00:00",
    endtime: "2022-12-06T00:00:00",
    records: 10,
    alerts: JSON.stringify([
      {alert: "alert_high", alert_filter: {filter: "filter_alert_days", value: "1"}},
      {alert: "alert_low", alert_filter: {filter: "filter_alert_days", value: "1"}}
    ]),
    filters: JSON.stringify([{filter: "filter_last_price", operator: "operator_greater_than", value: "5.00"}])
  },
  success: function(data) {
    console.log(data);
    // Print out alert data in one line per alert
    data.alerts.forEach(function(alert) {
      var alertData = "";
      if (alert.data) {
        alertData = JSON.stringify(alert.data);
      }
      console.log("alert: " + alert.alert + ", daily_count: " + alert.daily_count + ", symbol: " + alert.symbol + ", time: " + alert.tm + ", alert_data: " + alertData);
    });
  },
  error: function(jqXHR, textStatus, errorThrown) {
    console.log("Error: " + textStatus + " - " + errorThrown);
  }
});
import requests
import json

url = "https://api.activetick.com/alerts_history.json"
data = {
    "sessionid": "MY_SESSIONID",
    "begintime": "2022-12-05T00:00:00",
    "endtime": "2022-12-06T00:00:00",
    "records": 10,
    "alerts": json.dumps([
        {"alert": "alert_high", "alert_filter": {"filter": "filter_alert_days", "value": "1"}},
        {"alert": "alert_low", "alert_filter": {"filter": "filter_alert_days", "value": "1"}}
    ]),
    "filters": json.dumps([{"filter": "filter_last_price", "operator": "operator_greater_than", "value": "5.00"}])
}

response = requests.post(url, data=data)

if response.status_code == 200:
    response_json = response.json()

    for alert in response_json["alerts"]:
        alert_data = alert.get("data", {})
        print(f"{alert['alert']} | {alert['daily_count']} | {alert['symbol']} | {alert['tm']} | {alert_data}")
else:
    print("Error: " + response.status_code)

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        using (HttpClient client = new HttpClient())
        {
            string url = "https://api.activetick.com/alerts_history.json";
            var data = new FormUrlEncodedContent(new[]
            {
                new KeyValuePair<string, string>("sessionid", "MY_SESSIONID"),
                new KeyValuePair<string, string>("begintime", "2022-12-05T00:00:00"),
                new KeyValuePair<string, string>("endtime", "2022-12-06T00:00:00"),
                new KeyValuePair<string, string>("records", "10"),
                new KeyValuePair<string, string>("alerts", JsonSerializer.Serialize(new []
                {
                    new
                    {
                        alert = "alert_high",
                        alert_filter = new { filter = "filter_alert_days", value = "1" }
                    },
                    new
                    {
                        alert = "alert_low",
                        alert_filter = new { filter = "filter_alert_days", value = "1" }
                    }
                })),
                new KeyValuePair<string, string>("filters", JsonSerializer.Serialize(new []
                {
                    new { filter = "filter_last_price", @operator = "operator_greater_than", value = "5.00" }
                }))
            });

            var response = await client.PostAsync(url, data);

            if (response.IsSuccessStatusCode)
            {
                var responseString = await response.Content.ReadAsStringAsync();
                using (JsonDocument document = JsonDocument.Parse(responseString))
                {
                    var alerts = document.RootElement.GetProperty("alerts");

                    foreach (var alert in alerts.EnumerateArray())
                    {
                        var alertData = alert.GetProperty("data").ToString();
                        Console.WriteLine($"{alert.GetProperty("alert").GetString()} | {alert.GetProperty("daily_count").GetString()} | {alert.GetProperty("symbol").GetString()} | {alert.GetProperty("tm").GetString()} | {alertData}");
                    }
                }
            }
            else
            {
                Console.WriteLine("Error: " + response.StatusCode);
            }
        }
    }
}

Response example:

HTTP/1.1 200 OK
Content-Type: application/json
X-Available-Requests-Left: 197
Content-Length: 1607

{
"type":"alerts_history",
"status":"ok",
"alerts":[
        {"alert":"alert_low","daily_count":"3","symbol":"CZOO/WS_S U","tm":"2022-12-05T21:52:45","data":{"support_price":"0.0127","support_date":"2022-12-02"}},
        {"alert":"alert_low","daily_count":"4","symbol":"DIVD_S U","tm":"2022-12-05T21:15:00","data":{"support_price":"28.9649","support_date":"2022-11-29"}},
        {"alert":"alert_low","daily_count":"2","symbol":"AAPB_S U","tm":"2022-12-05T21:15:00","data":{"support_price":"19.2","support_date":"2022-12-02"}},
        {"alert":"alert_low","daily_count":"2","symbol":"PSCD_S U","tm":"2022-12-05T21:15:00","data":{"support_price":"82.3","support_date":"2022-11-30"}},
        {"alert":"alert_high","daily_count":"2","symbol":"PSCF_S U","tm":"2022-12-05T21:15:00","data":{"resistance_price":"51.8678","resistance_date":"2022-12-02"}},
        {"alert":"alert_low","daily_count":"4","symbol":"PSCH_S U","tm":"2022-12-05T21:15:00","data":{"support_price":"135.85","support_date":"2022-11-30"}},
        {"alert":"alert_high","daily_count":"1","symbol":"PSCI_S U","tm":"2022-12-05T21:15:00","data":{"resistance_price":"95.0888","resistance_date":"2022-12-02"}},
        {"alert":"alert_low","daily_count":"1","symbol":"PSCM_S U","tm":"2022-12-05T21:15:00","data":{"support_price":"66.14","support_date":"2022-11-29"}},
        {"alert":"alert_low","daily_count":"3","symbol":"PSCT_S U","tm":"2022-12-05T21:15:00","data":{"support_price":"123.345","support_date":"2022-11-30"}},
        {"alert":"alert_low","daily_count":"3","symbol":"PSL_S U","tm":"2022-12-05T21:15:00","data":{"support_price":"86.03","support_date":"2022-11-30"}}
    ]
}

alert: alert_low, daily_count: 4, symbol: DIVD_S U, time: 2022-12-05T21:15:00, alert_data: {"support_price":"28.9649","support_date":"2022-11-29"}
alert: alert_low, daily_count: 2, symbol: AAPB_S U, time: 2022-12-05T21:15:00, alert_data: {"support_price":"19.2","support_date":"2022-12-02"}
alert: alert_low, daily_count: 2, symbol: PSCD_S U, time: 2022-12-05T21:15:00, alert_data: {"support_price":"82.3","support_date":"2022-11-30"}
alert: alert_high, daily_count: 2, symbol: PSCF_S U, time: 2022-12-05T21:15:00, alert_data: {"resistance_price":"51.8678","resistance_date":"2022-12-02"}
alert: alert_low, daily_count: 4, symbol: PSCH_S U, time: 2022-12-05T21:15:00, alert_data: {"support_price":"135.85","support_date":"2022-11-30"}
alert: alert_high, daily_count: 1, symbol: PSCI_S U, time: 2022-12-05T21:15:00, alert_data: {"resistance_price":"95.0888","resistance_date":"2022-12-02"}
alert: alert_low, daily_count: 1, symbol: PSCM_S U, time: 2022-12-05T21:15:00, alert_data: {"support_price":"66.14","support_date":"2022-11-29"}
alert: alert_low, daily_count: 3, symbol: PSCT_S U, time: 2022-12-05T21:15:00, alert_data: {"support_price":"123.345","support_date":"2022-11-30"}
alert: alert_low, daily_count: 3, symbol: PSL_S U, time: 2022-12-05T21:15:00, alert_data: {"support_price":"86.03","support_date":"2022-11-30"}
alert: alert_low, daily_count: 5, symbol: WGMI_S U, time: 2022-12-05T21:15:00, alert_data: {"support_price":"5.45","support_date":"2022-11-30"}
alert_low | 4 | DIVD_S U | 2022-12-05T21:15:00 | {'support_price': '28.9649', 'support_date': '2022-11-29'}
alert_low | 2 | AAPB_S U | 2022-12-05T21:15:00 | {'support_price': '19.2', 'support_date': '2022-12-02'}
alert_low | 2 | PSCD_S U | 2022-12-05T21:15:00 | {'support_price': '82.3', 'support_date': '2022-11-30'}
alert_high | 2 | PSCF_S U | 2022-12-05T21:15:00 | {'resistance_price': '51.8678', 'resistance_date': '2022-12-02'}
alert_low | 4 | PSCH_S U | 2022-12-05T21:15:00 | {'support_price': '135.85', 'support_date': '2022-11-30'}
alert_high | 1 | PSCI_S U | 2022-12-05T21:15:00 | {'resistance_price': '95.0888', 'resistance_date': '2022-12-02'}
alert_low | 1 | PSCM_S U | 2022-12-05T21:15:00 | {'support_price': '66.14', 'support_date': '2022-11-29'}
alert_low | 3 | PSCT_S U | 2022-12-05T21:15:00 | {'support_price': '123.345', 'support_date': '2022-11-30'}
alert_low | 3 | PSL_S U | 2022-12-05T21:15:00 | {'support_price': '86.03', 'support_date': '2022-11-30'}
alert_low | 5 | WGMI_S U | 2022-12-05T21:15:00 | {'support_price': '5.45', 'support_date': '2022-11-30'}
alert_low | 4 | DIVD_S U | 2022-12-05T21:15:00 | {"support_price":"28.9649","support_date":"2022-11-29"}
alert_low | 2 | AAPB_S U | 2022-12-05T21:15:00 | {"support_price":"19.2","support_date":"2022-12-02"}
alert_low | 2 | PSCD_S U | 2022-12-05T21:15:00 | {"support_price":"82.3","support_date":"2022-11-30"}
alert_high | 2 | PSCF_S U | 2022-12-05T21:15:00 | {"resistance_price":"51.8678","resistance_date":"2022-12-02"}
alert_low | 4 | PSCH_S U | 2022-12-05T21:15:00 | {"support_price":"135.85","support_date":"2022-11-30"}
alert_high | 1 | PSCI_S U | 2022-12-05T21:15:00 | {"resistance_price":"95.0888","resistance_date":"2022-12-02"}
alert_low | 1 | PSCM_S U | 2022-12-05T21:15:00 | {"support_price":"66.14","support_date":"2022-11-29"}
alert_low | 3 | PSCT_S U | 2022-12-05T21:15:00 | {"support_price":"123.345","support_date":"2022-11-30"}
alert_low | 3 | PSL_S U | 2022-12-05T21:15:00 | {"support_price":"86.03","support_date":"2022-11-30"}
alert_low | 5 | WGMI_S U | 2022-12-05T21:15:00 | {"support_price":"5.45","support_date":"2022-11-30"}

Making historical and real-time subscription requests require passing of alerts and filters parameters, which are made up of Alert Items and Filter Items. Both parameters are formatted in a JSON array, and can be passed in a query string using GET or POST method. The API supports bundling multiple alert and filter items inside a single request.

Alert Items

Alert item is comprised of an alert type, and an optional alert-specific filter. Not all filters support alert-specific filter; if no filter is provided for alerts that support one, the server will not perform any filtering.

When creating alerts parameter, alert items should be packed into a JSON array, including when packing a single alert.

alerts=[ {"alert":"alert_xxx"}, {"alert":"alert_yyy", "alert_filter":{ "filter":"filter_alert_yyy", "value":"x"}, {...} } ]

Alert Item Values

Name Description
alert Alert name.
alert_filter Alert-specific filter name.
value Alert-specific filter value.

Filter Items

When creating filters for alert subscriptions or historical alert lookups, filter items can be used to further narrow down the results returned by the server. A filter item is a generic filter that can be applied to all alerts, regardless of whether the alerts have their own alert-specific filters. Each filter item consists of a filter type, a comparison operator (such as "equal to" or "greater than"), and a comparison value.

Examples of filter types include "filter_last_price", "filter_volume_yesterday", and "filter_above_low". Comparison operators include "equal to", "greater than", "less than", and "between". The comparison value is a numeric value that the filter will compare the data against.

When creating the filters parameter, filter items should be packed into a JSON array, even when only a single filter is being applied.

filters=[ {"filter":"filter_xxx", "operator":"operator_x", "value":"x"}, {"filter":"filter_yyy", "operator":"operator_y", "value":"y"}, {...} ]

Filter Item Values

Name Description
filter Filter name.
operator Filter comparison operator
value Filter value.

Filter Comparison Operator

Operator Description
operator_less_than Operator <
operator_less_than_or_equal Operator <=
operator_equal Operator =
operator_greater_than Operator >
operator_greater_than_or_equal Operator >=
operator_no_equal Operator !=

Streaming Alerts

Example requesting MarketScanner stream:

curl -i -X POST https://api.activetick.com/alerts_stream.json \
 -H "Connection: Keep-Alive" \
 -d 'sessionid=MY_SESSIONID
    &alerts=[
        {"alert":"alert_high",
        "alert_filter":
            {"filter":"filter_alert_days","value":"1"}},
        {"alert":"alert_low","alert_filter":
            {"filter":"filter_alert_days","value":"1"}}
    ]
    &filters=[
        {"filter":filter_volume_current","operator":"operator_greater_than","value":"500000"}
    ]'
function splitJSONMessages(chunk) {
  const messages = [];
  let currentMessage = '';
  let openBrackets = 0;
  let remainingBytes = chunk.length;

  for (let i = 0; i < chunk.length; i++) {
    const char = chunk[i];
    currentMessage += char;
    if (char === '{') {
      openBrackets += 1;
    }
    if (char === '}') {
      openBrackets -= 1;
    }
    if (openBrackets === 0) {           
      messages.push(currentMessage.trim());
      remainingBytes -= currentMessage.length;
      currentMessage = '';
    }
  }

  // Return all messages, and remaining bytes in chunk if anything was partial
  return {
    messages: messages,
    remainingBytes: remainingBytes,
  };
}

let remainingMessage = '';

fetch('https://api.activetick.com/alerts_stream.json', {
  method: 'POST',
  headers: {
    'Connection': 'Keep-Alive'
  },
  body: 'sessionid=MY_SESSIONID&alerts=' + encodeURIComponent(JSON.stringify([
      {
        alert: 'alert_high',
        alert_filter: {
          filter: 'filter_alert_days',
          value: '1'
        }
      },
      {
        alert: 'alert_low',
        alert_filter: {
          filter: 'filter_alert_days',
          value: '1'
        }
      }
    ])) + '&filters=' + encodeURIComponent(JSON.stringify([
      {
        filter: 'filter_volume_current',
        operator: 'operator_greater_than',
        value: '500000'
      }
    ]))
})
.then(response => {
  const reader = response.body.getReader();

  function read() {
    return reader.read().then(({ value, done }) => {
      if (done) {
        return;
      }

      // Process the chunk of data
      const chunk = new TextDecoder("utf-8").decode(value);

      // Merge any previous partial chunks with new data
      const completeChunk = remainingMessage + chunk;

      // Split complete chunk into JSON strings
      const result = splitJSONMessages(completeChunk);

      // For each message try to parse JSON object
      result.messages.forEach(message => {
        try {
          if(message.length === 0)
              return;
          const json = JSON.parse(message);            

          if (json.type === 'alert') {
            document.write(JSON.stringify(json.alert));
          } else {
            document.write(JSON.stringify(json));
          }

          document.write("<br />");
        } catch (e) {
          console.error('Failed to parse JSON:', e);                  
        }
      });

      // Save anything that's partial into remainingMessage for next read
      remainingMessage = completeChunk.substr(completeChunk.length - result.remainingBytes);

      return read();
    });
  }

  return read();
})
.catch(error => {
  console.error('Error:', error);
});
import requests
import json

url = "https://api.activetick.com/alerts_stream.json"
data = {
 "sessionid": "MY_SESSIONID",
 "alerts": json.dumps([{
            "alert": "alert_high",
            "alert_filter": {
                "filter": "filter_alert_days",
                "value": "1"
            }
        },
        {
            "alert": "alert_low",
            "alert_filter": {
                "filter": "filter_alert_days",
                "value": "1"
            }
        }
    ]),
 "filters": json.dumps([
        {
            "filter": "filter_volume_current",
            "operator": "operator_greater_than",
            "value": "500000"
        }
    ])
}
headers = {
 "Connection": "Keep-Alive"
}

response = requests.post(url, data=data, headers=headers, stream=True)
print("Status code: ", response.status_code,  " Available Requests Left: ", response.headers["X-Available-Requests-Left"])

for chunk in (response.raw.read_chunked()):
    try:
        parsed_json = json.loads(chunk)
        print(parsed_json)

        # process alerts as desired
    except Exception as e:
        print("An error occurred while parsing the JSON string:", e, chunk)

using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json.Linq;

class Program
{
    static async System.Threading.Tasks.Task Main(string[] args)
    {
        string sessionId = "MY_SESSIONID";

        string alerts = @"[
            {""alert"":""alert_high"",
            ""alert_filter"":
                {""filter"":""filter_alert_days"",""value"":""1""}},
            {""alert"":""alert_low"",""alert_filter"":
                {""filter"":""filter_alert_days"",""value"":""1""}}
        ]";

        string filters = @"[
            {""filter"":""filter_volume_current"",""operator"":""operator_greater_than"",""value"":""500000""}
        ]";

        var content = new StringContent(
            $"sessionid={sessionId}&alerts={alerts}&filters={filters}",
            System.Text.Encoding.UTF8,
            "application/x-www-form-urlencoded");

        var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Connection", "Keep-Alive");
        var request = new HttpRequestMessage(HttpMethod.Post, "https://api.activetick.com/alerts_stream.json");
        request.Content = content;

        var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);

        if (response.IsSuccessStatusCode)
        {
            var stream = await response.Content.ReadAsStreamAsync();
            var buffer = new byte[4096];
            var incompleteMessage = string.Empty;

            // Read data from the stream continuously.
            while (true)
            {
                var bytesRead = await stream.ReadAsync(buffer, 0, buffer.Length);
                if (bytesRead == 0)
                    break;

                var chunk = Encoding.UTF8.GetString(buffer, 0, bytesRead);
                var result = SplitJSONMessages(incompleteMessage + chunk);

                foreach (var message in result.Messages)
                    PrintMessage(message);
                incompleteMessage = result.RemainingBytes;
            }
        }
    }

    static void PrintMessage(string message)
    {
        if (message.Length == 0) return;

        dynamic json = JObject.Parse(message);
        if (json.type == "alert")
            Console.WriteLine("alert: " + json.alert.alert + ", symbol: " + json.alert.symbol + ", time: " + json.alert.tm + ", data: " + json.alert.data);
        else
            Console.WriteLine(json);
    }

    static (string[] Messages, string RemainingBytes) SplitJSONMessages(string chunk)
    {
        var messages = new List<string>();
        var currentMessage = string.Empty;
        var openBrackets = 0;
        foreach (var c in chunk)
        {
            currentMessage += c;
            if (c == '{') openBrackets++;
            else if (c == '}') openBrackets--;
            if (openBrackets == 0)
            {
                messages.Add(currentMessage.Trim());
                currentMessage = string.Empty;
            }
        }
        return (messages.ToArray(), currentMessage);
    }
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: Keep-Alive
X-Available-Requests-Left: 199
Transfer-Encoding: chunked

{
    "type":"alerts_stream",
    "status":"ok"
}
{
    "type":"alert",
    "alert":{"alert":"alert_low","daily_count":"56","symbol":"LSI_S U","tm":"2023-02-22T16:16:29","data":{"support_price":"119.81","support_date":"2023-02-08"}}
}
{
    "type":"alert",
    "alert":{"alert":"alert_low","daily_count":"6","symbol":"MDVpA_S U","tm":"2023-02-22T16:16:30","data":{"support_price":"21.6601","support_date":"2023-02-03"}}
}
{
    "type":"alert",
    "alert":{"alert":"alert_high","daily_count":"6","symbol":"RCMT_S U","tm":"2023-02-22T16:16:30","data":{"resistance_price":"14.16","resistance_date":"2023-02-17"}}
}
{
    "type":"alert",
    "alert":{"alert":"alert_low","daily_count":"4","symbol":"HGER_S U","tm":"2023-02-22T16:16:31","data":{"support_price":"21.65","support_date":"2023-02-17"}}
}
{
    "type":"alert",
    "alert":{"alert":"alert_high","daily_count":"14","symbol":"FUN_S U","tm":"2023-02-22T16:16:31","data":{"resistance_price":"46","resistance_date":"2023-02-17"}}
}
{
    "type":"alert",
    "alert":{"alert":"alert_low","daily_count":"34","symbol":"BMRN_S U","tm":"2023-02-22T16:16:31","data":{"support_price":"98.55","support_date":"2023-01-10"}}
}

{"type":"alerts_stream","status":"ok"}
{"alert":"alert_low","daily_count":"47","symbol":"CRL_S U","tm":"2023-02-22T16:10:51","data":{"support_price":"210","support_date":"2022-12-19"}}
{"alert":"alert_high","daily_count":"70","symbol":"LVS_S U","tm":"2023-02-22T16:10:52","data":{"resistance_price":"57.46","resistance_date":"2023-02-16"}}
{"alert":"alert_low","daily_count":"48","symbol":"CRL_S U","tm":"2023-02-22T16:10:52","data":{"support_price":"210","support_date":"2022-12-19"}}
{"alert":"alert_high","daily_count":"31","symbol":"HZNP_S U","tm":"2023-02-22T16:10:53","data":{"resistance_price":"110.94","resistance_date":"2023-01-30"}}
{"alert":"alert_high","daily_count":"35","symbol":"NRDS_S U","tm":"2023-02-22T16:10:54","data":{"resistance_price":"19.0585","resistance_date":"2023-02-17"}}
{"alert":"alert_high","daily_count":"36","symbol":"NRDS_S U","tm":"2023-02-22T16:10:54","data":{"resistance_price":"19.0585","resistance_date":"2023-02-17"}}
{"alert":"alert_high","daily_count":"37","symbol":"NRDS_S U","tm":"2023-02-22T16:10:54","data":{"resistance_price":"19.0585","resistance_date":"2023-02-17"}}
{"alert":"alert_high","daily_count":"38","symbol":"NRDS_S U","tm":"2023-02-22T16:10:54","data":{"resistance_price":"19.0585","resistance_date":"2023-02-17"}}
{"type":"hb","time":"1677082255"}
{"alert":"alert_low","daily_count":"7","symbol":"IONR_S U","tm":"2023-02-22T16:10:56","data":{"support_price":"10.5","support_date":"2023-01-04"}}
Status code:  200  Available Requests Left:  199
{'type': 'alerts_stream', 'status': 'ok'}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '37', 'symbol': 'XLRE_S U', 'tm': '2023-02-22T16:18:36', 'data': {'support_price': '38.54', 'support_date': '2023-01-24'}}}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '19', 'symbol': 'ALK_S U', 'tm': '2023-02-22T16:18:36', 'data': {'support_price': '45.06', 'support_date': '2023-01-24'}}}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '85', 'symbol': 'UCO_S U', 'tm': '2023-02-22T16:18:37', 'data': {'support_price': '24.95', 'support_date': '2023-02-06'}}}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '99', 'symbol': 'USO_S U', 'tm': '2023-02-22T16:18:37', 'data': {'support_price': '63.67', 'support_date': '2023-02-06'}}}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '24', 'symbol': 'PDBC_S U', 'tm': '2023-02-22T16:18:37', 'data': {'support_price': '14.145', 'support_date': '2023-02-17'}}}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '7', 'symbol': 'HY_S U', 'tm': '2023-02-22T16:18:40', 'data': {'support_price': '28.68', 'support_date': '2023-01-09'}}}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '71', 'symbol': 'SPWR_S U', 'tm': '2023-02-22T16:18:40', 'data': {'support_price': '15.09', 'support_date': '2023-02-14'}}}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '4', 'symbol': 'OPAL_S U', 'tm': '2023-02-22T16:18:40', 'data': {'support_price': '7.79', 'support_date': '2023-02-17'}}}
{'type': 'alert', 'alert': {'alert': 'alert_low', 'daily_count': '11', 'symbol': 'EIDO_S U', 'tm': '2023-02-22T16:18:40', 'data': {'support_price': '22.85', 'support_date': '2023-01-30'}}}
{
  "type": "alerts_stream",
  "status": "ok"
}
alert: alert_low, symbol: VOYA_S U, time: 2/22/2023 6:10:22 PM, data: {
  "support_price": "73.26",
  "support_date": "2023-02-10"
}
alert: alert_high, symbol: IIIV_S U, time: 2/22/2023 6:10:23 PM, data: {
  "resistance_price": "25.29",
  "resistance_date": "2023-02-17"
}
alert: alert_high, symbol: INSM_S U, time: 2/22/2023 6:10:26 PM, data: {
  "resistance_price": "20.82",
  "resistance_date": "2023-02-08"
}
alert: alert_low, symbol: PLCE_S U, time: 2/22/2023 6:10:26 PM, data: {
  "support_price": "40.186",
  "support_date": "2023-02-07"
}

To receive real-time notifications for alerts, a client must establish a subscription for streaming alerts with the server. This subscription should include a list of alerts that the client is interested in receiving. Additionally, the client can include an optional list of filters to limit the scope of alerts that will be included in the stream.

The filters parameter in the subscription request is optional, but it allows the client to narrow down the scope of the alerts to be received. If the filters parameter is not included in the request, the server will send all requested alerts in the list.

Note: Streaming alerts are only generated during regular trading sessions and are not available during after-hours trading sessions.

Streaming Requirements

Streaming Alerts Request Endpoint

https://api.activetick.com/alerts_stream.json?sessionid=<sessionid>&alerts=<alerts>&filters=<filters>

Streaming Alerts Request Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
alerts yes JSON array of alerts.
filters no JSON array of filters.

Streaming Alerts Response

When server responds to alert subscription request, its response initially contains only status information about request. If request is successful, the server streams alert events as they happen in real-time.

Name Description
type "alerts_stream"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
data Initial array of alert messages that will be dynamically received as market events happen.

Streaming Alerts Events

When new alert event is generated, the server sends a new alert message with alert data.

Name Description
type "alert"
alert Alert data made up of standard alert values, and any alert-specific values.

Alert Data

Alert is comprised of standard alert data values, and any alert-specific data values if alert supports them.

Name Description
type "alert"
daily_count Number of times alert has been generated for current day.
symbol Symbol of the stock.
tm Timestamp when alert is is generated.
data Any alert-specific data if alert supports it.

If alert supports alert-specific data values, these values will be included inside data array. For more information about alert-specific data values, refer to Market Scanner Alerts

Historical Alerts

Example requesting historical alerts:

curl -i -X POST https://api.activetick.com/alerts_history.json \
 -d 'sessionid=MY_SESSIONID
    &alerts=[
        {"alert":"alert_checkmark_inverted"},
        {"alert":"alert_standard_deviation_breakout",
            {"filter":"filter_alert_deviation","value":"2.5"}},
        {"alert":"alert_running_up",
            {"filter":"filter_alert_ratio","value":"2.0"}}
    ]
    &filters=[
        {"filter":"filter_range_net_intraday15min","operator":"operator_greater_than","value":"5.00"},
        {"filter":"filter_spread","operator":"operator_less_than_or_equal", "value":"1.00"},
        {"filter":"alert_gap_up_reversal","operator":"operator_not_equal","value":"1.00"}
    ]
    &begintime=2022-12-12T15:00:00
    &endtime=2022-12-12T16:00:00
    &records=10'
const url = 'https://api.activetick.com/alerts_history.json';
  const params = new URLSearchParams({
    sessionid: 'MY_SESSIONID',
    alerts: JSON.stringify([
      { alert: 'alert_checkmark_inverted' },
      { alert: 'alert_standard_deviation_breakout', alert_filter: { filter: 'filter_alert_deviation', value: '2.5' } },
      { alert: 'alert_running_up', alert_filter: { filter: 'filter_alert_ratio', value: '2.0' } }
    ]),
    filters: JSON.stringify([
      { filter: 'filter_range_net_intraday15min', operator: 'operator_greater_than', value: '5.00' },
      { filter: 'filter_spread', operator: 'operator_less_than_or_equal', value: '1.00' },
      { filter: 'alert_gap_up_reversal', operator: 'operator_not_equal', value: '1.00' }
    ]),
    begintime: '2022-12-12T16:00:00',
    endtime: '2022-12-12T17:00:00',
    records: 10
  });

  const xhr = new XMLHttpRequest();
  xhr.open('POST', url);
  xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

  xhr.onreadystatechange = function() {
    if (xhr.readyState === XMLHttpRequest.DONE) {
      if (xhr.status === 200) {
        const response = JSON.parse(xhr.responseText);
        response.alerts.forEach(alert => {
          var alertData = "";
          if (alert.data) {
            alertData = JSON.stringify(alert.data);
          }
          console.log("alert: " + alert.alert + ", daily_count: " + alert.daily_count + ", symbol: " + alert.symbol + ", time: " + alert.tm + ", alert_data: " + alertData);
        });
      } else {
        console.error('Error:', xhr.status);
      }
    }
  };
  xhr.send(params.toString());
import requests
import json

url = 'https://api.activetick.com/alerts_history.json'

data = {
    "sessionid": "MY_SESSIONID",
    "alerts": json.dumps([
        {"alert": "alert_checkmark_inverted"},
        {"alert": "alert_standard_deviation_breakout", "alert_filter": {"filter": "filter_alert_deviation", "value": "2.5"}},
        {"alert": "alert_running_up", "alert_filter": {"filter": "filter_alert_ratio", "value": "2.0"}}
    ]),
    "filters": json.dumps([
        {"filter": "filter_range_net_intraday15min", "operator": "operator_greater_than", "value": "5.00"},
        {"filter": "filter_spread", "operator": "operator_less_than_or_equal", "value": "1.00"},
        {"filter": "alert_gap_up_reversal", "operator": "operator_not_equal", "value": "1.00"}
    ]),
    "begintime": '2022-12-12T18:00:00',
    "endtime": '2022-12-12T19:00:00',
    "records": 10
}

headers = {'Content-Type': 'application/x-www-form-urlencoded'}

response = requests.post(url, data=data, headers=headers)

if response.status_code == 200:
    alerts = response.json()['alerts']
    for alert in alerts:
        alert_data = ''
        if alert.get('data'):
            alert_data = ', alert_data: ' + str(alert['data'])
        print(f"alert: {alert['alert']}, daily_count: {alert['daily_count']}, symbol: {alert['symbol']}, time: {alert['tm']}{alert_data}")
else:
    print(f"Error: {response.status_code}")

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;

public class Program
{
    static async Task Main()
    {
        string url = "https://api.activetick.com/alerts_history.json";
        string sessionId = "MY_SESSIONID";
        string alerts = @"[
            {""alert"":""alert_checkmark_inverted""},
            {""alert"":""alert_standard_deviation_breakout"", ""alert_filter"":{""filter"":""filter_alert_deviation"",""value"":""2.5""}},
            {""alert"":""alert_running_up"", ""alert_filter"":{""filter"":""filter_alert_ratio"",""value"":""2.0""}}
        ]";
        string filters = @"[
            {""filter"":""filter_range_net_intraday15min"",""operator"":""operator_greater_than"",""value"":""5.00""},
            {""filter"":""filter_spread"",""operator"":""operator_less_than_or_equal"",""value"":""1.00""},
            {""filter"":""alert_gap_up_reversal"",""operator"":""operator_not_equal"",""value"":""1.00""}
        ]";
        string beginTime = "2022-12-12T19:00:00";
        string endTime = "2022-12-12T20:50:00";
        int records = 10;

        using var httpClient = new HttpClient();

        var formContent = new FormUrlEncodedContent(new[]{
            new KeyValuePair<string, string>("sessionid", sessionId),
            new KeyValuePair<string, string>("alerts", alerts),
            new KeyValuePair<string, string>("filters", filters),
            new KeyValuePair<string, string>("begintime", beginTime),
            new KeyValuePair<string, string>("endtime", endTime),
            new KeyValuePair<string, string>("records", records.ToString())
        });

        var response = await httpClient.PostAsync(url, formContent);
        var jsonString = await response.Content.ReadAsStringAsync();
        var jsonObject = JObject.Parse(jsonString);

        if (jsonObject["status"].ToString() == "ok")
        {
            var alertsArray = jsonObject["alerts"].ToArray();

            foreach (var alert in alertsArray)
            {
                string alertData = alert["data"] != null ? $", alert_data: {alert["data"]}" : "";
                Console.WriteLine($"alert: {alert["alert"]}, daily_count: {alert["daily_count"]}, symbol: {alert["symbol"]}, time: {alert["tm"]}{alertData}");
            }
        }
        else
        {
            Console.WriteLine($"Error: {jsonObject["status"]}");
        }
    }
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json
X-Available-Requests-Left: 198
Content-Length: 1280

{
"type":"alerts_history",
"status":"ok",
"alerts":[
        {"alert":"alert_checkmark_inverted","daily_count":"1","symbol":"EIS_S U","tm":"2022-12-12T15:59:45"},
        {"alert":"alert_standard_deviation_breakout","daily_count":"1","symbol":"BOTJ_S U","tm":"2022-12-12T15:59:29","data":{"percent":"1"}},
        {"alert":"alert_checkmark_inverted","daily_count":"1","symbol":"NGS_S U","tm":"2022-12-12T15:59:18"},
        {"alert":"alert_standard_deviation_breakout","daily_count":"1","symbol":"XOMAO_S U","tm":"2022-12-12T15:58:48","data":{"percent":"2"}},
        {"alert":"alert_checkmark_inverted","daily_count":"1","symbol":"XDNA_S U","tm":"2022-12-12T15:57:31"},
        {"alert":"alert_standard_deviation_breakout","daily_count":"2","symbol":"MNA_S U","tm":"2022-12-12T15:56:01","data":{"percent":"2"}},
        {"alert":"alert_standard_deviation_breakout","daily_count":"1","symbol":"MNA_S U","tm":"2022-12-12T15:56:01","data":{"percent":"1"}},
        {"alert":"alert_checkmark_inverted","daily_count":"2","symbol":"DIHP_S U","tm":"2022-12-12T15:55:29"},
        {"alert":"alert_standard_deviation_breakout","daily_count":"1","symbol":"DRD_S U","tm":"2022-12-12T15:55:04","data":{"percent":"1"}},
        {"alert":"alert_checkmark_inverted","daily_count":"1","symbol":"NSApA_S U","tm":"2022-12-12T15:54:24"}
    ]
}

alert: alert_checkmark_inverted, daily_count: 1, symbol: NOCT_S U, time: 2022-12-12T16:58:47, alert_data: 
alert: alert_checkmark_inverted, daily_count: 1, symbol: FRCpI_S U, time: 2022-12-12T16:58:31, alert_data: 
alert: alert_checkmark_inverted, daily_count: 1, symbol: ALpA_S U, time: 2022-12-12T16:58:02, alert_data: 
alert: alert_checkmark_inverted, daily_count: 1, symbol: BAL_S U, time: 2022-12-12T16:57:21, alert_data: 
alert: alert_running_up, daily_count: 16, symbol: NUWE_S U, time: 2022-12-12T16:56:32, alert_data: {"momentum_ratio":"71.7936"}
alert: alert_checkmark_inverted, daily_count: 1, symbol: MERpK_S U, time: 2022-12-12T16:56:07, alert_data: 
alert: alert_standard_deviation_breakout, daily_count: 2, symbol: KLXE_S U, time: 2022-12-12T16:56:05, alert_data: {"percent":"2"}
alert: alert_standard_deviation_breakout, daily_count: 2, symbol: LKFN_S U, time: 2022-12-12T16:55:51, alert_data: {"percent":"2"}
alert: alert_checkmark_inverted, daily_count: 1, symbol: FSMO_S U, time: 2022-12-12T16:55:37, alert_data: 
alert: alert_standard_deviation_breakout, daily_count: 2, symbol: AREN_S U, time: 2022-12-12T16:55:02, alert_data: {"percent":"2"}
alert: alert_checkmark_inverted, daily_count: 1, symbol: JSTC_S U, time: 2022-12-12T19:49:28
alert: alert_standard_deviation_breakout, daily_count: 4, symbol: LSPR_S U, time: 2022-12-12T19:48:59, alert_data: {'percent': '12'}
alert: alert_standard_deviation_breakout, daily_count: 3, symbol: LSPR_S U, time: 2022-12-12T19:48:37, alert_data: {'percent': '9'}
alert: alert_checkmark_inverted, daily_count: 1, symbol: AVDV_S U, time: 2022-12-12T19:46:02
alert: alert_standard_deviation_breakout, daily_count: 2, symbol: IBEX_S U, time: 2022-12-12T19:45:23, alert_data: {'percent': '3'}
alert: alert_checkmark_inverted, daily_count: 1, symbol: FCAL_S U, time: 2022-12-12T19:44:33
alert: alert_checkmark_inverted, daily_count: 1, symbol: GAMR_S U, time: 2022-12-12T19:42:22
alert: alert_checkmark_inverted, daily_count: 1, symbol: AXNX_S U, time: 2022-12-12T19:41:47
alert: alert_checkmark_inverted, daily_count: 2, symbol: STEL_S U, time: 2022-12-12T19:40:34
alert: alert_checkmark_inverted, daily_count: 1, symbol: EP_S U, time: 2022-12-12T19:40:30
alert: alert_standard_deviation_breakout, daily_count: 3, symbol: NBN_S U, time: 12/12/2022 8:49:26 PM, alert_data: {
  "percent": "10"
}
alert: alert_checkmark_inverted, daily_count: 2, symbol: IBMQ_S U, time: 12/12/2022 8:48:51 PM
alert: alert_checkmark_inverted, daily_count: 1, symbol: SCC_S U, time: 12/12/2022 8:48:03 PM
alert: alert_running_up, daily_count: 4, symbol: EVER_S U, time: 12/12/2022 8:47:58 PM, alert_data: {
  "momentum_ratio": "3.22055"
}
alert: alert_checkmark_inverted, daily_count: 1, symbol: EMTY_S U, time: 12/12/2022 8:46:28 PM
alert: alert_checkmark_inverted, daily_count: 1, symbol: FBMS_S U, time: 12/12/2022 8:44:50 PM
alert: alert_standard_deviation_breakout, daily_count: 2, symbol: SAMG_S U, time: 12/12/2022 8:44:07 PM, alert_data: {
  "percent": "2"
}
alert: alert_checkmark_inverted, daily_count: 1, symbol: IGIC_S U, time: 12/12/2022 8:43:24 PM
alert: alert_running_up, daily_count: 1, symbol: GSpC_S U, time: 12/12/2022 8:41:27 PM, alert_data: {
  "momentum_ratio": "11.3355"
}
alert: alert_standard_deviation_breakout, daily_count: 2, symbol: HYGH_S U, time: 12/12/2022 8:41:17 PM, alert_data: {
  "percent": "2"
}

Every alert that gets generated by the Market Scanner is stored in historical databases. The API offers an alerts_history endpoint for querying this historical data with a given list of alerts and filters. Both alerts and filters parameters are formatted the same way as requests for alerts_stream subscriptions. In addition to these parameters, the history endpoint expects a few additional parameters such as time range and records count to be included in response.

Historical Alerts Request Endpoint

https://api.activetick.com?alerts_history.json?sessionid=<sessionid>&alerts=<alerts>&filters=<filters>&begintime=<begintime>&endtime=<endtime>&records=<records>

Historical Alerts Request Parameters

Parameter Required Description
sessionid yes Valid sessionid value returned from prior authorization.
alerts yes JSON array of alerts.
filters no JSON array of filters.
begintime yes Begin of time range to include in response.
endtime yes End of time range to include in response.
records yes Number of records to include in response.

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

Historical Alerts Response

Name Description
type "alerts_history"
status Indicates if request completed successfully. Possible values are "ok" and "fail".
alerts Array of alerts.

Market Scanner Alerts

This document lists all available Market Scanner alerts that can be requested via API.

Alert Daily High/Low

Description

These alerts occur when new Daily High (or Low) is registered. These alerts can be filtered on the minimal number of the additional days, prior to today, for which this price is also the highest (or the lowest).

List of Alerts

Alert Name Description
alert_high Daily High.
alert_low Daily Low.

Alert Filter

Filter Name
filter_alert_days

Alert Data

Value Description
resistance_price Calculated resistance price on the chart for High alert.
resistance_date Resistance date for High alert.
support_price Calculated support price on the chart for Low alert.
support_date Resistance date for Low alert.

Alert Pullback Percent From Highs/Lows

Description

These alerts occur when the price hits a daily extreme (Daily High or Low) and then pulls back from it part of the distance (25% or 75%) to the initial value (Today’s Open price or Previous Day’s Close price). There may be many alerts of this type during the day when the price goes up and down, reaching new highs or lows and then retracting back. These alerts can be filtered on the minimal size (in dollars) of the first part movement (i.e. distance from the initial value to the daily extreme).

List of Alerts

Alert Name Description
alert_pullback_75perc_from_highs_close Pull down 75% from high back to last Close.
alert_pullback_25perc_from_highs_close Pull down 25% from high back to last Close.
alert_pullback_75perc_from_highs_open Pull down 75% from high back to Open.
alert_pullback_25perc_from_highs_open Pull down 25% from high back to Open.
alert_pullback_75perc_from_lows_close Pull up 75% from low back to last Close.
alert_pullback_25perc_from_lows_close Pull up 25% from low back to last Close.
alert_pullback_75perc_from_lows_open Pull up 75% from low back to Open.
alert_pullback_25perc_from_lows_open Pull up 25% from low back to Open.

Alert Filter

Filter Name
filter_alert_first_move_size

Alert Data

Value Description
first_move_size Size of the move in dollars.

Alert Checkmark

Description

These alerts occur when the price chart draws a shape resembling the checkmark symbol with new daily highs and lows: new daily high – new daily low – new daily high sequence for Checkmark, and new daily low – new daily high – new daily low sequence for Checkmark Inverted. There is no filter for these alerts.

List of Alerts

Alert Name Description
alert_checkmark Checkmark chart pattern.
alert_checkmark_inverted Checkmark inverted chart pattern.

Alert Filter

Filter Name
none

Alert Intraday Percent Moves

Description

These alerts occur when there is a new Daily High (or Low) and the price has passed over one of the barriers. These barriers are calculated as whole numbers of percent (1.0%, 2.0%, etc.) of Previous Day’s Close price. The same barrier does not produce more than one alert in a day. These alerts can be filtered on the minimal percent.

List of Alerts

Alert Name Description
alert_intraday_percent_moveup Move up for the day.
alert_intraday_percent_movedown Move down for the day.

Alert Filter

Filter Name
filter_alert_percent

Alert Data

Value Description
percent Percent value for the move.

Alert Std Deviation Breakout

Description

These alerts occur when the price moves (relatively to Previous Day’s Close price) beyond the range determined by yearly Standard Deviation for the symbol. Price movement is calculated in whole numbers of Standard Deviations. Every time one more Standard Deviation range is passed the alert is reported. These alerts can be filtered on the minimal number of Standard Deviations.

List of Alerts

Alert Name Description
alert_standard_deviation_breakout Standard deviation move up from last Close.
alert_standard_deviation_breakdown Standard deviation move down from last Close.

Alert Filter

Filter Name
filter_alert_deviation

Alert Data

Value Description
percent Percent value for the break.

Alert Cross Daily Support/Resistance

Description

These alerts occur when the price makes new Day High (or new Day Low) and price breaks Resistance (or Support) level for the larger number of Days than the previous alert of the same type for the same day. These alerts can be filtered on the minimum number of the days to break Resistance (or Support) level for.

List of Alerts

Alert Name Description
alert_crossed_daily_highs_resistance Crossing daily highs resistance.
alert_crossed_daily_lows_support Crossing daily lows support.

Alert Filter

Filter Name
filter_alert_days

Alert Data

Value Description
highest_days Number of days for highs cross.
lowest_days Number of days for lows cross.

Alert Trade Above/Below

Description

These alerts occur when the last Trade price jumps above the last Ask price (for “Trading above the best offer price”), or when the last Trade price falls below the last Bid price (for “Trading below the best bid price”). Such events commonly occur in series, so the alert is reported when there are 5, 10 15, 20, 25 and 30 events in a row. These alerts can be filtered on the minimal number of events in a row.

List of Alerts

Alert Name Description
alert_trading_above Trading above the best offer price.
alert_trading_below Trading below the best bid price.

Alert Filter

Filter Name
filter_alert_ratio

Alert Data

Value Description
number_events Number of events.

Alert Cross Above/Below

Description

These alerts occur when the price crosses from being below to being above the barrier price (for “crossed above” alerts), or from being above to being below the barrier price (for “crossed below” alerts). Barrier price can be Previous Day’s Close or Today’s Open price. These alerts can be filtered on the time (in seconds) passed since the previous alert occurred.

List of Alerts

Alert Name Description
alert_crossed_above_open Crossed above previous close.
alert_crossed_below_open Crossed above open.
alert_crossed_above_close Crossed below previous close.
alert_crossed_below_close Crossed below open.

Alert Filter

Filter Name
filter_alert_seconds

Alert Data

Value Description
seconds_since_previous Seconds elapsed since previous alert occurance.

Alert High Relative Volume

Description

These alerts occur when the trading volume for a symbol is significantly higher than the average trading volume for the current time of the day, as measured using 1-, 5-, 10-, 15- or 30-minute periods. Ratio is calculated as the current volume divided by the average volume for the period. There may be a lot of additional alerts reported if ratio keeps increasing with time. These alerts can be filtered on the minimal ratio value.

List of Alerts

Alert Name Description
alert_high_relative_volume_1min High relative volume on 1-minute chart.
alert_high_relative_volume_5min High relative volume on 5-minute chart.
alert_high_relative_volume_10min High relative volume on 10-minute chart.
alert_high_relative_volume_15min High relative volume on 15-minute chart.
alert_high_relative_volume_30min High relative volume on 30-minute chart.

Alert Filter

Filter Name
filter_alert_ratio

Alert Data

Value Description
ratio Ratio value.

Alert Strong Volume

Description

This alert occurs when the total volume for the day is larger than the average daily volume for the last 10 days. Ratio is calculated by dividing the current total volume for the day by the average daily volume. After the alert is reported the first time, the next alert will be reported if the ratio reaches 2.0, then 3.0, etc. This alert can be filtered on the minimal ratio.

List of Alerts

Alert Name Description
alert_strong_volume High total volume.

Alert Filter

Filter Name
filter_alert_ratio

Alert Data

Value Description
ratio Ratio value.

Alert Large Number of Trades

Description

This alert occurs when there is unusually high number of trades happening at the moment. Large number of trades is detected using the average number of trades at a certain time of the day for the 15 minutes timeframe. If the intensity of trading keeps rising or it goes down and then goes up again, more alerts of this type may occur. This alert can be filtered on the minimal ratio.

List of Alerts

Alert Name Description
alert_large_number_of_trades Large number of trades.

Alert Filter

Filter Name
filter_alert_ratio

Alert Data

Value Description
ratio Ratio value.

Alert Running Up/Down

Description

These alerts occur when the price momentum ratio is unusually high. The momentum ratio is computed by measuring the intensity of price increase/decrease in a short term (about one minute) and then dividing it by the symbol’s 5-minute volatility. If running conditions intensify significantly or after couple minutes of running at the same level this alert may be repeated. These alerts can be filtered on the minimal momentum ratio.

List of Alerts

Alert Name Description
alert_running_up Running Up.
alert_running_down Running Down.

Alert Filter

Filter Name
filter_alert_ratio

Alert Data

Value Description
momentum_ratio Momentum ratio value.

Alert Running Now Up/Down

Description

These alerts occur when the price momentum is higher than the symbol’s 1-minute volatility. The momentum is computed by measuring the in a short term (about one minute) and then dividing it by the symbol’s 5-minute volatility. If running conditions intensify significantly or after couple minutes of running at the same level this alert may be repeated. These alerts can be filtered on the minimal momentum ratio.

List of Alerts

Alert Name Description
alert_running_now_up Running Now Up.
alert_running_now_down Running Now Down.

Alert Filter

Filter Name
filter_alert_ratio

Alert Data

Value Description
move_size Move size value.

Alert Crosses

Description

These alerts occur when the price crosses from being below to being above the barrier price (for “crossed above” alerts), or from being above to being below the barrier price (for “crossed below” alerts). Barrier price can be Previous Day’s Close, Today’s Open price, Moving Average price for 20, 50 or 200-day period, or Volume-Weighted Average price. These alerts perform an additional confirmation of the crossing event, such as checking that the price did not cross back within 2 minutes, the volume since crossing was not less than average, and the price after the cross reached not less than 0.25% over the barrier price or the volume was not less than 1.5 times the average. There is no filter for these alerts.

List of Alerts

Alert Name Description
alert_crossed_confirmed_above_open Crossed above open (confirmed).
alert_crossed_confirmed_below_open Crossed below open (confirmed).
alert_crossed_confirmed_above_close Crossed above open (confirmed).
alert_crossed_confirmed_below_close Crossed below close (confirmed).
alert_crossed_above_200moving_average Crossed above 200-day Moving Average.
alert_crossed_below_200moving_average Crossed below 200-day Moving Average.
alert_crossed_above_50moving_average Crossed above 50-day Moving Average.
alert_crossed_below_50moving_average Crossed below 50-day Moving Average.
alert_crossed_above_20moving_average Crossed above 20-day Moving Average.
alert_crossed_below_20moving_average Crossed below 20-day Moving Average.
alert_crossed_above_vwap Crossed above VWAP.
alert_crossed_below_vwap Crossed below VWAP.

Alert Filter

Filter Name
none

Alert Data

Value Description
barrier Barrier price value.

Alert Trading Above/Below VWAP

Description

These alerts occur when the price moves away (diverges) from Volume-Weighted Average price (VWAP) for the day. The value of this movement is measured in percent where 100% means that the price is 2 times VWAP (for “trading above” alert), or the price goes down to zero (for “trading below” alert). First alert is reported at 1% and then every higher whole number of percent is reported as an alert. These alerts can be filtered on the minimal whole number of percent.

List of Alerts

Alert Name Description
alert_trading_above_vwap Trading above Volume Weighted Average.
alert_trading_below_vwap Trading below Volume Weighted Average.

Alert Filter

Filter Name
filter_alert_percent

Alert Data

Value Description
percent Percent value.

Alert Gap Down/Up Reversal

Description

These alerts occur when a gap is detected (i.e. Today’s Open price is up (or down for “gap down reversal”) from Previous Day’s Close price, jumping over a range in between), and then the price goes in the opposite direction to the jump, completely closing the gap on the reversal. These alerts can be reported only once a day. These alerts can be filtered on a total retracement value (in dollars), which is the difference between Today’s High price (or Low for “gap down reversal”) and Previous Day’s Close price.

List of Alerts

Alert Name Description
alert_gap_down_reversal Gap down reversal.
alert_gap_up_reversal Gap up reversal.

Alert Filter

Filter Name
filter_alert_retracement

Alert Data

Value Description
gap Gap price.
total_retracement Total retracement value.

Alert False Gap Down/Up Retracement

Description

These alerts occur when a gap is detected (i.e. Today’s Open price is up (or down for ”false gap down retracement”) from Previous Day’s Close price, jumping over a range in the between), then the price goes back in the opposite direction to the jump (partially reverses), but does not cover the whole gap range to Previous Day’s Close price, but instead, turns around (retraces) and goes again in the direction of the original jump, crossing over Today’s Open price and advancing further significantly (evaluated using symbol’s volatility). Partial reversal must be non-zero, to be registered as such, but not as large as the gap itself. These alerts can be reported only once a day. These alerts can be filtered on the partial reversal value presented as the percentage of the original gap that was covered by the reversal move.

List of Alerts

Alert Name Description
alert_false_gap_down_retracement False gap down retracement.
alert_false_gap_up_retracement Fakse gap up retracement.

Alert Filter

Filter Name
filter_alert_percent

Alert Data

Value Description
retracement_percent Percentage of the original gap value.

Alert Consolidation Breaks

Description

These alerts occur when the price breaks up (“break out”) or down (“break down”) from a pattern called “consolidation”. Consolidation pattern is detected on the corresponding chart (5, 10, 15 or 30-minutes chart) when a price fluctuation for the last 12 bars does not exceed a certain measure of volatility (computed for the last 1000 bars). These alerts can be filtered on a distance (in dollars) the price moved up or down beyond the consolidation range.

List of Alerts

Alert Name Description
alert_consolidation_breakout_5min Consolidation breakout on 5-minute chart.
alert_consolidation_breakdown_5min Consolidation breakdown on 5-minute chart.
alert_consolidation_breakout_10min Consolidation breakout on 10-minute chart.
alert_consolidation_breakdown_10min Consolidation breakdown on 10-minute chart.
alert_consolidation_breakout_15min Consolidation breakout on 15-minute chart.
alert_consolidation_breakdown_15min Consolidation breakdown on 15-minute chart.
alert_consolidation_breakout_30min Consolidation breakout on 30-minute chart.
alert_consolidation_breakdown_30min Consolidation breakdown on 30-minute chart.

Alert Filter

Filter Name
filter_alert_move_size

Alert Data

Value Description
distance_over_range Distance in dollars of price movement.

Alert Intraday High/Low

Description

These alerts occur when, for the current 5-, 10-, 15-, 30- or 60-minute bar, the price for the first time goes beyond the High (or Low) of the previous non-empty bar. It is considered to be the new local High (or Low) on the selected timeframe. There may be only one such alert for the same bar. There is no filter for these alerts.

List of Alerts

Alert Name Description
alert_intraday_high_5min Intra-day 5-minute High.
alert_intraday_low_5min Intra-day 5-minute Low.
alert_intraday_high_10min Intra-day 10-minute High.
alert_intraday_low_10min Intra-day 10-minute Low.
alert_intraday_high_15min Intra-day 15-minute High.
alert_intraday_low_15min Intra-day 15-minute Low.
alert_intraday_high_30min Intra-day 30-minute High.
alert_intraday_low_30min Intra-day 30-minute Low.
alert_intraday_high_60min Intra-day 60-minute High.
alert_intraday_low_60min Intra-day 60-minute Low.

Alert Filter

Filter Name
none

Alert Opening Range Breaks

Description

These alerts occur when the price breaks out of the range created by the price movement during 1-60-minute period after the market opening (at 9:30a ET). The highest and the lowest prices reached during this initial time period become the barriers, and if they are broken in the subsequent time, the alert is reported. These alerts can be reported only once a day. There is no filter for these alerts.

List of Alerts

Alert Name Description
alert_opening_range_breakout_1min Opening range breakout on 1-minute chart.
alert_opening_range_breakdown_1min Opening range breakdown on 1-minute chart.
alert_opening_range_breakout_2min Opening range breakout on 2-minute chart.
alert_opening_range_breakdown_2min Opening range breakdown on 2-minute chart.
alert_opening_range_breakout_5min Opening range breakout on 5-minute chart.
alert_opening_range_breakdown_5min Opening range breakdown on 5-minute chart.
alert_opening_range_breakout_10min Opening range breakout on 10-minute chart.
alert_opening_range_breakdown_10min Opening range breakdown on 10-minute chart.
alert_opening_range_breakout_15min Opening range breakout on 15-minute chart.
alert_opening_range_breakdown_15min Opening range breakdown on 15-minute chart.
alert_opening_range_breakout_30min Opening range breakout on 30-minute chart.
alert_opening_range_breakdown_30min Opening range breakdown on 30-minute chart.
alert_opening_range_breakout_60min Opening range breakout on 60-minute chart.
alert_opening_range_breakdown_60min Opening range breakdown on 60-minute chart.

Alert Filter

Filter Name
none

Alert SMA Crosses

Description

These alerts occur when Simple Moving Average (SMA) of the price, computed for a shorted period (5, 8, 20) crosses another SMA, computed for a longer period (8, 20, 200) at a specified chart (1-, 5-, 10-. 15- 30-minute charts). There are no filters for these alerts.

List of Alerts

Alert Name Description
alert_sma_cross_5above8_at1min SMA 5-minute crossed over SMA 8-minute on 1-minute chart.
alert_sma_cross_5below_8_at1min SMA 5-minute crossed under SMA 8-minute on 1-minute chart.
alert_sma_cross_5above8_at5min SMA 5-minute crossed over SMA 8-minute on 5-minute chart.
alert_sma_cross5_below8_at5min SMA 5-minute crossed under SMA 8-minute on 5-minute chart.
alert_sma_cross_5above8_at10min SMA 5-minute crossed over SMA 8-minute on 10-minute chart.
alert_sma_cross5_below8_at10min SMA 5-minute crossed under SMA 8-minute on 10-minute chart.
alert_sma_cross5_above8_at15min SMA 5-minute crossed over SMA 8-minute on 15-minute chart.
alert_sma_cross5_below8_at15min SMA 5-minute crossed under SMA 8-minute on 15-minute chart.
alert_sma_cross_5above8_at30min SMA 5-minute crossed over SMA 8-minute on 30-minute chart.
alert_sma_cross5_below8_at30min SMA 5-minute crossed under SMA 8-minute on 30-minute chart.
alert_sma_cross8_above20_at1min SMA 8-minute crossed over SMA 20-minute on 1-minute chart.
alert_sma_cross8_below20_at1min SMA 8-minute crossed under SMA 20-minute on 1-minute chart.
alert_sma_cross8_above20_at5min SMA 8-minute crossed over SMA 20-minute on 5-minute chart.
alert_sma_cross8_below20_at5min SMA 8-minute crossed under SMA 20-minute on 5-minute chart.
alert_sma_cross8_above20_at15min SMA 8-minute crossed over SMA 20-minute on 15-minute chart
alert_sma_cross8_below20_at15min SMA 8-minute crossed under SMA 20-minute on 15-minute chart.
alert_sma_cross20_above200_at1min SMA 20-minute crossed over SMA 200-minute on 1-minute chart
alert_sma_cross20_below200_at1min SMA 20-minute crossed under SMA 200-minute on 1-minute chart.
alert_sma_cross20_above200_at5min SMA 20-minute crossed over SMA 200-minute on 5-minute chart
alert_sma_cross20_below200_at5min SMA 20-minute crossed under SMA 200-minute on 5-minute chart.
alert_sma_cross20_above200_at15min SMA 20-minute crossed over SMA 200-minute on 15-minute chart
alert_sma_cross20_below200_at15min SMA 20-minute crossed under SMA 200-minute on 15-minute chart.

Alert Filter

Filter Name
none

Market Scanner Filters

This document lists all filters that can be applied to alerts.

Filter Last Price

Description

The value of this filter is Last Trading price for a symbol.

Filter Information

Name Description
filter_last_price Trading price.

Filter Spread

Description

The value of this filter is the difference between Ask Price and Bid Price at the time of alert.

Filter Information

Name Description
filter_spread Spread.

Filter Bid Size

Description

The value of this filter is Bid Size at the time of alert.

Filter Information

Name Description
filter_bid_size Bid size.

Filter Ask Size

Description

The value of this filter is Ask Size at the time of alert.

Filter Information

Name Description
filter_ask_size Ask size.

Filter Bid/Ask Ratio

Description

The value of this filter is the ratio of Bid Size to Ask Size at the time of alert.

Filter Information

Name Description
filter_bid_ask_ratio Bid to ask ratio.

Filter Distance From Inside Market

Description

The value of this filter is non-zero if the Trading price at the time of alert is above the last Ask price or below the last Bid price. Then it represents the number of percents the price is above (or below) Bid/Ask range.

Filter Information

Name Description
filter_distance_from_inside_market Distance from inside market.

Filter Volume Daily

Description

The value of these filters is Daily Average volume for the last 5 or 10 days.

Filter Information

Name Description
filter_volume_daily5 Average daily volume for 5 days.
filter_volume_daily10 Average daily volume for 10 days.

Filter Volume Dollar

Description

The value of this filter is the Trading price at the time of alert multiplied by Average Daily Volume for the last 10 days.

Filter Information

Name Description
filter_volume_dollar Dollar volume (per day).

Filter Volume Current

Description

The value of this filter is the ratio of total today’s Volume at the time of alert to total Average Volume at this time of the day.

Filter Information

Name Description
filter_volume_current Average current volume ratio.

Filter Volume Today Net/Percent

Description

The value of these filters is the total today’s Volume at the time of alert. This value is expressed in shares or as a percentage of Average Daily Volume for the last 10 days.

Filter Information

Name Description
filter_volume_today_net Today's volume.
filter_volume_today_perc Today's volume (%).

Filter Volume Yesterday

Description

The value of this filter is the ratio of yesterday’s Volume to Average Daily Volume for the last 10 days.

Filter Information

Name Description
filter_volume_yesterday Yesterday's volume.

Filter Volume Intraday

Description

The value of these filters is the ratio of Volume for the last 1, 5, 10, 15 or 30 minutes to Average Volume of this symbol for the same period of time at this time of the day.

Filter Information

Name Description
filter_volume_intraday1 Volume the last 1 minute.
filter_volume_intraday5 Volume the last 5 minutes.
filter_volume_intraday10 Volume the last 10 minutes.
filter_volume_intraday15 Volume the last 15 minutes.
filter_volume_intraday30 Volume the last 30 minutes.

Filter Average True Range

Description

The value of this filter is Average True Range computed for 14 days.

Filter Information

Name Description
filter_average_true_range Average true range (ATR).

Filter Range Today's

Description

The value of this filter is the difference between High Price and Low Price at the time of alert.

Filter Information

Name Description
filter_range_todays Today's range.

Filter Range Today's ATR

Description

The value of this filter is the percentage of today’s range in Average True Range computed for 14 days. The range is defined between the High and the Low prices for the day.

Filter Information

Name Description
filter_range_todays_atr Today's range vs. ATR ratio.

Filter Range Net/Percent Intraday

Description

The value of these filters is the range the Trading price creates for the specified period of 15-120 minutes or 5-20 days. The range is defined between the High and the Low prices for the period. This value is expressed in dollars or as a percentage of the last Trading price.

Filter Information

Name Description
filter_range_net_intraday15min Range the last 15 minutes.
filter_range_net_intraday30min Range the last 30 minutes.
filter_range_net_intraday60min Range the last 60 minutes.
filter_range_net_intraday120min Range the last 120 minutes.
filter_range_net_daily5day Range the last 5 days.
filter_range_net_daily10day Range the last 10 days.
filter_range_net_daily20day Range the last 20 days.
filter_range_perc_intraday15min Range the last 15 minutes (%).
filter_range_perc_intraday30min Range the last 30 minutes (%).
filter_range_perc_intraday60min Range the last 60 minutes (%).
filter_range_perc_intraday120min Range the last 120 minutes (%).

Filter Gap Net/Percent

Description

The value of these filters is today’s gap (positive or negative) expressed in dollars as Open Price minus Previous Day’s Close price, or expressed as a percent of Previous Day’s Close price.

Filter Information

Name Description
filter_gap_net Gap net.
filter_gap_perc Gap (%).

Filter Position Of Open

Description

The value of this filter is the difference between today’s Open price and the Low price for the previous day expressed as the percentage of the range for the previous day. The range is defined between the highest price and the lowest price for the previous day. When the price is at the Previous Day’s Low, the value is 0%, when the price is at the Previous Day High, the value is 100%.

Filter Information

Name Description
filter_position_of_open Position of Open.

Filter Decimal

Description

The value of this filter is a number in the range 0.5 – 1.5 that represents the decimal of the price at the time of alert. If price ends with a decimal part of less than .50 it will be in the range of [1.00 – 1.50), otherwise it will be in the range of [0.50 – 1.00). It is done this way to make possible conditions like Decimal > 0.95 AND Decimal < 1.05, to allow only prices that are close to the whole dollar amounts.

Filter Information

Name Description
filter_decimal Decimal part of the price.

Filter Up Bars

Description

The value of these filters is the number of past bars in a row (excluding the current) on a specific chart (5-, 10-, 15-, 30-, 60-minute or daily) for which the High price was increasing. The value will be a negative number for bars with consequently decreasing Low price in a row.

Filter Information

Name Description
filter_up_bars_daily_days Up for the last (days).
filter_up_bars_intraday5min Up for the last (5-minute bars).
filter_up_bars_intraday10min Up for the last (10-minute bars).
filter_up_bars_intraday15min Up for the last (15-minute bars).
filter_up_bars_intraday30min Up for the last (30-minute bars).
filter_up_bars_intraday60min Up for the last (60-minute bars).

Filter Movement Price

Description

The value of these filters is the difference in trading price between now and 5-60 minutes ago expressed in dollars or percents of the past price.

Filter Information

Name Description
filter_movement_price5min Price movement for the last 5 minutes.
filter_movement_price10min Price movement for the last 10 minutes.
filter_movement_price15min Price movement for the last 15 minutes.
filter_movement_price30min Price movement for the last 30 minutes.
filter_movement_price60min Price movement for the last 60 minutes.
filter_movement_perc5min Price movement for the last 5 minutes (%).
filter_movement_perc10min Price movement for the last 10 minutes (%).
filter_movement_perc15min Price movement for the last 15 minutes (%).
filter_movement_perc30min Price movement for the last 30 minutes (%).
filter_movement_perc60min Price movement for the last 60 minutes (%).

Filter Up From Close

Description

The value of these filters is the difference between the last Trading price and Previous Day’s Close price expressed in dollars or percentage of Previous Day’s Close price.

Filter Information

Name Description
filter_up_price_from_close Up from last Close.
filter_up_perc_from_close Up from last Close (%).

Filter Up From Open

Description

The value of these filters is the difference between the last Trading price and Today’s Open price expressed in dollars or percentage of Previous Day’s Close price.

Filter Information

Name Description
filter_up_price_from_open Up from Open.
filter_up_perc_from_open Up from Open (%).

Filter Up Previous Day

Description

The value of these filters is the difference between Previous Day’s Close price and the Day Before Previous Day’s Close price expressed in dollars or percentage of Day Before Previous Day’s Close price.

Filter Information

Name Description
filter_up_price_previous_day Up between last Close and previous Close.
filter_up_perc_previous_day Up between last Close and previous Close (%).

Filter Up in Days

Description

The value of these filters is the difference between the last Trading price and Close price for one of the days from the past (5-, 10- or 20-day old). This value is expressed in dollars or percentage of that Close price.

Filter Information

Name Description
filter_up_price_in_5days Up from 5-day old Close.
filter_up_price_in_10days Up from 10-day old Close.
filter_up_price_in_20days Up from 20-day old Close.
filter_up_perc_in_5days Up from 5-day old Close (%).
filter_up_perc_in_10days Up from 10-day old Close (%).
filter_up_perc_in_20days Up from 20-day old Close (%)

Filter Below High

Description

The value of this filter is the difference between High price for the day and the last Trading price.

Filter Information

Name Description
filter_below_high Below High.

Filter Above Low

Description

The value of this filter is the difference between the last Trading price and Low price for the day.

Filter Information

Name Description
filter_above_low Above Low.

Filter Position in Bollinger Bands

Description

The value of these filters is computed using Bollinger Bands indicator with parameters (10, 2, 2, SMA) on 5-, 15-, 60-minute or daily charts. The value is the difference between the last Trading price and lower Bollinger Band value expressed as the percentage of Bollinger Bands range. When the price is at the lower Bollinger Band, the value is 0%, when the price is at the higher Bollinger Band, the value is 100%.

Filter Information

Name Description
filter_position_in_bbands_5min Position in Bollinger Bands 5-minute range.
filter_position_in_bbands_15min Position in Bollinger Bands 15-minute range.
filter_position_in_bbands_60min Position in Bollinger Bands 60-minute range.
filter_position_in_bbands_daily Position in Bollinger Bands Daily range.

Filter Position in Ranges

Description

The value of these filters is the difference between the last Trading price and the lowest price for the range expressed as the percentage of the range. The range is defined between the highest price and the lowest price for a specified period (today, yesterday, 5-day, 20-day, year). When the price is at the lower bound of the range, the value is 0%, when the price is at the higher bound of the range, the value is 100%.

Filter Information

Name Description
filter_position_in_today_range Position in today's range.
filter_position_in_previous_day_range Position in yesterday's range.
filter_position_in_5day_range Position in 5-day range.
filter_position_in_10day_range Position in 10-day range.
filter_position_in_20day_range Position in 20-day range.
filter_position_in_year_range Position in year's range.

Filter Range Contraction

Description

The value of this filter is the number of past days in a row (ignoring today) the daily range is getting smaller and smaller. The daily range is the distance from Low price to High price for the day. This value can be negative when the range was actually expanding several days in a row.

Filter Information

Name Description
filter_range_contraction Range contraction pattern.

Filter Average Directional Index

Description

The value of this filter is Average Directional Index computed for 14 days.

Filter Information

Name Description
filter_average_directional_index Average Directional Index ADX(14).

Filter Directional Indicator

Description

The value of this filter is Directional Indicator computed for 14 days.

Filter Information

Name Description
filter_directional_indicator Directional Indicator DI(14).

Filter Up From

Description

The value of these filters is the difference between the last Trading price and Simple Moving Average for8 – 200 periods on 1-, 5-, 15, 60-minute or Daily charts. This value is expressed in dollars or as a percentage of SMA value. It can be negative when the price goes below SMA.

Filter Information

Name Description
filter_up_from_200period_daily_sma Up from daily Simple Moving Average SMA(200).
filter_up_from_50period_daily_sma Up from daily Simple Moving Average SMA(50).
filter_up_from_20period_daily_sma Up from daily Simple Moving Average SMA(20).
filter_up_from_8period_1min_sma Up from 1-minute Simple Moving Average SMA(8).
filter_up_from_8period_5min_sma Up from 5-minute Simple Moving Average SMA(8).
filter_up_from_8period_15min_sma Up from 15-minute Simple Moving Average SMA(8).
filter_up_from_8period_60min_sma Up from 60-minute Simple Moving Average SMA(8).
filter_up_from_20period_1min_sma Up from 1-minute Simple Moving Average SMA(20).
filter_up_from_20period_5min_sma Up from 5-minute Simple Moving Average SMA(20).
filter_up_from_20period_15min_sma Up from 15-minute Simple Moving Average SMA(20).
filter_up_from_20period_60min_sma Up from 60-minute Simple Moving Average SMA(20).
filter_up_from_200period_1min_sma Up from 1-minute Simple Moving Average SMA(200).
filter_up_from_200period_5min_sma Up from 5-minute Simple Moving Average SMA(200).
filter_up_from_200period_15min_sma Up from 15-minute Simple Moving Average SMA(200).
filter_up_from_200period_60min_sma Up from 60-minute Simple Moving Average SMA(200).

Filter SMA Above SMA

Description

The value of these filters is a percentage difference between two Simple Moving Average values, the first with a shorter period (8 or 20), and the second with a longer period (20 or 200) on 1-, 5-, 15 or 60-minute charts. This value is expressed in percents of the longer period SMA. It can be negative when the shorter period SMA value is less than the longer period SMA value.

Filter Information

Name Description
filter_8above_20period_1min_sma SMA(8) over SMA(20) on 1-minute chart.
filter_8above_20period_5min_sma SMA(8) over SMA(20) on 5-minute chart.
filter_8above_20period_15min_sma SMA(8) over SMA(20) on 15-minute chart.
filter_8above_20period_60min_sma SMA(8) over SMA(20) on 60-minute chart.
filter_20above_200period_1min_sma SMA(20) over SMA(200) on 1-minute chart.
filter_20above_200period_5min_sma SMA(20) over SMA(200) on 5-minute chart.
filter_20above_200period_15min_sma SMA(20) over SMA(200) on 15-minute chart.
filter_20above_200period_60min_sma SMA(20) over SMA(200) on 60-minute chart.