Introduction
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
TMX Analytics API offers access to trades, quotes, order book and FX datasets. These analytics-ready datasets span multiple geographical locations including Canada and US. These are RESTful APIs that return JSON-encoded responses and standard HTTP response codes.
API Versioning
APIs will be versioned on a single-digit versioning pattern, for example v1, v2, etc. When a new version for an API is available (say v2), the older version (say v1) will be supported for an year before it is phased out.
Example of changes that lead to version change
- A change in the response type (i.e. changing an integer to a float)
- Change in the name of the response attribute (or column name)
- Removal of a response attribute (or column)
Example of changes that do not lead to version change
- Fixing functional bugs
- Security fixes
- Addition of a new response attribute (or column)
- Addition of new web-hook events
- Changing the order of existing attributes
Current Version is v1
Attribution
Attribution is required for all users. It is as simple as putting “Data provided by TMX Analytics” somewhere on your site or app and linking that text to https://www.tmx.com/analytics. In case of limited screen space, or design constraints, the attribution link can be included in your terms of service using the following hyperlinked text: Data provided by TMX Analytics
Authentication
As part of the user registration process, TMX Analytics will provide user credentials consisting of:
- an API Key - accessible from "API Usage" page on TMX Analytics website
- a password - identifies a registered user
The Help Widget available at the bottom right of the page can be used to request for user credentials.
The password provided by TMX Analytics is temporary and has to be changed before accessing any API.
Steps to change User Password:
- Change Password API is available under Access APIs --> Change Password
- API Key needs to be passed in the header as parameter name: x-api-key
- Request parameters to be passed along are mentioned within Change Password API details
A valid user will be able to generate an API Authorization token using the Authenticate API. This is a 'Bearer' token that must accompany each of the subsequent API requests.
Steps to generate API Authorization Token:
- Authenticate API is available under Access APIs --> Authenticate
- API Key needs to be passed in the header as parameter name: x-api-key
- Request parameters to be passed along are mentioned within Authenticate API details
Format for using the Authorization Token:
Authorization: Bearer
Protecting your API Authorization tokens and passwords:
- The token has a validity of one hour.
- The token should be kept confidential and stored safely. Using this token, an API call can be made, which will impact billing.
- Usage of APIs should be monitored for anomalies. If any unauthorized or abnormal usage is observed, the API Authorization token should be rotated immediately.
- Passwords should not be embedded directly in the code. Instead, they should be added as environment variables or included via files encrypted and stored separately from the bulk of the code - outside the source repository of the application. This will ensure that the passwords will not be inadvertently exposed to unauthorized users even when the code is shared.
- Passwords should be changed periodically.
API Base
Base URL for the API is: https://analyticsapi.tmxanalytics.com
Header Request Parameters
Parameter | Required | Value |
---|---|---|
Content-Type | true | application/json |
Data Schedule
EOD Data for the previous day will be available through the APIs by 6:30am EST the following day. For example, data for trading activity that occurred on January 15, 2020 will be available by 6:30am on January 16, 2020.
In case of MX Analytics API, data will be available by 9:00am EST the following day from Tuesday to Friday. Friday's data will be made available by 9:00am EST the following Monday.
Data Availability API available under Access APIs --> Data Availability can be used to check when the most recent data was loaded for each API.
Data Formats
TMX Analytics APIs return data in JSON format.
Data Sources
Multiple
Query Parameters
- Parameter values are case sensitive. For example, "symbol" : "ABC" is correct and "symbol" : "abc" will not return the expected result
- Parameter values must be comma-delimited within square brackets (array) when requesting multiple. For example, "symbols" : ["ABC","DEF"]
- Parameters passed must be url-encoded. For example, ?symbols=ABC+DEF encoded is ?symbols=ABC%20DEF
Response Attributes
Error Response
{
"message": "string"
}
API response is documented along with each API endpoint. Response attributes are case-sensitive.
TMX Analytics uses HTTP response codes to indicate the success or failure of an API request. Error response will be accompanied with a detailed message within the body. List of error codes along with the messages are explained in section Errors.
Subscription Plans & Limits
The limits are applicable per group per plan.
Group Name | API Description | API Name | Plan | Monthly Call Limit | Symbol Coverage | Lookback Days |
---|---|---|---|---|---|---|
Equity Intraday Trades | One-minute Bars for Trades (Canada) | Trades - 1min CA | Free | 100,000 | 50 | Current-30 |
One-second Bars for Trades (Canada) | Trades - 1sec CA | |||||
One-minute Bars for Trades (US) | Trades - 1min US | |||||
One-second Bars for Trades (US) | Trades - 1sec US | |||||
OHLC (Canada) | OHLC CA | |||||
Equity Intraday Trades | One-minute Bars for Trades (Canada) | Trades - 1min CA | Starter | 500,000 | 100 | Current-30 |
One-second Bars for Trades (Canada) | Trades - 1sec CA | |||||
One-minute Bars for Trades (US) | Trades - 1min US | |||||
One-second Bars for Trades (US) | Trades - 1sec US | |||||
OHLC (Canada) | OHLC CA | |||||
Equity Intraday Trades | One-minute Bars for Trades (Canada) | Trades - 1min CA | Premium | 2,000,000 | ALL | Previous 3 year History |
One-second Bars for Trades (Canada) | Trades - 1sec CA | |||||
One-minute Bars for Trades (US) | Trades - 1min US | |||||
One-second Bars for Trades (US) | Trades - 1sec US | |||||
OHLC (Canada) | OHLC CA | |||||
Equity Intraday Quotes | One-minute Bars for Quotes (Canada) | Quotes - 1min CA | Starter | 500,000 | 100 | Current-30 |
One-second Bars for Quotes (Canada) | Quotes - 1min US | |||||
One-minute Bars for Quotes (US) | Quotes - 1sec US | |||||
One-second Bars for Quotes (US) | Quotes - 1sec US | |||||
Equity Intraday Quotes | One-minute Bars for Quotes (Canada) | Quotes - 1min CA | Premium | 2,000,000 | ALL | Previous 3 year History |
One-second Bars for Quotes (Canada) | Quotes - 1sec CA | |||||
One-minute Bars for Quotes (US) | Quotes - 1sec US | |||||
One-second Bars for Quotes (US) | Quotes - 1sec CA | |||||
Trades & Quotes Tick Data | Premium Trades and Quotes CBBO (Canada) | TAQ NBBO CA | Premium | 5,000 | ALL | Current-30 |
Premium Trades and Quotes CBBO (US) | TAQ NBBO US | |||||
Essential Analytics for Options & Futures | MX Daily Stats | MX Daily Stats CA | Premium | 100,000 | ALL | Previous 3 year History |
Corporate Actions & Reference Data | Issuers CA | Issuers CA | Premium | 100,000 | ALL | Previous 3 year History |
Global Symbols | Global Symbols | |||||
Global Symbols Delta | Global Symbols Delta | |||||
Essential Analytics for Equities | Advanced Daily Stats (Canada) | Advanced Daily Stats CA | Premium | 100,000 | ALL | Previous 3 year History |
Liquidity Analytics (Canada) | Liquidity Analytics (CA) | |||||
Basic Daily Stats (Canada) | Basic Daily Stats CA | |||||
Daily Stats (Canada) | Daily Stats CA | |||||
TSX Daily Stats (Canada) | TSX Daily Stats CA | |||||
Advanced Daily Stats (US) | Advanced Daily Stats US | |||||
Daily Stats (US) | Daily Stats US | |||||
Basic Daily Stats (US) | Basic Daily Stats US | |||||
Broker Analytics | Broker Liquidity(Canada) | Broker Liquidity CA | Premium | 100,000 | ALL | Previous 3 year History |
Broker Daily Stats(Canada) | Broker Daily Stats CA | |||||
Broker Summary(Canada) | Broker Summary CA | |||||
Investor Analytics | Investor Flows (Canada) | Investor Flows CA | Premium | 100,000 | ALL | Previous 3 year History |
Overage charge will be attributable once monthly call limits per plan are exhausted. Notification will be sent on exhaustion of 50%, 75% and 100% monthly call limit. API does not throw any error in such a scenario.
Symbol List
Some of the subscription plans provide a limited number of symbols that can be accessed by the APIs. The list underneath details the symbols included in the Free as well as Starter Plans for Canada and US.
Canada
Ticker | Free Plan | Starter Plan |
---|---|---|
ABX | ✔ | ✔ |
AC | ✔ | ✔ |
ACB | ✔ | ✔ |
AEM | ✔ | ✔ |
ALA | ✘ | ✔ |
APHA | ✔ | ✔ |
AQN | ✘ | ✔ |
ARX | ✘ | ✔ |
ATD.B | ✔ | ✔ |
BAM.A | ✔ | ✔ |
BBD.B | ✘ | ✔ |
BCE | ✔ | ✔ |
BHC | ✘ | ✔ |
BIP.UN | ✘ | ✔ |
BMO | ✔ | ✔ |
BNS | ✔ | ✔ |
BPY.UN | ✘ | ✔ |
BTO | ✘ | ✔ |
CAE | ✘ | ✔ |
CAR.UN | ✘ | ✔ |
CCL.B | ✘ | ✔ |
CCO | ✘ | ✔ |
CM | ✔ | ✔ |
CNQ | ✔ | ✔ |
CNR | ✔ | ✔ |
CP | ✔ | ✔ |
CPG | ✘ | ✔ |
CRON | ✘ | ✔ |
CSU | ✔ | ✔ |
CTC.A | ✔ | ✔ |
CVE | ✔ | ✔ |
DGC | ✘ | ✔ |
DOL | ✔ | ✔ |
ECA | ✔ | ✔ |
EMA | ✔ | ✔ |
EMP.A | ✘ | ✔ |
ENB | ✔ | ✔ |
FFH | ✘ | ✔ |
FM | ✔ | ✔ |
FNV | ✔ | ✔ |
FTS | ✔ | ✔ |
G | ✘ | ✔ |
GIB.A | ✔ | ✔ |
GIL | ✘ | ✔ |
GOOS | ✘ | ✔ |
GWO | ✘ | ✔ |
H | ✘ | ✔ |
HEXO | ✘ | ✔ |
HOD | ✘ | ✔ |
HOU | ✘ | ✔ |
HSE | ✘ | ✔ |
HXT | ✘ | ✔ |
IFC | ✔ | ✔ |
IMO | ✘ | ✔ |
IPL | ✔ | ✔ |
K | ✘ | ✔ |
KEY | ✘ | ✔ |
KL | ✔ | ✔ |
L | ✔ | ✔ |
LUN | ✘ | ✔ |
MEG | ✘ | ✔ |
MFC | ✔ | ✔ |
MG | ✔ | ✔ |
MRU | ✘ | ✔ |
NA | ✔ | ✔ |
NTR | ✔ | ✔ |
OTEX | ✘ | ✔ |
PKI | ✘ | ✔ |
POW | ✔ | ✔ |
PPL | ✔ | ✔ |
PSA | ✘ | ✔ |
PWF | ✘ | ✔ |
QBR.B | ✘ | ✔ |
QSR | ✔ | ✔ |
RCI.B | ✔ | ✔ |
REI.UN | ✘ | ✔ |
RY | ✔ | ✔ |
SAP | ✘ | ✔ |
SHOP | ✔ | ✔ |
SJR.B | ✘ | ✔ |
SLF | ✔ | ✔ |
SNC | ✘ | ✔ |
SU | ✔ | ✔ |
T | ✔ | ✔ |
TD | ✔ | ✔ |
TECK.B | ✔ | ✔ |
TRI | ✔ | ✔ |
TRP | ✔ | ✔ |
VET | ✘ | ✔ |
WCN | ✔ | ✔ |
WEED | ✔ | ✔ |
WFT | ✘ | ✔ |
WJA | ✘ | ✔ |
WN | ✘ | ✔ |
WPM | ✔ | ✔ |
XIC | ✘ | ✔ |
XIU | ✔ | ✔ |
XSP | ✘ | ✔ |
ZEB | ✘ | ✔ |
ZSP | ✘ | ✔ |
US
Ticker | Free Plan | Starter Plan |
---|---|---|
AAPL | ✔ | ✔ |
ABBV | ✘ | ✔ |
ADBE | ✘ | ✔ |
AGG | ✘ | ✔ |
AGN | ✘ | ✔ |
AMD | ✔ | ✔ |
AMGN | ✘ | ✔ |
AMZN | ✔ | ✔ |
AVGO | ✘ | ✔ |
BA | ✔ | ✔ |
BABA | ✔ | ✔ |
BAC | ✔ | ✔ |
BKNG | ✘ | ✔ |
BMY | ✘ | ✔ |
BRK/B | ✘ | ✔ |
C | ✔ | ✔ |
CAT | ✘ | ✔ |
CELG | ✘ | ✔ |
CMCSA | ✘ | ✔ |
CRM | ✘ | ✔ |
CSCO | ✔ | ✔ |
CVS | ✘ | ✔ |
CVX | ✘ | ✔ |
DHR | ✘ | ✔ |
DIA | ✘ | ✔ |
DIS | ✔ | ✔ |
EEM | ✔ | ✔ |
EFA | ✔ | ✔ |
EWZ | ✔ | ✔ |
FB | ✔ | ✔ |
FXI | ✔ | ✔ |
GDX | ✔ | ✔ |
GDXJ | ✔ | ✔ |
GE | ✘ | ✔ |
GLD | ✔ | ✔ |
GOOG | ✔ | ✔ |
GOOGL | ✔ | ✔ |
GS | ✘ | ✔ |
HD | ✔ | ✔ |
HYG | ✔ | ✔ |
IBM | ✘ | ✔ |
IEMG | ✘ | ✔ |
INTC | ✔ | ✔ |
IVV | ✔ | ✔ |
IWM | ✔ | ✔ |
IYR | ✘ | ✔ |
JNJ | ✔ | ✔ |
JNK | ✘ | ✔ |
JPM | ✔ | ✔ |
KO | ✘ | ✔ |
LLY | ✘ | ✔ |
LQD | ✔ | ✔ |
MA | ✔ | ✔ |
MCD | ✘ | ✔ |
MDT | ✘ | ✔ |
MMM | ✘ | ✔ |
MRK | ✘ | ✔ |
MSFT | ✔ | ✔ |
MU | ✔ | ✔ |
NFLX | ✔ | ✔ |
NKE | ✘ | ✔ |
NOW | ✘ | ✔ |
NVDA | ✔ | ✔ |
ORCL | ✘ | ✔ |
PEP | ✘ | ✔ |
PFE | ✔ | ✔ |
PG | ✔ | ✔ |
PYPL | ✘ | ✔ |
QCOM | ✔ | ✔ |
QQQ | ✔ | ✔ |
ROKU | ✔ | ✔ |
SBUX | ✘ | ✔ |
SHOP | ✘ | ✔ |
SMH | ✘ | ✔ |
SPY | ✔ | ✔ |
SQ | ✘ | ✔ |
T | ✔ | ✔ |
TLT | ✔ | ✔ |
TQQQ | ✔ | ✔ |
TSLA | ✔ | ✔ |
TWTR | ✘ | ✔ |
TXN | ✘ | ✔ |
UNH | ✔ | ✔ |
UNP | ✘ | ✔ |
V | ✔ | ✔ |
VOO | ✘ | ✔ |
VWO | ✘ | ✔ |
VXX | ✘ | ✔ |
VZ | ✘ | ✔ |
WFC | ✔ | ✔ |
WMT | ✘ | ✔ |
XLE | ✘ | ✔ |
XLF | ✔ | ✔ |
XLI | ✘ | ✔ |
XLK | ✔ | ✔ |
XLP | ✘ | ✔ |
XLU | ✔ | ✔ |
XLV | ✔ | ✔ |
XOM | ✔ | ✔ |
XOP | ✘ | ✔ |
Billing
Clients will receive a monthly bill and invoice statement at the end of the month. For example, Invoice for API usage in September will be made available on November 1.
Google Sheets Add-on
Subscribe to API
Sign up at hub.tmxanalytics.com/signup and subscribe to TMX Grapevine API
Install API to Sheets
Select Extensions tab > Add-ons > Get add-ons
Search “API to Sheets”
Click “Install”
Setup API from Google Sheets
Once installed, select the Extensions tab > API to Sheets > Create New API Request
Add in the following details to configure your API request:
Select POST method
Enter our API URL Path https://analyticsapi.tmxanalytics.com/v1/ followed by the geography (/ca for Canada, /us for US), and specific table name you would like to access.
In the body section, enter any optional parameters to define your request. Note that our API allows for a start date, end date, specific symbols or ALL_SYMBOLS
In the Request Headers section, enter “bearer” followed by your Authentication Token. This is found when you login to hub.tmxanalytics.com > API Usage tab > Authentication Token > enter the same password you used to login to refresh your token > submit this token expires after 1 hour and must be refreshed each time you use the API
Your x-api-key can also be found on the same location. this key remains fixed for each client
Select offset for Pagination Type and pageafter name
Select the sheet you would like to display the output in, or select Set Current
Select Save. Your API Request will be saved and can be accessed at a later date
Help and More Information
Note at any time you can refer to our TMX Grapevine API documentation website at https://docs.tmxanalytics.com for further details on the API design, sample code snippets, and Error Codes.
If you experience any issues, please contact TMX Support for assistance. You can also use the help icon in the bottom right corner to email our support team directly from hub.tmxanalytics.com.
Default
options__v1_apiautomation
Code samples
require 'rest-client'
require 'json'
result = RestClient.options 'https://analyticsapi.tmxanalytics.com/v1/apiautomation',
params: {
}
p JSON.parse(result)
import requests
r = requests.options('https://analyticsapi.tmxanalytics.com/v1/apiautomation')
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/apiautomation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("OPTIONS");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X OPTIONS https://analyticsapi.tmxanalytics.com/v1/apiautomation
fetch('https://analyticsapi.tmxanalytics.com/v1/apiautomation',
{
method: 'OPTIONS'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
OPTIONS https://analyticsapi.tmxanalytics.com/v1/apiautomation HTTP/1.1
Host: analyticsapi.tmxanalytics.com
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("OPTIONS", "https://analyticsapi.tmxanalytics.com/v1/apiautomation", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
OPTIONS /v1/apiautomation
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
post__v1_apiautomation
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/apiautomation',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/apiautomation', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/apiautomation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/apiautomation \
-H 'Content-Type: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"billingTag": "string",
"columnDesc": {},
"countryCode": "us",
"docDescription": "string",
"endPoint": "string",
"formatFields": {},
"fromBranch": "string",
"licensedFields": [
"string"
],
"orderByFields": {
"asc": [
"string"
],
"desc": [
"string"
]
},
"pageLimit": 0,
"productName": "string",
"requestParams": {
"column": "string",
"condition": "gt",
"description": "string",
"pattern": "string",
"required": true,
"type": "string"
},
"requestResponseDescription": "string",
"requestResponsePrefix": "string",
"requestResponseTitle": "string",
"sfConfig": {
"database": "string",
"schema": "string",
"warehouse": "string"
},
"subProductName": "string",
"tableName": "string"
}';
const headers = {
'Content-Type':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/apiautomation',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/apiautomation HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/apiautomation", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/apiautomation
Body parameter
{
"billingTag": "string",
"columnDesc": {},
"countryCode": "us",
"docDescription": "string",
"endPoint": "string",
"formatFields": {},
"fromBranch": "string",
"licensedFields": [
"string"
],
"orderByFields": {
"asc": [
"string"
],
"desc": [
"string"
]
},
"pageLimit": 0,
"productName": "string",
"requestParams": {
"column": "string",
"condition": "gt",
"description": "string",
"pattern": "string",
"required": true,
"type": "string"
},
"requestResponseDescription": "string",
"requestResponsePrefix": "string",
"requestResponseTitle": "string",
"sfConfig": {
"database": "string",
"schema": "string",
"warehouse": "string"
},
"subProductName": "string",
"tableName": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | apiAutomationRequestModel | true | none |
billingTag | body | string | false | Specifies the billing tag to be mapped for the data API |
columnDesc | body | object | false | Specifies the description for each attribute in the response model, It will be displayed in the response schema for each field. Its an object with one or more key value pair |
countryCode | body | string | false | Country code |
docDescription | body | string | true | Specifies the description for the data api, This will be displayed in the documentation website |
endPoint | body | string | true | Data API will be exposed with this end point for the given table name |
formatFields | body | object | false | Specifies the format to be applied on the column while fetching from the snowflake database. Its an object, It can have one or more key value pair |
fromBranch | body | string | true | Specifies the branch to be used to cut the new branch, Default is prod branch |
licensedFields | body | [string] | false | Specifies which column in the table to be allowed only for the licensed users, Its array of values |
orderByFields | body | object | false | Specifies the columns to be used to sort the response |
» asc | body | [string] | false | none |
» desc | body | [string] | false | none |
pageLimit | body | integer | false | Specifies the number of results returned in the data api response(Default 1000) |
productName | body | string | true | This is used in the billing authorizer to validate the subscription of the user while accessing the data api, Also Folders will be created with this name, all the sub products services will be placed under this folder. Folder name might not be same as product name if space or any special characters provided. |
requestParams | body | object | false | Specifies the attribute/request parameter to be used in the request models, These attributes actually define the request params for the data api we are creating with automation script. It's an Object. |
» column | body | string | false | Specifies which column in the table to be used to filter the record.This will be used to write the query condition in the lambda file.User input for this “Key” on the data api will be filtered with this column while querying the table |
» condition | body | string | false | Specifies which operators to be used in the query filter on the table column with the user input. |
» description | body | string | false | Specifies the be used in the request model for the property |
» pattern | body | string | false | Specifies the regex pattern to be used in the request model to validate the user input by the API gateway |
» required | body | boolean | false | Specifies fields to be marked as mandatory or optional in the request model. |
» type | body | string | false | Specifies data type for the user input |
requestResponseDescription | body | string | true | Provides the descriptions for the request and response model |
requestResponsePrefix | body | string | false | Request and Response model file will created with this name, if not provided it will use the “subProduct Name+Country Code” for the file name |
requestResponseTitle | body | string | true | Provides the value for the title attribute for the request and response model. |
sfConfig | body | object | false | Specifies the schema, warehouse and database details |
» database | body | string | false | none |
» schema | body | string | false | none |
» warehouse | body | string | false | none |
subProductName | body | string | true | This name will be used with combination of country code to create the lambda function and cloudformation stack and service folder |
tableName | body | string | true | Specifies the table name, Data API will fetch the record from this table and return the response |
Enumerated Values
Parameter | Value |
---|---|
countryCode | us |
countryCode | ca |
» condition | gt |
» condition | gte |
» condition | lt |
» condition | lte |
» condition | eq |
» type | string |
» type | integer |
» type | boolean |
» type | array |
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
422 | Unprocessable Entity | 422 response | None |
500 | Internal Server Error | 500 response | None |
options__v1_ca_investorflows
Code samples
require 'rest-client'
require 'json'
result = RestClient.options 'https://analyticsapi.tmxanalytics.com/v1/ca/investorflows',
params: {
}
p JSON.parse(result)
import requests
r = requests.options('https://analyticsapi.tmxanalytics.com/v1/ca/investorflows')
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/investorflows");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("OPTIONS");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X OPTIONS https://analyticsapi.tmxanalytics.com/v1/ca/investorflows
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/investorflows',
{
method: 'OPTIONS'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
OPTIONS https://analyticsapi.tmxanalytics.com/v1/ca/investorflows HTTP/1.1
Host: analyticsapi.tmxanalytics.com
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("OPTIONS", "https://analyticsapi.tmxanalytics.com/v1/ca/investorflows", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
OPTIONS /v1/ca/investorflows
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
post__v1_ca_investorflows
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/investorflows',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/investorflows', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/investorflows");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/investorflows \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/investorflows',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/investorflows HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/investorflows", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/investorflows
Body parameter
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | investorFlowsCaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | cusip |
columns | sedol |
columns | isin |
columns | total_trade_count |
columns | active_buy_trade_count_retail |
columns | active_sell_trade_count_retail |
columns | passive_buy_trade_count_retail |
columns | passive_sell_trade_count_retail |
columns | active_buy_trade_count_nonretail |
columns | active_sell_trade_count_nonretail |
columns | passive_buy_trade_count_nonretail |
columns | passive_sell_trade_count_nonretail |
columns | total_participant_count |
columns | active_buy_participant_count_retail |
columns | active_sell_participant_count_retail |
columns | passive_buy_participant_count_retail |
columns | passive_sell_participant_count_retail |
columns | active_buy_participant_count_nonretail |
columns | active_sell_participant_count_nonretail |
columns | passive_buy_participant_count_nonretail |
columns | passive_sell_participant_count_nonretail |
columns | total_shr_volume |
columns | active_buy_shr_volume_retail |
columns | active_sell_shr_volume_retail |
columns | passive_buy_shr_volume_retail |
columns | passive_sell_shr_volume_retail |
columns | net_shr_volume_retail |
columns | active_buy_shr_volume_nonretail |
columns | active_sell_shr_volume_nonretail |
columns | passive_buy_shr_volume_nonretail |
columns | passive_sell_shr_volume_nonretail |
columns | net_shr_volume_nonretail |
columns | total_value_volume |
columns | active_buy_value_volume_retail |
columns | active_sell_value_volume_retail |
columns | passive_buy_value_volume_retail |
columns | passive_sell_value_volume_retail |
columns | net_value_volume_retail |
columns | active_buy_value_volume_nonretail |
columns | active_sell_value_volume_nonretail |
columns | passive_buy_value_volume_nonretail |
columns | passive_sell_value_volume_nonretail |
columns | net_value_volume_nonretail |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"active_buy_participant_count_nonretail": 0,
"active_buy_participant_count_retail": 0,
"active_buy_shr_volume_nonretail": 0,
"active_buy_shr_volume_retail": 0,
"active_buy_trade_count_nonretail": 0,
"active_buy_trade_count_retail": 0,
"active_buy_value_volume_nonretail": 0,
"active_buy_value_volume_retail": 0,
"active_sell_participant_count_nonretail": 0,
"active_sell_participant_count_retail": 0,
"active_sell_shr_volume_nonretail": 0,
"active_sell_shr_volume_retail": 0,
"active_sell_trade_count_nonretail": 0,
"active_sell_trade_count_retail": 0,
"active_sell_value_volume_nonretail": 0,
"active_sell_value_volume_retail": 0,
"cusip": "string",
"date_string": "string",
"isin": "string",
"net_shr_volume_nonretail": 0,
"net_shr_volume_retail": 0,
"net_value_volume_nonretail": 0,
"net_value_volume_retail": 0,
"passive_buy_participant_count_nonretail": 0,
"passive_buy_participant_count_retail": 0,
"passive_buy_shr_volume_nonretail": 0,
"passive_buy_shr_volume_retail": 0,
"passive_buy_trade_count_nonretail": 0,
"passive_buy_trade_count_retail": 0,
"passive_buy_value_volume_nonretail": 0,
"passive_buy_value_volume_retail": 0,
"passive_sell_participant_count_nonretail": 0,
"passive_sell_participant_count_retail": 0,
"passive_sell_shr_volume_nonretail": 0,
"passive_sell_shr_volume_retail": 0,
"passive_sell_trade_count_nonretail": 0,
"passive_sell_trade_count_retail": 0,
"passive_sell_value_volume_nonretail": 0,
"passive_sell_value_volume_retail": 0,
"sedol": "string",
"symbol": "string",
"total_participant_count": 0,
"total_shr_volume": 0,
"total_trade_count": 0,
"total_value_volume": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | investorFlowsCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
options__v1_userscleanup
Code samples
require 'rest-client'
require 'json'
result = RestClient.options 'https://analyticsapi.tmxanalytics.com/v1/userscleanup',
params: {
}
p JSON.parse(result)
import requests
r = requests.options('https://analyticsapi.tmxanalytics.com/v1/userscleanup')
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/userscleanup");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("OPTIONS");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X OPTIONS https://analyticsapi.tmxanalytics.com/v1/userscleanup
fetch('https://analyticsapi.tmxanalytics.com/v1/userscleanup',
{
method: 'OPTIONS'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
OPTIONS https://analyticsapi.tmxanalytics.com/v1/userscleanup HTTP/1.1
Host: analyticsapi.tmxanalytics.com
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("OPTIONS", "https://analyticsapi.tmxanalytics.com/v1/userscleanup", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
OPTIONS /v1/userscleanup
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
post__v1_userscleanup
Code samples
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/userscleanup',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/userscleanup', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/userscleanup");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/userscleanup \
-H 'Authorization: API_KEY'
const headers = {
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/userscleanup',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/userscleanup HTTP/1.1
Host: analyticsapi.tmxanalytics.com
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/userscleanup", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/userscleanup
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
409 | Conflict | 409 response | None |
500 | Internal Server Error | 500 response | None |
Access APIs
Authenticate
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/authn',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/authn', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/authn");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/authn \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY'
const inputBody = '{
"email": "string",
"password": "string"
}';
const headers = {
'Content-Type':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/authn',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/authn HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/authn", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/authn
Allows users to generate the API Authorization token by passing valid user credentials
Body parameter
{
"email": "string",
"password": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | authenticateRequestv1 | true | none |
body | string | true | User email as registered with TMX Analytics | |
password | body | string | true | User password |
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
424 | Failed Dependency | 424 response | None |
500 | Internal Server Error | 500 response | None |
Change Password
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/changepassword',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/changepassword', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/changepassword");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/changepassword \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY'
const inputBody = '{
"confirmPassword": "string",
"email": "string",
"newPassword": "string",
"oldPassword": "string"
}';
const headers = {
'Content-Type':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/changepassword',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/changepassword HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/changepassword", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/changepassword
Allows users to change the password
Body parameter
{
"confirmPassword": "string",
"email": "string",
"newPassword": "string",
"oldPassword": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | changePasswordRequestv1 | true | none |
confirmPassword | body | string | true | Re-enter new password |
body | string | true | User Email Id | |
newPassword | body | string | true | New password must be at least 8 characters in length or longer and must contain 1 lowercase alphabetical character, 1 uppercase alphabetical character, 1 numeric character, one special character |
oldPassword | body | string | true | Old password |
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
424 | Failed Dependency | 424 response | None |
500 | Internal Server Error | 500 response | None |
Data Availability
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/dataavailability',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/dataavailability', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/dataavailability");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/dataavailability \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
const inputBody = '{
"apiName": [
"OHLC CA"
],
"pageafter": 0
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/dataavailability',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/dataavailability HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/dataavailability", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/dataavailability
Provides the most recent business date for which data is available within each API
Body parameter
{
"apiName": [
"OHLC CA"
],
"pageafter": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | dataavailabilityCaRequestv1 | true | none |
apiName | body | [string] | true | Name of specific API or "all" |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
Enumerated Values
Parameter | Value |
---|---|
apiName | OHLC CA |
apiName | Broker Liquidity CA |
apiName | Trades - 1min CA |
apiName | Trades - 1sec CA |
apiName | Trades - 1min US |
apiName | Investor Flows CA |
apiName | Quotes - 1min CA |
apiName | Quotes - 1sec CA |
apiName | Quotes - 1min US |
apiName | Quotes - 1sec US |
apiName | TAQ NBBO CA |
apiName | TAQ NBBO US |
apiName | Advanced Daily Stats CA |
apiName | Advanced Daily Stats US |
apiName | Basic Daily Stats CA |
apiName | Basic Daily Stats US |
apiName | Daily Stats CA |
apiName | Daily Stats US |
apiName | Global Symbols |
apiName | Global Symbols Delta |
apiName | Issuers |
apiName | MX Daily Stats |
apiName | Liquidity Analytics CA |
apiName | TSX/V Daily Stats |
apiName | Broker Summary CA |
apiName | all |
Example responses
200 Response
{
"data": [
{
"apiName": "string",
"lastLoadDate": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | dataavailabilityCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Forgot Password
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/forgotpassword',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/forgotpassword', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/forgotpassword");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/forgotpassword \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY'
const inputBody = '{
"email": "string"
}';
const headers = {
'Content-Type':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/forgotpassword',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/forgotpassword HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/forgotpassword", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/forgotpassword
Sends a reset password email to the user
Body parameter
{
"email": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | forgotPasswordRequestv1 | true | none |
body | string | true | Email for forgot password |
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Revoke Token
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'x-api-key' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/revoke',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'x-api-key': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/revoke', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/revoke");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/revoke \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY'
const inputBody = '{
"token": "string",
"type": "string"
}';
const headers = {
'Content-Type':'application/json',
'x-api-key':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/revoke',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/revoke HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/revoke", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/revoke
Revokes the token for the user
Body parameter
{
"token": "string",
"type": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | revokeRequestv1 | true | none |
token | body | string | true | access_token or refresh_token value that needs to be revoked |
type | body | string | true | access_token or refresh_token |
Example responses
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | None |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Essential Analytics for Equities
Advanced Daily Stats CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/advanceddailystats',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/advanceddailystats', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/advanceddailystats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/advanceddailystats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/advanceddailystats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/advanceddailystats HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/advanceddailystats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/advanceddailystats
Contains advanced daily statistics such as seconday close price, avgerage top of the book bid/ask volume, quoted spreads, effective spreads and trading volumes/count/value metrics across Canadian and US venues. Metrics pertaining to Canada - Covers trading activity across all Canadian marketplaces. Symbol coverage extends to all Canadian symbols as well.
Body parameter
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | advanceddailystatsCaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | us_symbol |
columns | secondaryclose |
columns | avgbidvol |
columns | avgaskvol |
columns | avg_sprd_cent |
columns | avg_sprd_bps |
columns | effective_sprd_cent |
columns | effective_sprd_bps |
columns | trade_count_ca |
columns | daily_volume_ca |
columns | daily_trading_value_ca |
columns | trade_count_us |
columns | daily_volume_us |
columns | daily_trading_value_us |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"avg_sprd_bps": 0,
"avg_sprd_cent": 0,
"avgaskvol": 0,
"avgbidvol": 0,
"daily_trading_value_ca": 0,
"daily_trading_value_us": 0,
"daily_volume_ca": 0,
"daily_volume_us": 0,
"date_string": "string",
"effective_sprd_bps": 0,
"effective_sprd_cent": 0,
"secondaryclose": 0,
"symbol": "string",
"trade_count_ca": 0,
"trade_count_us": 0,
"us_symbol": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | advanceddailystatsCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Basic Daily Stats CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystatsall',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystatsall', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystatsall");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystatsall \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystatsall',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystatsall HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystatsall", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/basicdailystatsall
Contains essential daily statistics such as open, high, low, close, trade count aggregations, trade volume aggregations, trade value aggregations, vwap, volatility metrics, shares outstanding and market capitalization. Covers trading activity across all Canadian marketplaces. Symbol coverage extends to all Canadian symbols as well.
Body parameter
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | basicdailystatsallCaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | first_observed_price |
columns | intraday_high |
columns | intraday_low |
columns | last_observed_price |
columns | london_4pm_price |
columns | total_trade_count |
columns | total_daily_volume |
columns | total_daily_value |
columns | total_primary_exchange_volume |
columns | avg_30day_trade_count |
columns | avg_30day_daily_volume |
columns | avg_30day_daily_value |
columns | twap_30day |
columns | twap_60day |
columns | volatility30_pct |
columns | volatility60_pct |
columns | shares_outstanding |
columns | mkt_cap |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"avg_30day_daily_value": 0,
"avg_30day_daily_volume": 0,
"avg_30day_trade_count": 0,
"date_string": "string",
"first_observed_price": 0,
"intraday_high": 0,
"intraday_low": 0,
"last_observed_price": 0,
"london_4pm_price": 0,
"mkt_cap": 0,
"shares_outstanding": 0,
"symbol": "string",
"total_daily_value": 0,
"total_daily_volume": 0,
"total_primary_exchange_volume": 0,
"total_trade_count": 0,
"twap_30day": 0,
"twap_60day": 0,
"volatility30_pct": 0,
"volatility60_pct": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | basicdailystatsallCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Daily Stats CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/dailystats',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/dailystats', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/dailystats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/dailystats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/dailystats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/dailystats HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/dailystats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/dailystats
Contains daily statistics such as open, high, low, close, total volume, volume_moo, volume_moc, volume_dark, vwap, volatility30_pct, volatility60_pct.Covers trading activity across all Canadian marketplaces. Symbol coverage extends to all Canadian symbols as well.
Body parameter
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | dailystatsCaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | volume_block |
columns | volume_moo |
columns | volume_moc |
columns | volume_odd_lot |
columns | volume_dark |
columns | total_adjvolume |
columns | total_adjvalue |
columns | total_adjcount |
columns | intraday_high |
columns | intraday_low |
columns | first_observed_price |
columns | fop_venue |
columns | fop_time_eastern |
columns | last_observed_price |
columns | lop_venue |
columns | lop_time_eastern |
columns | avg_advolume30 |
columns | vwap30 |
columns | vwap60 |
columns | intraday_volatility_pct |
columns | volume_cross |
columns | volume_pre_market |
columns | volume_post_market |
columns | total_trade_count |
columns | total_daily_volume |
columns | total_daily_value |
columns | total_primary_exchange_volume |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"avg_advolume30": 0,
"date_string": "string",
"first_observed_price": 0,
"fop_time_eastern": "string",
"fop_venue": "string",
"intraday_high": 0,
"intraday_low": 0,
"intraday_volatility_pct": 0,
"last_observed_price": 0,
"lop_time_eastern": "string",
"lop_venue": "string",
"symbol": "string",
"total_adjcount": 0,
"total_adjvalue": 0,
"total_adjvolume": 0,
"total_daily_value": 0,
"total_daily_volume": 0,
"total_primary_exchange_volume": 0,
"total_trade_count": 0,
"volume_block": 0,
"volume_cross": 0,
"volume_dark": 0,
"volume_moc": 0,
"volume_moo": 0,
"volume_odd_lot": 0,
"volume_post_market": 0,
"volume_pre_market": 0,
"vwap30": 0,
"vwap60": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | dailystatsCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Liquidity Analytics CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/liquidityanalytics',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/liquidityanalytics', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/liquidityanalytics");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/liquidityanalytics \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/liquidityanalytics',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/liquidityanalytics HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/liquidityanalytics", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/liquidityanalytics
Provides a market-wide view of the total displayed (onbook) liquidity available by symbol each day at multiple price levels beyond the top of book. The dataset aggregates the consolidated market-wide orderbook to build these calculations and is meant to provide a robust input into assessing market-wide quoted liquidity and determining an appropriate order/trade execution strategy. It can also be used to help detect when material changes occurr to a symbol's liquidity profile
Body parameter
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | liquidityanalyticsCaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | venue |
columns | pct_time_bid_10b_deep |
columns | bidsize10b_impact |
columns | bidvalue10b_impact |
columns | pct_time_bid_25b_deep |
columns | bidsize25b_impact |
columns | bidvalue25b_impact |
columns | pct_time_ask_10b_deep |
columns | asksize10b_impact |
columns | askvalue10b_impact |
columns | pct_time_ask_25b_deep |
columns | asksize25b_impact |
columns | askvalue25b_impact |
columns | pct_time_bidask_25k_deep |
columns | sprd_25k_bps |
columns | pct_time_bidask_50k_deep |
columns | sprd_50k_bps |
columns | pct_time_bidask_100k_deep |
columns | sprd_100k_bps |
columns | pct_time_bidask_200k_deep |
columns | sprd_200k_bps |
columns | pct_time_bidask_500k_deep |
columns | sprd_500k_bps |
columns | pct_time_bidask_1m_deep |
columns | sprd_1m_bps |
columns | time_wgt_bidvalue10b_impact_component_score |
columns | time_wgt_bidvalue25b_impact_component_score |
columns | time_wgt_askvalue10b_impact_component_score |
columns | time_wgt_askvalue25b_impact_component_score |
columns | time_wgt_sprd_25k_bps_component_score |
columns | time_wgt_sprd_50k_bps_component_score |
columns | time_wgt_sprd_100k_bps_component_score |
columns | time_wgt_sprd_200k_bps_component_score |
columns | time_wgt_sprd_500k_bps_component_score |
columns | time_wgt_sprd_1m_bps_component_score |
columns | liquidity_score |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"asksize10b_impact": 0,
"asksize25b_impact": 0,
"askvalue10b_impact": 0,
"askvalue25b_impact": 0,
"bidsize10b_impact": 0,
"bidsize25b_impact": 0,
"bidvalue10b_impact": 0,
"bidvalue25b_impact": 0,
"date_string": "string",
"liquidity_score": 0,
"pct_time_ask_10b_deep": 0,
"pct_time_ask_25b_deep": 0,
"pct_time_bid_10b_deep": 0,
"pct_time_bid_25b_deep": 0,
"pct_time_bidask_100k_deep": 0,
"pct_time_bidask_1m_deep": 0,
"pct_time_bidask_200k_deep": 0,
"pct_time_bidask_25k_deep": 0,
"pct_time_bidask_500k_deep": 0,
"pct_time_bidask_50k_deep": 0,
"sprd_100k_bps": 0,
"sprd_1m_bps": 0,
"sprd_200k_bps": 0,
"sprd_25k_bps": 0,
"sprd_500k_bps": 0,
"sprd_50k_bps": 0,
"symbol": "string",
"time_wgt_askvalue10b_impact_component_score": 0,
"time_wgt_askvalue25b_impact_component_score": 0,
"time_wgt_bidvalue10b_impact_component_score": 0,
"time_wgt_bidvalue25b_impact_component_score": 0,
"time_wgt_sprd_100k_bps_component_score": 0,
"time_wgt_sprd_1m_bps_component_score": 0,
"time_wgt_sprd_200k_bps_component_score": 0,
"time_wgt_sprd_25k_bps_component_score": 0,
"time_wgt_sprd_500k_bps_component_score": 0,
"time_wgt_sprd_50k_bps_component_score": 0,
"venue": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | liquidityanalyticsCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Liquidity Summary CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/liquiditysummary',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/liquiditysummary', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/liquiditysummary");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/liquiditysummary \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"date_string"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/liquiditysummary',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/liquiditysummary HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/liquiditysummary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/liquiditysummary
Contains pre-calculated spread with the following specifications: 1) Metrics are calculated using the consolidated order book from all Canadian venues 2) The bid/ask is calculated as the volume weighted average price that would be realized assuming the execution of a $50,000 marketable sell/buy order 3) The effective spread is calculated at each one-second interval between 9:45 - 15:45 ET 4) The reported average bid-ask spread is computed by taking the time-weighted average of all one second effective spreads for each day. Covers trading activity across all Canadian marketplaces. Symbol coverage extends to all Canadian symbols as well.
Body parameter
{
"columns": [
"date_string"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | liquiditySummaryCaRequest | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | date_string |
columns | symbol |
columns | spread |
Example responses
200 Response
{
"data": [
{
"date_string": "string",
"spread": 0,
"symbol": "string"
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | liquiditySummaryCaResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
TSX Daily Stats CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/tsxdailystats',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/tsxdailystats', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/tsxdailystats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/tsxdailystats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"exchange"
],
"enddate": "string",
"exchange": "string",
"pageafter": 0,
"startdate": "string",
"stat": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/tsxdailystats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/tsxdailystats HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/tsxdailystats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/tsxdailystats
Contains premium TSX/V specific daily statistics such as close price, open price, time of price movement extension, time of market state change and time of market imbalance message. Covers trading activity across TSX/TSXV and Alpha. Symbol coverage extends to all TSX/V listed symbols.
Body parameter
{
"columns": [
"exchange"
],
"enddate": "string",
"exchange": "string",
"pageafter": 0,
"startdate": "string",
"stat": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | tsxdailystatsCaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
exchange | body | string | false | Identifies the venue for the applicable statistics |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. start date of 2020-09-01 will include data from 2020-09-01 to enddate |
stat | body | string | true | Identifies the various statistics that can be obtained. Possible values are available in Reference Guide for stat for TSX Daily Stats CA |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Reference Guide for stat for TSX Daily Stats CA
stat | keyvalue | value | time | value2 | value3 |
---|---|---|---|---|---|
ccp | <symbol > |
Close price for symbol on associated exchange | Market close time for symbol on associated exchange | N/A | N/A |
cop | <symbol > |
Open price for symbol on associated exchange | Market open time for symbol on associated exchange | Boardlot size of symbol | N/A |
pme | <symbol > |
N/A | Time of price movement extension on associated exchange | N/A | N/A |
msc | <symbol > |
Market state on associated exchange | Time of market state change on associated exchange | N/A | N/A |
moc | <symbol > |
Imbalance volume on associated exchange | Time of market imbalance message on associated exchange | Imbalance side on associated exchange | Imbalance price on associated exchange |
Enumerated Values
Parameter | Value |
---|---|
columns | exchange |
columns | year |
columns | stat |
columns | key_value |
columns | time |
columns | time_nanos |
columns | value |
columns | value2 |
columns | value3 |
columns | value4_to_n |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"date_string": "string",
"exchange": "string",
"key_value": "string",
"stat": "string",
"time": "string",
"time_nanos": 0,
"value": "string",
"value2": "string",
"value3": "string",
"value4_to_n": [
"string"
],
"year": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | tsxdailystatsCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Advanced Daily Stats US
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/us/advanceddailystats',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/us/advanceddailystats', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/us/advanceddailystats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/us/advanceddailystats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/us/advanceddailystats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/us/advanceddailystats HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/us/advanceddailystats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/us/advanceddailystats
Contains advanced daily statistics such as seconday close price, avgerage top of the book bid/ask volume, quoted spreads, effective spreads and trading volumes/count/value metrics across Canadian and US venues. Metrics pertaining to Canada - Covers trading activity across all Canadian marketplaces. Symbol coverage extends to all Canadian symbols as well.
Body parameter
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | advanceddailystatsUsRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | ca_symbol |
columns | secondaryclose |
columns | avgbidvol |
columns | avgaskvol |
columns | avg_sprd_cent |
columns | avg_sprd_bps |
columns | effective_sprd_cent |
columns | effective_sprd_bps |
columns | trade_count_ca |
columns | daily_volume_ca |
columns | daily_trading_value_ca |
columns | trade_count_us |
columns | daily_volume_us |
columns | daily_trading_value_us |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"avg_sprd_bps": 0,
"avg_sprd_cent": 0,
"avgaskvol": 0,
"avgbidvol": 0,
"ca_symbol": "string",
"daily_trading_value_ca": 0,
"daily_trading_value_us": 0,
"daily_volume_ca": 0,
"daily_volume_us": 0,
"date_string": "string",
"effective_sprd_bps": 0,
"effective_sprd_cent": 0,
"secondaryclose": 0,
"symbol": "string",
"trade_count_ca": 0,
"trade_count_us": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | advanceddailystatsUsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Basic Daily Stats US
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/us/basicdailystatsall',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/us/basicdailystatsall', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/us/basicdailystatsall");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/us/basicdailystatsall \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/us/basicdailystatsall',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/us/basicdailystatsall HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/us/basicdailystatsall", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/us/basicdailystatsall
Contains essential daily statistics such as open, high, low, close, trade count aggregations, trade volume aggregations, trade value aggregations, vwap, volatility metrics, shares outstanding and market capitalization. Covers trading activity across all US marketplaces. Symbol coverage extends to all US symbols as well.
Body parameter
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | basicdailystatsallUsRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | first_observed_price |
columns | intraday_high |
columns | intraday_low |
columns | last_observed_price |
columns | london_4pm_price |
columns | total_trade_count |
columns | total_daily_volume |
columns | total_daily_value |
columns | avg_30day_trade_count |
columns | avg_30day_daily_volume |
columns | avg_30day_daily_value |
columns | TWAP_30day |
columns | TWAP_60day |
columns | volatility30_pct |
columns | volatility60_pct |
columns | shares_outstanding |
columns | mkt_cap |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"avg_30day_daily_value": 0,
"avg_30day_daily_volume": 0,
"avg_30day_trade_count": 0,
"date_string": "string",
"first_observed_price": "string",
"intraday_high": "string",
"intraday_low": "string",
"last_observed_price": "string",
"london_4pm_price": "string",
"mkt_cap": 0,
"shares_outstanding": 0,
"symbol": "string",
"total_daily_value": 0,
"total_daily_volume": 0,
"total_trade_count": 0,
"twap_30day": "string",
"twap_60day": "string",
"volatility30_pct": "string",
"volatility60_pct": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | basicdailystatsallUsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Daily Stats US
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/us/dailystats',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/us/dailystats', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/us/dailystats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/us/dailystats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/us/dailystats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/us/dailystats HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/us/dailystats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/us/dailystats
Contains daily statistics such as open, high, low, close, total volume, volume_moo, volume_moc, vwap, volatility30_pct, volatility60_pct. Covers trading activity across all US marketplaces. Symbol coverage extends to all US symbols as well
Body parameter
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | dailystatsUsRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | volume_block |
columns | volume_moo |
columns | volume_moc |
columns | volume_odd_lot |
columns | total_adjvolume |
columns | total_adjvalue |
columns | total_adjcount |
columns | intraday_high |
columns | intraday_low |
columns | first_observed_price |
columns | FOP_venue |
columns | FOP_time_eastern |
columns | last_observed_price |
columns | LOP_venue |
columns | LOP_time_eastern |
columns | avg_ADVolume30 |
columns | vwap30 |
columns | vwap60 |
columns | intraday_volatility_pct |
columns | volume_cross |
columns | volume_pre_market |
columns | volume_post_market |
columns | total_trade_count |
columns | total_daily_volume |
columns | total_daily_value |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"avg_advolume30": 0,
"date_string": "string",
"first_observed_price": 0,
"fop_time_eastern": "string",
"fop_venue": "string",
"intraday_high": 0,
"intraday_low": 0,
"intraday_volatility_pct": 0,
"last_observed_price": 0,
"lop_time_eastern": "string",
"lop_venue": "string",
"symbol": "string",
"total_adjcount": 0,
"total_adjvalue": 0,
"total_adjvolume": 0,
"total_daily_value": 0,
"total_daily_volume": 0,
"total_trade_count": 0,
"volume_block": 0,
"volume_cross": 0,
"volume_moc": 0,
"volume_moo": 0,
"volume_odd_lot": 0,
"volume_post_market": 0,
"volume_pre_market": 0,
"vwap30": 0,
"vwap60": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | dailystatsUsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Equity Intraday Trades
OHLC CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystats',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystats', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"first_observed_price"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystats HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/basicdailystats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/basicdailystats
Essential daily statistics such as open, high, low, close. Covers trading activity across all Canadian marketplaces. Symbol coverage extends to all Canadian symbols as well
Body parameter
{
"columns": [
"first_observed_price"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | basicdailystatsCaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | first_observed_price |
columns | last_observed_price |
columns | intraday_high |
columns | intraday_low |
columns | symbol |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"date_string": "string",
"first_observed_price": 0,
"intraday_high": 0,
"intraday_low": 0,
"last_observed_price": 0,
"symbol": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | basicdailystatsCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
404 | Not Found | 404 response | None |
409 | Conflict | 409 response | None |
500 | Internal Server Error | 500 response | None |
Trades - 1min CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1min',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1min', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1min");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1min \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1min',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1min HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1min", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/tradebar1min
Canadian trades data from all marketplaces aggregated in one minute bars with metrics such as open, high, low, close, vwap, number of trades excluding blocks etc.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | tradebar1minCaRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. The minute bars format is HHMM. Example: 11:05 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. The minute bars format is HHMM. Example: 11:04 |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | barstarttime |
columns | symbol |
columns | firsttradeprice |
columns | hightradeprice |
columns | lowtradeprice |
columns | lasttradeprice |
columns | vwap |
columns | vwapexint |
columns | vwapexblock |
columns | volume |
columns | volumeexint |
columns | volumeexblock |
columns | value |
columns | valueexint |
columns | valueexblock |
columns | numtrades |
columns | numtradesexint |
columns | numtradesexblock |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"barstarttime": "string",
"date_string": "string",
"firsttradeprice": 0,
"highbidprice": 0,
"lasttradeprice": "string",
"lowtradeprice": 0,
"numtrades": 0,
"numtradesexblock": 0,
"numtradesexint": 0,
"symbol": "string",
"value": 0,
"valueexblock": 0,
"valueexint": 0,
"volume": 0,
"volumeexblock": 0,
"volumeexint": 0,
"vwap": 0,
"vwapexblock": 0,
"vwapexint": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | tradebar1minCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
404 | Not Found | 404 response | None |
409 | Conflict | 409 response | None |
500 | Internal Server Error | 500 response | None |
Trades - 1sec CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1sec',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1sec', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1sec");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1sec \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbol": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1sec',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1sec HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/tradebar1sec", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/tradebar1sec
Canadian trades data from all marketplaces aggregated in one second bars with metrics such as open, high, low, close, vwap, number of trades excluding blocks etc.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbol": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | tradebar1secCaRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. For second bars the format is HHMMSS with seconds part being optional. For example, both the values 13:03:02 and 13:03 are acceptable. |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. For second bars the format is HHMMSS with seconds part being optional. For example, both the values 13:04:02 and 13:04 are acceptable. |
symbol | body | string | true | Ticker symbol of the security. For eg. "AC" for Air Canada or "ALL_SYMBOLS" for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | barstarttime |
columns | symbol |
columns | firsttradeprice |
columns | hightradeprice |
columns | lowtradeprice |
columns | lasttradeprice |
columns | vwap |
columns | vwapexint |
columns | vwapexblock |
columns | volume |
columns | volumeexint |
columns | volumeexblock |
columns | value |
columns | valueexint |
columns | valueexblock |
columns | numtrades |
columns | numtradesexint |
columns | numtradesexblock |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"barstarttime": "string",
"date_string": "string",
"firsttradeprice": 0,
"hightradeprice": 0,
"lasttradeprice": 0,
"lowtradeprice": 0,
"numtrades": 0,
"numtradesexblock": 0,
"numtradesexint": 0,
"symbol": "string",
"value": 0,
"valueexblock": 0,
"valueexint": 0,
"volume": 0,
"volumeexblock": 0,
"volumeexint": 0,
"vwap": 0,
"vwapexblock": 0,
"vwapexint": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | tradebar1secCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
404 | Not Found | 404 response | None |
409 | Conflict | 409 response | None |
500 | Internal Server Error | 500 response | None |
Trades - 1min US
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/us/tradebar1min',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/us/tradebar1min', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/us/tradebar1min");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/us/tradebar1min \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"symbol"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/us/tradebar1min',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/us/tradebar1min HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/us/tradebar1min", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/us/tradebar1min
US trades data aggregated in one minute bars with metrics such as open, high, low, close, vwap, number of trades excluding blocks etc.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"symbol"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | tradebar1minUsRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. The minute bars format is HHMM. Example: 11:05 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. The minute bars format is HHMM. Example: 11:04 |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | bin_start |
columns | bin_end |
columns | open |
columns | high |
columns | low |
columns | close |
columns | volume |
columns | volume_ex_block |
columns | vwap |
columns | vwap_ex_block |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"bin_end": "string",
"bin_start": "string",
"close": 0,
"date_string": "string",
"high": "string",
"low": 0,
"open": 0,
"symbol": "string",
"volume": 0,
"volume_ex_block": 0,
"vwap": 0,
"vwap_ex_block": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | tradebar1minUsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
404 | Not Found | 404 response | None |
409 | Conflict | 409 response | None |
500 | Internal Server Error | 500 response | None |
Trades - 1sec US
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/us/tradebar1sec',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/us/tradebar1sec', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/us/tradebar1sec");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/us/tradebar1sec \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"symbol"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/us/tradebar1sec',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/us/tradebar1sec HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/us/tradebar1sec", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/us/tradebar1sec
US trades data from all marketplaces aggregated in one second bars with metrics such as open, high, low, close, vwap, number of trades excluding blocks etc.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"symbol"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | tradebar1secUsRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. For second bars the format is HHMMSS with seconds part being optional. For example, both the values 13:03:02 and 13:03 are acceptable. |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. For second bars the format is HHMMSS with seconds part being optional. For example, both the values 13:04:02 and 13:04 are acceptable. |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | bin_start |
columns | bin_end |
columns | open |
columns | high |
columns | low |
columns | close |
columns | volume |
columns | volume_ex_block |
columns | vwap |
columns | vwap_ex_block |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"bin_end": "string",
"bin_start": "string",
"close": 0,
"date_string": "string",
"high": "string",
"low": 0,
"open": 0,
"symbol": "string",
"volume": 0,
"volume_ex_block": 0,
"vwap": 0,
"vwap_ex_block": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | tradebar1secUsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
404 | Not Found | 404 response | None |
409 | Conflict | 409 response | None |
500 | Internal Server Error | 500 response | None |
Broker Analytics
Broker Daily Stats CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/brokerdailystats',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/brokerdailystats', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/brokerdailystats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/brokerdailystats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"brokers": [
"string"
],
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/brokerdailystats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/brokerdailystats HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/brokerdailystats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/brokerdailystats
Provides insights into market share by broker through a more detailed view into trade volume by broker for various trading sessions and order types, subject to broker attribution
Body parameter
{
"brokers": [
"string"
],
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | brokerDailyStatsCaRequestv1 | true | none |
brokers | body | [string] | false | Identifies the broker ID. For eg. [90, 80] or ["ALL_BROKERS"] for fetching all the brokers. Optional field, by default its ["ALL_BROKERS"] |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | broker |
columns | volume_buy |
columns | volume_sell |
columns | value_buy |
columns | value_sell |
columns | count_buy |
columns | count_sell |
columns | volume_block_buy |
columns | volume_block_sell |
columns | volume_moc_buy |
columns | volume_moc_sell |
columns | volume_moo_buy |
columns | volume_moo_sell |
columns | volume_odd_lot_buy |
columns | volume_odd_lot_sell |
columns | volume_dark_buy |
columns | volume_dark_sell |
columns | volume_cross_buy |
columns | volume_cross_sell |
columns | volume_premarket_buy |
columns | volume_premarket_sell |
columns | volume_postmarket_buy |
columns | volume_postmarket_sell |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"broker": "string",
"count_buy": 0,
"count_sell": 0,
"date_string": "string",
"symbol": "string",
"value_buy": 0,
"value_sell": 0,
"volume_block_buy": 0,
"volume_block_sell": 0,
"volume_buy": 0,
"volume_cross_buy": 0,
"volume_cross_sell": 0,
"volume_dark_buy": 0,
"volume_dark_sell": 0,
"volume_moc_buy": 0,
"volume_moc_sell": 0,
"volume_moo_buy": 0,
"volume_moo_sell": 0,
"volume_odd_lot_buy": 0,
"volume_odd_lot_sell": 0,
"volume_postmarket_buy": 0,
"volume_postmarket_sell": 0,
"volume_premarket_buy": 0,
"volume_premarket_sell": 0,
"volume_sell": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | brokerDailyStatsCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Broker Liquidity CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/brokerliquidity',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/brokerliquidity', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/brokerliquidity");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/brokerliquidity \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"brokers": [
"string"
],
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/brokerliquidity',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/brokerliquidity HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/brokerliquidity", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/brokerliquidity
Contains broker-specific quoting analytics at multiple orderbook levels beyond the top of book. This unique dataset provides an enhanced view into displayed liquidity by broker to help understand liquidity dynamics and market share contributed by each broker, subject to broker attribution. One-minute orderbook snapshots are taken throughout the trading day (9:45 AM - 15:45 PM ET/EST) and then the time-weighted average is used to represent an end of day value
Body parameter
{
"brokers": [
"string"
],
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | brokerLiquidityCaRequestv1 | true | none |
brokers | body | [string] | false | Identifies the broker ID. For eg. [90, 80] or ["ALL_BROKERS"] for fetching all the brokers. Optional field, by default its ["ALL_BROKERS"] |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | broker |
columns | pct_time_2sides_avail |
columns | sprd_TOB_bps |
columns | pct_time_atNBB |
columns | avgNBB_volume |
columns | avgNBB_value |
columns | pct_time_atNBO |
columns | avgNBO_volume |
columns | avgNBO_value |
columns | pct_time_bid_10b_deep |
columns | bidsize10b_impact |
columns | bidvalue10b_impact |
columns | pct_time_bid_25b_deep |
columns | bidsize25b_impact |
columns | bidvalue25b_impact |
columns | pct_time_ask_10b_deep |
columns | asksize10b_impact |
columns | askvalue10b_impact |
columns | pct_time_ask_25b_deep |
columns | asksize25b_impact |
columns | askvalue25b_impact |
columns | pct_time_bidask_25k_deep |
columns | sprd_25k_bps |
columns | pct_time_bidask_50k_deep |
columns | sprd_50k_bps |
columns | pct_time_bidask_100k_deep |
columns | sprd_100k_bps |
columns | pct_time_bidask_200k_deep |
columns | sprd_200k_bps |
columns | pct_time_bidask_500k_deep |
columns | sprd_500k_bps |
columns | pct_time_bidask_1m_deep |
columns | sprd_1m_bps |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"asksize10b_impact": 0,
"asksize25b_impact": 0,
"askvalue10b_impact": 0,
"askvalue25b_impact": 0,
"avgnbb_value": 0,
"avgnbb_volume": 0,
"avgnbo_value": 0,
"avgnbo_volume": 0,
"bidsize10b_impact": 0,
"bidsize25b_impact": 0,
"bidvalue10b_impact": 0,
"bidvalue25b_impact": 0,
"broker": "string",
"date_string": "string",
"pct_time_2sides_avail": 0,
"pct_time_ask_10b_deep": 0,
"pct_time_ask_25b_deep": 0,
"pct_time_atnbb": 0,
"pct_time_atnbo": 0,
"pct_time_bid_10b_deep": 0,
"pct_time_bid_25b_deep": 0,
"pct_time_bidask_100k_deep": 0,
"pct_time_bidask_1m_deep": 0,
"pct_time_bidask_200k_deep": 0,
"pct_time_bidask_25k_deep": 0,
"pct_time_bidask_500k_deep": 0,
"pct_time_bidask_50k_deep": 0,
"sprd_100k_bps": 0,
"sprd_1m_bps": 0,
"sprd_200k_bps": 0,
"sprd_25k_bps": 0,
"sprd_500k_bps": 0,
"sprd_50k_bps": 0,
"sprd_tob_bps": 0,
"symbol": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | brokerLiquidityCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Broker Summary CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/brokersummary',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/brokersummary', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/brokersummary");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/brokersummary \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"brokers": [
"string"
],
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/brokersummary',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/brokersummary HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/brokersummary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/brokersummary
Contains spread and volume metrics broker down by broker.
Body parameter
{
"brokers": [
"string"
],
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | brokerSummaryCaRequestv1 | true | none |
brokers | body | [string] | false | Identifies the broker ID. For eg. [90, 80] or ["ALL_BROKERS"] for fetching all the brokers. Optional field, by default its ["ALL_BROKERS"] |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | broker |
columns | time_period |
columns | notional |
columns | bid_ratio |
columns | bid_volume |
columns | bid_value |
columns | ask_ratio |
columns | ask_volume |
columns | ask_value |
columns | spread |
columns | spread_bps |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"ask_ratio": 0,
"ask_value": 0,
"ask_volume": 0,
"bid_ratio": 0,
"bid_value": 0,
"bid_volume": 0,
"broker": 0,
"date_string": "string",
"notional": 0,
"spread": 0,
"spread_bps": 0,
"symbol": "string",
"time_period": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | brokerSummaryCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Corporate Actions & Reference Data
Issuers CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/issuers',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/issuers', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/issuers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/issuers \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"timeseries_id"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/issuers',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/issuers HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/issuers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/issuers
Contains reference data for securities listed on TSX and TSXV
Body parameter
{
"columns": [
"timeseries_id"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | issuersCaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. start date of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | timeseries_id |
columns | symbol |
columns | is_etf |
columns | issue_long_name |
columns | cusip |
columns | segment |
columns | listing_exchange |
columns | issue_short_name |
columns | company_name |
columns | issue_list_date |
columns | security_type |
columns | fund_family |
columns | is_fund_of_funds |
columns | interlisted_exchange |
columns | us_symbol |
columns | date_string |
columns | year |
Example responses
200 Response
{
"data": [
{
"company_name": "string",
"cusip": "string",
"date_string": "string",
"fund_family": "string",
"interlisted_exchange": "string",
"is_etf": 0,
"is_fund_of_funds": "string",
"issue_list_date": "string",
"issue_long_name": "string",
"issue_short_name": "string",
"listing_exchange": "string",
"security_type": "string",
"segment": "string",
"symbol": "string",
"timeseries_id": "string",
"us_symbol": "string",
"year": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | issuersCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Global Symbols
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/globalsymbols',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/globalsymbols', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/globalsymbols");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/globalsymbols \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"timeseries_id"
],
"countrycode": "string",
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/globalsymbols',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/globalsymbols HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/globalsymbols", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/globalsymbols
Contains security reference and corporate actions data such as dividends and splits.
Body parameter
{
"columns": [
"timeseries_id"
],
"countrycode": "string",
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | globalsymbolsRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
countrycode | body | string | true | Identifies the country the security trades in |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | timeseries_id |
columns | exchange |
columns | symbol |
columns | cusip |
columns | sedol |
columns | isin |
columns | primary_exchange |
columns | security_type |
columns | price_ratio |
columns | rev_price_ratio |
columns | price_offset |
columns | shares_outstanding |
columns | country_code |
columns | currency |
columns | date_string |
columns | year |
Example responses
200 Response
{
"data": [
{
"country_code": "string",
"currency": "string",
"cusip": "string",
"date_string": "string",
"exchange": "string",
"isin": "string",
"price_offset": 0,
"price_ratio": 0,
"primary_exchange": "string",
"rev_price_ratio": 0,
"security_type": "string",
"sedol": "string",
"shares_outstanding": 0,
"symbol": "string",
"timeseries_id": "string",
"year": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | globalsymbolsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Global Symbols Delta
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/globalsymbolsdelta',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/globalsymbolsdelta', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/globalsymbolsdelta");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/globalsymbolsdelta \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"timeseries_id"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/globalsymbolsdelta',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/globalsymbolsdelta HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/globalsymbolsdelta", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/globalsymbolsdelta
Description for Global Symbols Delta
Body parameter
{
"columns": [
"timeseries_id"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | globalsymbolsdeltaRequestv1 | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | timeseries_id |
columns | exchange |
columns | symbol |
columns | new_symbol |
columns | new_cusip |
columns | new_sedol |
columns | new_isin |
columns | new_primary_exchange |
columns | new_price_ratio |
columns | new_rev_price_ratio |
columns | price_offset |
columns | new_shares_outstanding |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"date_string": "string",
"exchange": "string",
"new_cusip": "string",
"new_isin": "string",
"new_price_ratio": 0,
"new_primary_exchange": "string",
"new_rev_price_ratio": 0,
"new_sedol": "string",
"new_shares_outstanding": 0,
"new_symbol": "string",
"price_offset": 0,
"symbol": "string",
"timeseries_id": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | globalsymbolsdeltaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
New MOC Imbalance Analytics
MOCI CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/moci',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/moci', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/moci");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/moci \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"date_string"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/moci',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/moci HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/moci", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/moci
New MOCI provides information from the new MOC Facility for eligible stocks.
Body parameter
{
"columns": [
"date_string"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | mociRequest | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | date_string |
columns | venue |
columns | symbol |
columns | time |
columns | time_nanos |
columns | imbalancereferenceprice |
columns | imbalanceside |
columns | imbalancevolume |
columns | pairedvolume |
columns | marketorderimbalancevolume |
columns | marketorderimbalanceside |
columns | nearindicativeclosingprice |
columns | farindicativeclosingprice |
columns | pricevariation |
columns | seq |
Example responses
200 Response
{
"data": [
{
"date_string": "string",
"farindicativeclosingprice": 0,
"imbalancereferenceprice": 0,
"imbalanceside": "string",
"imbalancevolume": 0,
"marketorderimbalanceside": "string",
"marketorderimbalancevolume": 0,
"nearindicativeclosingprice": 0,
"pairedvolume": 0,
"pricevariation": 0,
"seq": 0,
"symbol": "string",
"time": "string",
"time_nanos": 0,
"venue": "string"
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | mociResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Essential Analytics for Options & Futures
MX Daily Stats CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/mxdailystats',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/mxdailystats', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/mxdailystats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/mxdailystats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"callputcode": "string",
"columns": [
"underlying_symbol"
],
"deltalowerlimit": 0,
"deltaupperlimit": 0,
"enddate": "string",
"expirationenddate": "string",
"expirationstartdate": "string",
"gammalowerlimit": 0,
"gammaupperlimit": 0,
"instrumentgroup": "string",
"instrumenttype": "string",
"pageafter": 0,
"startdate": "string",
"strikepricelowerlimit": 0,
"strikepriceupperlimit": 0,
"symbol": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/mxdailystats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/mxdailystats HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/mxdailystats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/mxdailystats
Contains daily statistics on MX data such as Roll Volume, Put Call Ratio, Implied Volalitity, Delta, Gamma, Rho, Vega, Theta, Reference Price, Last Price, Last Bid, Last Ask, Open Interest, Trade Count, Trade Volume, Trade Value.
Body parameter
{
"callputcode": "string",
"columns": [
"underlying_symbol"
],
"deltalowerlimit": 0,
"deltaupperlimit": 0,
"enddate": "string",
"expirationenddate": "string",
"expirationstartdate": "string",
"gammalowerlimit": 0,
"gammaupperlimit": 0,
"instrumentgroup": "string",
"instrumenttype": "string",
"pageafter": 0,
"startdate": "string",
"strikepricelowerlimit": 0,
"strikepriceupperlimit": 0,
"symbol": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | mxdailystatsCaRequestv1 | true | none |
callputcode | body | string | false | Identifies between Call Options and Put Options |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
deltalowerlimit | body | number | false | Lower limit for Delta |
deltaupperlimit | body | number | false | Upper limit for Delta |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
expirationenddate | body | string | false | Ending expiration date in YYYY-MM-DD |
expirationstartdate | body | string | false | Starting expiration date in YYYY-MM-DD |
gammalowerlimit | body | number | false | Lower limit for Gamma |
gammaupperlimit | body | number | false | Upper limit for Gamma |
instrumentgroup | body | string | false | Instrument Key |
instrumenttype | body | string | true | Identifies the type of instrument. Possible values are Future,EquityOption, Strategy, FutureOption |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. start date of 2020-09-01 will include data from 2020-09-01 to enddate |
strikepricelowerlimit | body | number | false | Lower limit of Strike Price of Option |
strikepriceupperlimit | body | number | false | Upper limit of Strike Price of Option |
symbol | body | string | true | Ticker symbol of the security. For eg. "AC" for Air Canada. Please note that "ALL_SYMBOLS" cannot be used with this API |
Enumerated Values
Parameter | Value |
---|---|
columns | underlying_symbol |
columns | external_symbol |
columns | instrumenttype |
columns | instrumentgroup |
columns | call_put_code |
columns | option_type |
columns | strike_price |
columns | last_observed_price_underlying |
columns | last_price_extsymbol |
columns | last_bid_extsymbol |
columns | last_ask_extsymbol |
columns | london_4pm_bid |
columns | london_4pm_ask |
columns | london_4pm_price |
columns | referenceprice |
columns | settlement_price |
columns | expiration_date |
columns | open_interest |
columns | trade_count |
columns | trade_volume |
columns | trade_value |
columns | option_input_price |
columns | roll_volume |
columns | putcallratio_byoi |
columns | putcallratio_byvolume |
columns | implied_vol_extsymbol |
columns | implied_vol_by_expiration |
columns | delta |
columns | gamma |
columns | rho |
columns | vega |
columns | theta |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"call_put_code": "string",
"date_string": "string",
"delta": 0,
"expiration_date": "string",
"external_symbol": "string",
"gamma": 0,
"implied_vol_by_expiration": 0,
"implied_vol_extsymbol": 0,
"instrumentgroup": "string",
"instrumenttype": "string",
"last_ask_extsymbol": 0,
"last_bid_extsymbol": 0,
"last_observed_price_underlying": 0,
"last_price_extsymbol": 0,
"london_4pm_ask": 0,
"london_4pm_bid": 0,
"london_4pm_price": 0,
"open_interest": 0,
"option_input_price": 0,
"option_type": "string",
"putcallratio_byoi": 0,
"putcallratio_byvolume": 0,
"referenceprice": "string",
"rho": 0,
"roll_volume": 0,
"settlement_price": 0,
"strike_price": 0,
"theta": 0,
"trade_count": 0,
"trade_value": 0,
"trade_volume": 0,
"underlying_symbol": "string",
"vega": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | mxdailystatsCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Equity Intraday Quotes
Quotes - 1min CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1min',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1min', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1min");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1min \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1min',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1min HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1min", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/quotesbar1min
Canadian quotes data from all marketplaces aggregated in one minute bars with metrics such as open, high, low, close, number of quotes etc.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | quotesbar1minCaRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. The minute bars format is HHMM. Example: 11:05 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. The minute bars format is HHMM. Example: 11:04 |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | barstarttime |
columns | symbol |
columns | highbidprice |
columns | lowaskprice |
columns | openbartime |
columns | openbidprice |
columns | openbidsize |
columns | openaskprice |
columns | openasksize |
columns | closebartime |
columns | closebidprice |
columns | closebidsize |
columns | closeaskprice |
columns | closeasksize |
columns | numquotes |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"barstarttime": "string",
"closeaskprice": 0,
"closeasksize": 0,
"closebartime": "string",
"closebidprice": 0,
"closebidsize": 0,
"date_string": "string",
"highbidprice": 0,
"lowaskprice": 0,
"numquotes": 0,
"openaskprice": 0,
"openasksize": 0,
"openbartime": "string",
"openbidprice": 0,
"openbidsize": 0,
"symbol": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | quotesbar1minCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Quotes - 1sec CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1sec',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1sec', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1sec");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1sec \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbol": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1sec',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1sec HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/quotesbar1sec", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/quotesbar1sec
Canadian quotes data from all marketplaces aggregated in one second bars with metrics such as open, high, low, close, number of quotes etc.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbol": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | quotesbar1secCaRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. For second bars the format is HHMMSS with seconds part being optional. For example, both the values 13:03:02 and 13:03 are acceptable. |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. For second bars the format is HHMMSS with seconds part being optional. For example, both the values 13:04:02 and 13:04 are acceptable. |
symbol | body | string | true | Ticker symbol of the security. For eg. "AC" for Air Canada or "ALL_SYMBOLS" for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | barstarttime |
columns | symbol |
columns | highbidprice |
columns | lowaskprice |
columns | openbartime |
columns | openbidprice |
columns | openbidsize |
columns | openaskprice |
columns | openasksize |
columns | closebartime |
columns | closebidprice |
columns | closebidsize |
columns | closeaskprice |
columns | closeasksize |
columns | numquotes |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"barstarttime": "string",
"closeaskprice": 0,
"closeasksize": 0,
"closebartime": "string",
"closebidprice": 0,
"closebidsize": 0,
"date_string": "string",
"highbidprice": 0,
"lowaskprice": 0,
"numquotes": 0,
"openaskprice": 0,
"openasksize": 0,
"openbartime": "string",
"openbidprice": 0,
"openbidsize": 0,
"symbol": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | quotesbar1secCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Quotes - 1min US
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1min',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1min', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1min");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1min \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1min',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1min HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1min", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/us/quotesbar1min
US quotes data from all marketplaces aggregated in one minute bars with metrics such as open, high, low, close, number of quotes etc.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | quotesbar1minUsRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. The minute bars format is HHMM. Example: 11:05 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. The minute bars format is HHMM. Example: 11:04 |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | barstarttime |
columns | symbol |
columns | highbidprice |
columns | lowaskprice |
columns | openbartime |
columns | openbidprice |
columns | openaskprice |
columns | closebartime |
columns | closebidprice |
columns | closeaskprice |
columns | numquotes |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"barstarttime": "string",
"closeaskprice": 0,
"closebartime": "string",
"closebidprice": 0,
"date_string": "string",
"highbidprice": 0,
"lowaskprice": 0,
"numquotes": 0,
"openaskprice": 0,
"openbartime": "string",
"openbidprice": 0,
"symbol": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | quotesbar1minUsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Quotes - 1sec US
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1sec',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1sec', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1sec");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1sec \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1sec',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1sec HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/us/quotesbar1sec", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/us/quotesbar1sec
US quotes data from all marketplaces aggregated in one second bars with metrics such as open, high, low, close, number of quotes etc.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"barstarttime"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | quotesbar1secUsRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. For second bars the format is HHMMSS with seconds part being optional. For example, both the values 13:03:02 and 13:03 are acceptable. |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. For second bars the format is HHMMSS with seconds part being optional. For example, both the values 13:04:02 and 13:04 are acceptable. |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | barstarttime |
columns | symbol |
columns | highbidprice |
columns | lowaskprice |
columns | openbartime |
columns | openbidprice |
columns | openaskprice |
columns | closebartime |
columns | closebidprice |
columns | closeaskprice |
columns | numquotes |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"barstarttime": "string",
"closeaskprice": 0,
"closebartime": "string",
"closebidprice": 0,
"date_string": "string",
"highbidprice": 0,
"lowaskprice": 0,
"numquotes": 0,
"openaskprice": 0,
"openbartime": "string",
"openbidprice": 0,
"symbol": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | quotesbar1secUsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Trades & Quotes Tick Data
TAQ NBBO CA
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/ca/taqnbbo',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/ca/taqnbbo', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/ca/taqnbbo");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/ca/taqnbbo \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"symbol"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbol": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/ca/taqnbbo',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/ca/taqnbbo HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/ca/taqnbbo", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/ca/taqnbbo
Canadian trades and National Best Bid and Offer pricing prevailing at the time of the trade in one data set. Covers all Canadian marketplaces.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"symbol"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbol": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | taqnbboCaRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. Format includes hours, minutes, seconds and milliseconds in the following format: ‘HH:MI:SS.Milliseconds'. For eg. 15:31:10.423 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. Format includes hours, minutes, seconds and milliseconds in the following format: ‘HH:MI:SS.Milliseconds'. For eg. 15:30:10.423 |
symbol | body | string | true | Ticker symbol of the security. For eg. "AC" for Air Canada or "ALL_SYMBOLS" for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | trade_time |
columns | trade_localseq |
columns | trade_venue |
columns | record_type |
columns | totalbidsize |
columns | bestbid |
columns | totalasksize |
columns | bestask |
columns | listing_exchange |
columns | trade_size |
columns | trade_price |
columns | buy_broker |
columns | sell_broker |
columns | trade_id |
columns | trade_condition |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"bestask": 0,
"bestbid": 0,
"buy_broker": 0,
"date_string": "string",
"listing_exchange": "string",
"record_type": 0,
"sell_broker": 0,
"symbol": "string",
"totalasksize": 0,
"totalbidsize": 0,
"trade_condition": "string",
"trade_id": "string",
"trade_localseq": 0,
"trade_price": "string",
"trade_size": 0,
"trade_time": "string",
"trade_venue": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | taqnbboCaResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | taqnbboUsResponsev1 |
500 | Internal Server Error | 500 response | None |
TAQ NBBO US
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/us/taqnbbo',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/us/taqnbbo', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/us/taqnbbo");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/us/taqnbbo \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"symbol"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/us/taqnbbo',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/us/taqnbbo HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/us/taqnbbo", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/us/taqnbbo
US trades and National Best Bid and Offer pricing prevailing at the time of the trade in one data set. Covers all US marketplaces.
Body parameter
{
"adjusted": true,
"adjustedForDate": "string",
"columns": [
"symbol"
],
"datestring": "string",
"endtime": "string",
"pageafter": 0,
"starttime": "string",
"symbols": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | taqnbboUsRequestv1 | true | none |
adjusted | body | boolean | false | Boolean value to check if the response should include adjusted value |
adjustedForDate | body | string | false | Date in EST for when the split data will be adjusted for. For eg. '2020-09-01'. In case this date is not provided, data is adjusted as of the current date |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
datestring | body | string | true | Date in EST for when the data is required. For eg. '2020-09-01' |
endtime | body | string | false | Timestamp in EST till when the data is required. Format includes hours, minutes, seconds and milliseconds in the following format: ‘HH:MI:SS.Milliseconds'. For eg. 15:31:10.423 |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
starttime | body | string | false | Starting timestamp in EST from when the data is required. Format includes hours, minutes, seconds and milliseconds in the following format: ‘HH:MI:SS.Milliseconds'. For eg. 15:30:10.423 |
symbols | body | [string] | true | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Enumerated Values
Parameter | Value |
---|---|
columns | symbol |
columns | trade_time |
columns | trade_localseq |
columns | trade_venue |
columns | record_type |
columns | total_bid_size |
columns | best_bid |
columns | total_ask_size |
columns | best_ask |
columns | trade_size |
columns | trade_price |
columns | trade_count |
columns | trade_id |
columns | trade_condition |
columns | time_nanos |
columns | tradeunix |
columns | date_string |
Example responses
200 Response
{
"data": [
{
"best_ask": 0,
"best_bid": 0,
"date_string": "string",
"record_type": 0,
"symbol": "string",
"time_nanos": 0,
"total_ask_size": 0,
"total_bid_size": 0,
"trade_condition": "string",
"trade_id": "string",
"trade_localseq": 0,
"trade_price": "string",
"trade_size": 0,
"trade_time": "string",
"trade_venue": "string",
"tradeunix": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | taqnbboUsResponsev1 |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | taqnbboUsResponsev1 |
500 | Internal Server Error | 500 response | None |
Short Interest Analytics
Days To Cover
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/daystocover',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/daystocover', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/daystocover");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/daystocover \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"business_date"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/daystocover',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/daystocover HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/daystocover", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/daystocover
It is a liquidity measure = 15 day average Short Interest / 15 day average ADTV
Body parameter
{
"columns": [
"business_date"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | daystocoverRequest | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Effective date for the data |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Effective date for the data |
Enumerated Values
Parameter | Value |
---|---|
columns | business_date |
columns | isin |
columns | symbol |
columns | name |
columns | days_to_cover_current |
columns | days_to_cover_15 |
columns | days_to_cover_current_vs_90 |
Example responses
200 Response
{
"data": [
{
"business_date": "string",
"days_to_cover_15": 0,
"days_to_cover_current": 0,
"days_to_cover_current_vs_90": 0,
"isin": "string",
"name": "string",
"symbol": "string"
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | daystocoverResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Short Interest Original
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/original',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/original', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/original");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/original \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"business_date"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/original',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/original HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/original", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/original
This table contains S3 Partners borrow rates and Original Short Interest Projection data
Body parameter
{
"columns": [
"business_date"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | originalRequest | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Effective date for the data |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Effective date for the data |
Enumerated Values
Parameter | Value |
---|---|
columns | business_date |
columns | sedol |
columns | isin |
columns | figi |
columns | ticker |
columns | bbgid |
columns | name |
columns | offer_rate |
columns | bid_rate |
columns | last_rate |
columns | short_momentum |
columns | short_interest |
columns | shortinterestnotional |
columns | shortinterestpct |
columns | s3float |
columns | s3sipctfloat |
columns | indicativeavailability |
columns | s3utilization |
columns | daystocover10day |
columns | daystocover30day |
columns | daystocover90day |
columns | crowded_score |
columns | squeeze_risk |
columns | dailymtmpl |
columns | dailynetmtmpl |
columns | volume |
Example responses
200 Response
{
"data": [
{
"bbgid": "string",
"bid_rate": 0,
"business_date": "string",
"crowded_score": 0,
"dailymtmpl": 0,
"dailynetmtmpl": 0,
"daystocover10day": 0,
"daystocover30day": 0,
"daystocover90day": 0,
"figi": "string",
"indicativeavailability": 0,
"isin": "string",
"last_rate": 0,
"name": "string",
"offer_rate": 0,
"s3float": 0,
"s3sipctfloat": 0,
"s3utilization": 0,
"sedol": "string",
"short_interest": 0,
"short_momentum": 0,
"shortinterestnotional": 0,
"shortinterestpct": 0,
"squeeze_risk": 0,
"ticker": "string",
"volume": 0
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | originalResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Percent Float
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/percentfloat',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/percentfloat', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/percentfloat");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/percentfloat \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"business_date"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/percentfloat',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/percentfloat HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/percentfloat", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/percentfloat
TMX EDMA provides high resolution analytics-ready data sets and leverages Amazon Web Services (AWS) cloud technology to deliver…
Body parameter
{
"columns": [
"business_date"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | percentfloatRequest | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Effective date for the data |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Effective date for the data |
Enumerated Values
Parameter | Value |
---|---|
columns | business_date |
columns | isin |
columns | symbol |
columns | name |
columns | pct_float_current |
columns | pct_float_15 |
columns | pct_float_current_vs_90 |
Example responses
200 Response
{
"data": [
{
"business_date": "string",
"isin": "string",
"name": "string",
"pct_float_15": 0,
"pct_float_current": 0,
"pct_float_current_vs_90": 0,
"symbol": "string"
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | percentfloatResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Short Interest Smoothened
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/smoothened',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/smoothened', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/smoothened");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/smoothened \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"business_date"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/smoothened',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/smoothened HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/smoothened", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/smoothened
This table contains S3 Partners borrow rates and revised Short Interest data
Body parameter
{
"columns": [
"business_date"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | smoothenedRequest | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Effective date for the data |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Effective date for the data |
Enumerated Values
Parameter | Value |
---|---|
columns | business_date |
columns | sedol |
columns | isin |
columns | figi |
columns | ticker |
columns | bbgid |
columns | name |
columns | offer_rate |
columns | bid_rate |
columns | last_rate |
columns | short_momentum |
columns | short_interest |
columns | shortinterestnotional |
columns | shortinterestpct |
columns | s3float |
columns | s3sipctfloat |
columns | indicativeavailability |
columns | s3utilization |
columns | daystocover10day |
columns | daystocover30day |
columns | daystocover90day |
columns | crowded_score |
columns | squeeze_risk |
columns | dailymtmpl |
columns | dailynetmtmpl |
columns | volume |
Example responses
200 Response
{
"data": [
{
"bbgid": "string",
"bid_rate": 0,
"business_date": "string",
"crowded_score": 0,
"dailymtmpl": 0,
"dailynetmtmpl": 0,
"daystocover10day": 0,
"daystocover30day": 0,
"daystocover90day": 0,
"figi": "string",
"indicativeavailability": 0,
"isin": "string",
"last_rate": 0,
"name": "string",
"offer_rate": 0,
"s3float": 0,
"s3sipctfloat": 0,
"s3utilization": 0,
"sedol": "string",
"short_interest": 0,
"short_momentum": 0,
"shortinterestnotional": 0,
"shortinterestpct": 0,
"squeeze_risk": 0,
"ticker": "string",
"volume": 0
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | smoothenedResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Buybacks
North American Buybacks
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/northamericanbuybacks',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/northamericanbuybacks', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/northamericanbuybacks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/northamericanbuybacks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"announce_date_end": "string",
"announce_date_start": "string",
"columns": [
"transaction_id"
],
"cusip": [
"string"
],
"effective_date_end": "string",
"effective_date_start": "string",
"expiry_date_end": "string",
"expiry_date_start": "string",
"isin": [
"string"
],
"last_updated_date_end": "string",
"last_updated_date_start": "string",
"pageafter": 0,
"symbol": [
"string"
],
"time_processed_end": "string",
"time_processed_start": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/northamericanbuybacks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/northamericanbuybacks HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/northamericanbuybacks", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/northamericanbuybacks
North American Buybacks provides information on corporate share buyback announcement details as well as tracking of buyback purchases as they are reported. Also offers historical analysis of company buyback behavior and insight into deviations from historical norms
Body parameter
{
"announce_date_end": "string",
"announce_date_start": "string",
"columns": [
"transaction_id"
],
"cusip": [
"string"
],
"effective_date_end": "string",
"effective_date_start": "string",
"expiry_date_end": "string",
"expiry_date_start": "string",
"isin": [
"string"
],
"last_updated_date_end": "string",
"last_updated_date_start": "string",
"pageafter": 0,
"symbol": [
"string"
],
"time_processed_end": "string",
"time_processed_start": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | northamericanbuybacksRequest | true | none |
announce_date_end | body | string | false | End Date to filter by Announce Date of Buyback. For eg. announce_date_end of 2024-08-31 will include data from specified date_start to 2024-08-31. NOTE: This filter will not include Transaction records, use time_processed filters to include this record type |
announce_date_start | body | string | false | Start Date to filter by Announce Date of Buyback. For eg.announce_date_start of 2024-08-31 will include data from 2024-08-31 to specified date_end. NOTE: This filter will not include Transaction records, use time_processed filters to include this record type |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
cusip | body | [string] | false | CUSIP of Security,multiple can be provided as an array. Not including an ID will return ALL IDs |
effective_date_end | body | string | false | End date to filter results based on the Buyback Effective Date. For eg.effective_date_end of 2024-08-31 will include data from specified date_start to 2024-08-31. NOTE: This filter will not include Transaction records, use time_processed filters to include this record type |
effective_date_start | body | string | false | Start date to filter results based on the Buyback Effective Date. For eg. effective_date_start of 2024-08-31 will include data from 2024-08-31 to specified date_end. NOTE: This filter will not include Transaction records, use time_processed filters to include this record type |
expiry_date_end | body | string | false | End Date to Filter by Expiry Date of Buyback. For eg. expiry_date_end of 2024-08-31 will include data from specified date_start to 2024-08-31. NOTE: This filter will not include Transaction records, use time_processed filters to include this record type |
expiry_date_start | body | string | false | Start Date to Filter by Expiry Date of Buyback. For eg. expiry_date_start of 2024-08-31 will include data from 2024-08-31 to specified date_end. NOTE: This filter will not include Transaction records, use time_processed filters to include this record type |
isin | body | [string] | false | ISIN of Security, multiple can be provided as an array. Not including an ID will return ALL IDs |
last_updated_date_end | body | string | false | End date to filter results based on the last date a record is updated. For eg. last_updated_date_end of 2024-08-31 will include data from specified date_start to 2024-08-31 |
last_updated_date_start | body | string | false | Start date to filter results based on the last date a record is updated. For eg. last_updated_date_start of 2024-08-31 will include data from 2024-08-31 to specified date_end |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
symbol | body | [string] | false | Symbol of Security, multiple symbols can be provided as an array. Not including an ID will return ALL IDs |
time_processed_end | body | string | true | Enddate to filter results based on the time the information was entered into internal systems. Time is UTC standard. For eg. time_processed_end of 2024-08-31 will include data from specified date_start to 2024-08-31 |
time_processed_start | body | string | true | Start date to filter results based on the time the information was entered into internal systems. Time is UTC standard. For eg. time_processed_start of 2024-08-31 will include data from 2024-08-31 to specified date_end |
Enumerated Values
Parameter | Value |
---|---|
columns | transaction_id |
columns | last_update_date |
columns | monthly_report_period |
columns | type |
columns | announce_date |
columns | start_date |
columns | effective_date |
columns | end_date |
columns | expiry_date |
columns | name |
columns | symbol |
columns | cusip |
columns | isin |
columns | current_primary_country |
columns | latest_shares_in_issue |
columns | last_shares_in_issue_before_effective |
columns | percent_differance_in_outstanding_shares |
columns | last_initial_subject_shares |
columns | last_initial_subject_value |
columns | last_subject_end_date |
columns | initial_subject_shares |
columns | initial_subject_value |
columns | subject_shares_percent_announced |
columns | historical_5yr_subject_percent_announced |
columns | intention_revisions |
columns | split_adjustment_factor |
columns | shares_purchased_in_mon |
columns | value_purchased_in_mon |
columns | eom_total_shares |
columns | eom_value |
columns | current_percent_completed |
columns | current_prorated_completed |
columns | historical_5yr_percent_completed |
columns | reported_transaction_min_date |
columns | reported_transaction_max_date |
columns | amount |
columns | reported_price |
columns | currency |
columns | usd_value |
columns | transaction_note |
columns | time_released_utc |
columns | time_processed_utc |
columns | ingest_day |
Example responses
200 Response
{
"data": [
{
"amount": 0,
"announce_date": "string",
"currency": "string",
"current_percent_completed": 0,
"current_primary_country": "string",
"current_prorated_completed": "string",
"cusip": "string",
"effective_date": "string",
"end_date": "string",
"eom_total_shares": 0,
"eom_value": 0,
"expiry_date": "string",
"historical_5yr_percent_completed": 0,
"historical_5yr_subject_percent_announced": 0,
"ingest_day": "string",
"initial_subject_shares": 0,
"initial_subject_value": 0,
"intention_revisions": "string",
"isin": "string",
"last_initial_subject_shares": 0,
"last_initial_subject_value": 0,
"last_shares_in_issue_before_effective": 0,
"last_subject_end_date": "string",
"last_update_date": "string",
"latest_shares_in_issue": 0,
"monthly_report_period": "string",
"name": "string",
"percent_differance_in_outstanding_shares": 0,
"reported_price": 0,
"reported_transaction_max_date": "string",
"reported_transaction_min_date": "string",
"shares_purchased_in_mon": 0,
"split_adjustment_factor": 0,
"start_date": "string",
"subject_shares_percent_announced": 0,
"symbol": "string",
"time_processed_utc": "string",
"time_released_utc": "string",
"transaction_id": "string",
"transaction_note": "string",
"type": "string",
"usd_value": 0,
"value_purchased_in_mon": 0
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | northamericanbuybacksResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Price Adjustment Curve
Pac
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/pac',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/pac', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/pac");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/pac \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"date_string"
],
"enddate": "string",
"id": [
"string"
],
"pageafter": 0,
"startdate": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/pac',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/pac HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/pac", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/pac
Price adjustment Curve provides information on corporate action adjustment factors, including cash dividends and splits. Could be applied to the most granular prices and quotes to have a adjusted price for trade analysis, or adjusted quotes for order book Analysis.
Body parameter
{
"columns": [
"date_string"
],
"enddate": "string",
"id": [
"string"
],
"pageafter": 0,
"startdate": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | pacRequest | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
id | body | [string] | true | Unique company ID or ["ALL_IDS"] for fetching all the companies. |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
Enumerated Values
Parameter | Value |
---|---|
columns | date_string |
columns | id |
columns | symbol |
columns | cusip |
columns | listing_exchange |
columns | currency |
columns | cash_div_ratio |
columns | split_ratio |
columns | forward_div_ratio |
columns | backward_div_ratio |
columns | forward_split_ratio |
columns | backward_split_ratio |
Example responses
200 Response
{
"data": [
{
"backward_div_ratio": 0,
"backward_split_ratio": 0,
"cash_div_ratio": 0,
"currency": "string",
"cusip": "string",
"date_string": "string",
"forward_div_ratio": 0,
"forward_split_ratio": 0,
"id": "string",
"listing_exchange": "string",
"split_ratio": 0,
"symbol": "string"
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | pacResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Pacexplain
Code samples
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://analyticsapi.tmxanalytics.com/v1/pacexplain',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://analyticsapi.tmxanalytics.com/v1/pacexplain', headers = headers)
print(r.json())
URL obj = new URL("https://analyticsapi.tmxanalytics.com/v1/pacexplain");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wget
curl -X POST https://analyticsapi.tmxanalytics.com/v1/pacexplain \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
const inputBody = '{
"columns": [
"date_string"
],
"enddate": "string",
"id": [
"string"
],
"pageafter": 0,
"startdate": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://analyticsapi.tmxanalytics.com/v1/pacexplain',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST https://analyticsapi.tmxanalytics.com/v1/pacexplain HTTP/1.1
Host: analyticsapi.tmxanalytics.com
Content-Type: application/json
Accept: application/json
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://analyticsapi.tmxanalytics.com/v1/pacexplain", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /v1/pacexplain
Providing the adjustment factors and explaining the sources behind the adjustment factor calculation
Body parameter
{
"columns": [
"date_string"
],
"enddate": "string",
"id": [
"string"
],
"pageafter": 0,
"startdate": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | pacexplainRequest | true | none |
columns | body | [string] | false | Select columns from the enumerated list below can be provided as an array |
enddate | body | string | true | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
id | body | [string] | true | Unique company ID or ["ALL_IDS"] for fetching all the companies. |
pageafter | body | integer | false | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | body | string | true | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
Enumerated Values
Parameter | Value |
---|---|
columns | date_string |
columns | id |
columns | symbol |
columns | currency |
columns | factor |
columns | type |
columns | sources |
Example responses
200 Response
{
"data": [
{
"currency": "string",
"date_string": "string",
"factor": 0,
"id": "string",
"sources": "string",
"symbol": "string",
"type": "string"
}
]
}
Responses
Detailed description of error codes is explained in section Errors.
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | 200 response | pacexplainResponse |
400 | Bad Request | 400 response | None |
401 | Unauthorized | 401 response | None |
403 | Forbidden | 403 response | None |
500 | Internal Server Error | 500 response | None |
Schemas
Advanced Daily Stats CA Request
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Advanced Daily Stats CA Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
columns | [string] | false | none | Select columns from the enumerated list below can be provided as an array |
enddate | string | true | none | Date in EST till when the data is required. For eg. end date of 2020-09-31 will include data from startdate to 2020-09-31 |
pageafter | integer | false | none | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | string | true | none | Starting date in EST from when the data is required. For eg. startdate of 2020-09-01 will include data from 2020-09-01 to enddate |
symbols | [string] | true | none | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Advanced Daily Stats CA Response
{
"data": [
{
"avg_sprd_bps": 0,
"avg_sprd_cent": 0,
"avgaskvol": 0,
"avgbidvol": 0,
"daily_trading_value_ca": 0,
"daily_trading_value_us": 0,
"daily_volume_ca": 0,
"daily_volume_us": 0,
"date_string": "string",
"effective_sprd_bps": 0,
"effective_sprd_cent": 0,
"secondaryclose": 0,
"symbol": "string",
"trade_count_ca": 0,
"trade_count_us": 0,
"us_symbol": "string"
}
],
"pageafter": 0,
"pagebefore": 0
}
Advanced Daily Stats CA Response
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | [object] | false | none | Advanced Daily Stats CA responses object |
» avg_sprd_bps | number | false | none | Average daily quoted spread. Spread bps = (ask price-bid price) / midpoint *10000 based on 1 second buckets when there are valid quotes for both bid & ask |
» avg_sprd_cent | number | false | none | Average daily quoted spread (spread = ask price-bid price) based on 1 second buckets when there are valid quotes for both bid & ask |
» avgaskvol | number | false | none | Total average offer volume (NBO) across all Canadian marketplaces on a symbol at any given time, average taken over previous 30 days using 1 second snapshots |
» avgbidvol | number | false | none | Total average bid volume at top price level (NBB) across all Canadian marketplaces on a symbol at any given time, average taken over previous 30 days using 1 second snapshots |
» daily_trading_value_ca | number | false | none | For each trading day, total traded value across all Canadian venues excluding oddlots, account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» daily_trading_value_us | number | false | none | For each trading day, total traded value across all US venues excluding oddlots, account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» daily_volume_ca | number | false | none | For each trading day, total traded volume across all Canadian venues excluding oddlots, account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» daily_volume_us | number | false | none | For each trading day, total traded volume across all US venues excluding oddlots, account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» date_string | string | false | none | Identifies the local date |
» effective_sprd_bps | number | false | none | Effective Spread (bps) = Effective spread/midpoint *10000. For example, if NBBO is 1.00 - 1.05 and a trade occurs at 1.03 --> Eff spread (bps) = 2 X (1.03-1.025)/1.025 x10000 = 1bps |
» effective_sprd_cent | number | false | none | Effective Spread = 2 X (Trade Price - Nbbo Midpoint)/NBBO midpoint x 100. For example: if NBBO is 1.00 - 1.05 and a trade occurs at 1.03 --> Eff spread = 2 X (1.03-1.025) = $0.01 |
» secondaryclose | number | false | none | Secondary close price identified as midpoint of the NBBO at 3:59.00.0000 PM EST |
» symbol | string | false | none | Ticker symbol of the security |
» trade_count_ca | number | false | none | For each trading day, number of trades across all Canadian venues excluding oddlots, account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» trade_count_us | number | false | none | For each trading day, number of trades across all US venues excluding oddlots, account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» us_symbol | string | false | none | Identifies the ticker of the security on the US exchange |
pageafter | integer | false | none | Resultset is paginated - mention record offset if data is needed after a specific record |
pagebefore | integer | false | none | Resultset is paginated - mention record offset if data is needed before a specific record |
Advanced Daily Stats US Request
{
"columns": [
"symbol"
],
"enddate": "string",
"pageafter": 0,
"startdate": "string",
"symbols": [
"string"
]
}
Advanced Daily Stats US Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
columns | [string] | false | none | Select columns from the enumerated list below can be provided as an array |
enddate | string | true | none | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
pageafter | integer | false | none | Resultset is paginated - mention record offset if data is needed after a specific record |
startdate | string | true | none | Date in EST for when the data is required. For eg. '2020-09-01' (Due to the volume of the data, select only up to 90 days at a time e.g. 'startdate': '2020-06-01', 'enddate': '2020-08-29') |
symbols | [string] | true | none | Ticker symbol of the security. For eg. ["AC"] for Air Canada or ["AC", "TD"] for Air Canada and TD or ["ALL_SYMBOLS"] for fetching all the symbols |
Advanced Daily Stats US Response
{
"data": [
{
"avg_sprd_bps": 0,
"avg_sprd_cent": 0,
"avgaskvol": 0,
"avgbidvol": 0,
"ca_symbol": "string",
"daily_trading_value_ca": 0,
"daily_trading_value_us": 0,
"daily_volume_ca": 0,
"daily_volume_us": 0,
"date_string": "string",
"effective_sprd_bps": 0,
"effective_sprd_cent": 0,
"secondaryclose": 0,
"symbol": "string",
"trade_count_ca": 0,
"trade_count_us": 0
}
],
"pageafter": 0,
"pagebefore": 0
}
Advanced Daily Stats US Response
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | [object] | false | none | Advanced Daily Stats US responses object |
» avg_sprd_bps | number | false | none | Average daily quoted spread. Spread bps = (ask price-bid price) / midpoint *10000 based on 1 second buckets when there are valid quotes for both bid & ask |
» avg_sprd_cent | number | false | none | Average daily quoted spread (spread = ask price-bid price) based on 1 second buckets when there are valid quotes for both bid & ask |
» avgaskvol | number | false | none | Total average offer volume (NBO) across all US marketplaces on a symbol at any given time, average taken over previous 30 days using 1 second snapshots |
» avgbidvol | number | false | none | Total average bid volume at top price level (NBB) across all US marketplaces on a symbol at any given time, average taken over previous 30 days using 1 second snapshots |
» ca_symbol | string | false | none | Identifies the ticker symbol of the security on the Canadian exchange |
» daily_trading_value_ca | number | false | none | For each trading day, total traded value across all Canadian venues account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» daily_trading_value_us | number | false | none | For each trading day, total traded value across all US venues account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» daily_volume_ca | number | false | none | For each trading day, total traded volume across all Canadian venues account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» daily_volume_us | number | false | none | For each trading day, total traded volume across all US venues account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» date_string | string | false | none | Identifies the local date |
» effective_sprd_bps | number | false | none | Effective Spread (bps) = Effective spread/midpoint *10000. Using same example as above: if NBBO is 1.00 - 1.05 and a trade occurs at 1.03 --> Eff spread (bps) = 2 X (1.03-1.025)/1.025 x10000 = 1bps |
» effective_sprd_cent | number | false | none | Effective Spread = 2 X |
» secondaryclose | number | false | none | Secondary close price identified as midpoint of the NBBO at 3:59.00.0000 PM EST |
» symbol | string | false | none | Identifies the Ticker symbol of the security |
» trade_count_ca | number | false | none | For each trading day, number of trades across all Canadian venues account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
» trade_count_us | number | false | none | For each trading day, number of trades across all US venues account for cancelled trades during regular market session (9:30 am to 4:00 pm) |
pageafter | integer | false | none | Resultset is paginated - mention record offset if data is needed after a specific record |
pagebefore | integer | false | none | Resultset is paginated - mention record offset if data is needed before a specific record |
data api Automation
{
"billingTag": "string",
"columnDesc": {},
"countryCode": "us",
"docDescription": "string",
"endPoint": "string",
"formatFields": {},
"fromBranch": "string",
"licensedFields": [
"string"
],
"orderByFields": {
"asc": [
"string"
],
"desc": [
"string"
]
},
"pageLimit": 0,
"productName": "string",
"requestParams": {
"column": "string",
"condition": "gt",
"description": "string",
"pattern": "string",
"required": true,
"type": "string"
},
"requestResponseDescription": "string",
"requestResponsePrefix": "string",
"requestResponseTitle": "string",
"sfConfig": {
"database": "string",
"schema": "string",
"warehouse": "string"
},
"subProductName": "string",
"tableName": "string"
}
data api Automation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
billingTag | string | false | none | Specifies the billing tag to be mapped for the data API |
columnDesc | object | false | none | Specifies the description for each attribute in the response model, It will be displayed in the response schema for each field. Its an object with one or more key value pair |
countryCode | string | false | none | Country code |
docDescription | string | true | none | Specifies the description for the data api, This will be displayed in the documentation website |
endPoint | string | true | none | Data API will be exposed with this end point for the given table name |
formatFields | object | false | none | Specifies the format to be applied on the column while fetching from the snowflake database. Its an object, It can have one or more key value pair |
fromBranch | string | true | none | Specifies the branch to be used to cut the new branch, Default is prod branch |
licensedFields | [string] | false | none | Specifies which column in the table to be allowed only for the licensed users, Its array of values |
orderByFields | object | false | none | Specifies the columns to be used to sort the response |
» asc | [string] | false | none | none |
» desc | [string] | false | none | none |
pageLimit | integer | false | none | Specifies the number of results returned in the data api response(Default 1000) |
productName | string | true | none | This is used in the billing authorizer to validate the subscription of the user while accessing the data api, Also Folders will be created with this name, all the sub products services will be placed under this folder. Folder name might not be same as product name if space or any special characters provided. |
requestParams | object | false | none | Specifies the attribute/request parameter to be used in the request models, These attributes actually define the request params for the data api we are creating with automation script. It's an Object. |
» column | string | false | none | Specifies which column in the table to be used to filter the record.This will be used to write the query condition in the lambda file.User input for this “Key” on the data api will be filtered with this column while querying the table |
» condition | string | false | none | Specifies which operators to be used in the query filter on the table column with the user input. |
» description | string | false | none | Specifies the be used in the request model for the property |
» pattern | string | false | none | Specifies the regex pattern to be used in the request model to validate the user input by the API gateway |
» required | boolean | false | none | Specifies fields to be marked as mandatory or optional in the request model. |
» type | string | false | none | Specifies data type for the user input |
requestResponseDescription | string | true | none | Provides the descriptions for the request and response model |
requestResponsePrefix | string | false | none | Request and Response model file will created with this name, if not provided it will use the “subProduct Name+Country Code” for the file name |
requestResponseTitle | string | true | none | Provides the value for the title attribute for the request and response model. |
sfConfig | object | false | none | Specifies the schema, warehouse and databas |