Search Call
/search
Returns the SMA Universe data.
Single Ticker Recent Data
curl --compressed --data \
"api_key=***3c1397f109dd7d62515b49b8b74e9a263c***&function=search" \
"https://api.socialmarketanalytics.com/api/search?subject=TSLA&ontology=ticker&items=sscore,smean,svolume&dates=datetime+eq+recent&frequency=1m&sort=sscore+desc,smean+desc,svolume+desc"
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$func = 'search';
$key = "0526f4275xxxxxxxxxxxxxxxxxxxxx4432ae2c35dd7";
$ontology = "ticker";
$terms = "sscore,smean,sdispersion";
$dates = "datetime+eq+recent";
$sort = "sscore+desc,smean+desc,sdispersion+desc";
$url = "https://api.socialmarketanalytics.com/api/search?subject=TSLA&ontology=" . $ontology . "&items=" . $terms . "&dates=" . $dates . "&sort" . $sort;
$jsonData = array(
'api_key' => $key,
'function' => $func);
try {
$ch = curl_init($url);
if (FALSE === $ch) {
throw new Exception('failed to initialize');
}
//security issues?
//http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
if (FALSE === $result) {
throw new Exception(curl_error($ch), curl_errno($ch));
}
echo($result);
} catch (Exception $e) {
trigger_error(sprintf(
'Curl failed with error #%d: %s', $e->getCode(), $e->getMessage()), E_USER_ERROR);
}
?>
api_key = "******86e961c2f130c8b0df45940df9******"
response = Curl.post "https://api.socialmarketanalytics.com/api/search", {
'function' => 'search',
'api_key' => api_key,
'subject' => 'TSLA',
'ontology' => 'ticker',
'items' => 'sscore,smean,sdispersion',
'dates' => 'datetime+eq+recent',
'limit' => '1000',
'filter' => 'sscore+gt+3',
'sort' => 'sscore+desc,smean+desc,sdispersion+desc'
}
body = JSON.parse(response.body_str)
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package sma_api_ex;
import java.net.MalformedURLException;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
public class SMA_API_ex {
private final static String USER_AGENT = "Mozilla/5.0";
public static void main(String[] args) throws Exception {
String key = "0526f4275xxxxxxxxxxxxxxxxxxxxx4432ae2c35dd7";
String ontology = "ticker";
String terms = "sscore,smean,sdispersion";
String dates = "datetime+eq+recent";
String sort = "sscore+desc,smean+desc,sdispersion+desc";
String url = "https://api.socialmarketanalytics.com/api/search?subject=TSLA&ontology=" + ontology + "&items=" + terms + "&dates=" + dates + "&sort" + sort;
URL obj = new URL(url);
HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("User-Agent", USER_AGENT);
con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
String urlParameters = "api_key=" + key + "&function=search";
// Send post request
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(urlParameters);
wr.flush();
wr.close();
int responseCode = con.getResponseCode();
if (responseCode != 200) {
System.out.println("ERROR");
}
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);
}
}
#include<stdio.h>
#include<curl/curl.h>
main()
{
char *key = "0526f4275xxxxxxxxxxxxxxxxxxxxx4432ae2c35dd7";
char *ontology = "ticker";
char *terms = "sscore,smean,sdispersion";
char *dates = "datetime+eq+recent";
char *sort = "sscore+desc,smean+desc,sdispersion+desc";
char url[1042];
strcpy(url,"https://api.socialmarketanalytics.com/api/search?subject=TSLA&ontology=");
strcat(url,ontology);
strcat(url,"&items");
strcat(url,terms);
strcat(url,"&dates");
strcat(url,dates);
strcat(url,"&sort");
strcat(url,sort);
char pfields[1024];
strcpy(pfields,"api_key=");
strcat(pfields,key);
strcat(pfields,"&function=search");
CURL *curl;
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_POST, 1);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, pfields);
char *a=curl_easy_perform(curl);
char *b=curl_easy_cleanup(curl);
}
import urllib
import urllib.parse
import urllib.request
import json
# Tries to open the url with the params through the method specified
key = "0526f4275xxxxxxxxxxxxxxxxxxxxx4432ae2c35dd7";
function = "search"
ontology = "ticker";
terms = "sscore,smean,sdispersion";
dates = "datetime+eq+recent";
sort = "sscore+desc,smean+desc,sdispersion+desc";
method = "POST"
parms = {"api_key": key,"function": function}
urlParameters = "api_key=" + key + "&function=search";
url = "https://api.socialmarketanalytics.com/api/search?subject=TSLA&ontology=" + ontology + "&items=" + terms + "&dates=" + dates + "&sort" + sort+"?api_key"
values = {'api_key' : key,
'function' : function }
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
response = urllib.request.urlopen(req)
content = response.read()
json_data = json.loads(content.decode("utf-8"))
print(json_data)
Top 10 Recent Stocks by Positive S-Score
curl --compressed --data \
"api_key=***3c1397f109dd7d62515b49b8b74e9a263c***&function=search" \
"https://api.socialmarketanalytics.com/api/search?subject=all&ontology=ticker&items=sscore,smean,svolume&dates=datetime+eq+recent&frequency=1m&sort=sscore+desc,smean+desc,svolume+desc&limit=10"
Daily S-Score of AAPL
curl --compressed --data \
"api_key=***3c1397f109dd7d62515b49b8b74e9a263c***&function=search" \
"https://api.socialmarketanalytics.com/api/search?subject=AAPL&ontology=ticker&items=sscore,smean,svolume&filter=time+eq+0910&dates=datetime+ge+20190401&frequency=1d&limit=20"
JSON Response Example
{
"response": {
"tokendetails": {
"api_token": "dac28c9e53d7fa16420830aec88bca00",
"function": "search",
"request_quota_remaining": "180",
"expires": "2013-10-28 03:14:25",
"ip_address": "50.63.50.192",
"records_quota_remaining": "100"
},
"search_params": {
"subject": "all",
"ontology": "industry",
"items": "sscore,smean,sbuzz",
"dates": "datetime ge 15m",
"frequency": "1d",
"filter": "",
"sort": "sscore desc,smean desc,sbuzz desc",
"domain": "finance",
"format": "json",
"limit": "10",
"received": "2013-10-28 03:10:25",
"completed": "2013-10-28 03:10:25"
},
"data": [
{
"datetime": "2013-10-28 05:40:00",
"subject": "Tobacco Products, Other",
"sscore": "1.4731",
"smean": "-0.0095",
"sbuzz": "2.3810"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "Beverages - Brewers",
"sscore": "0.8580",
"smean": "0.1805",
"sbuzz": "1.3400"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "Sporting Goods",
"sscore": "0.8265",
"smean": "0.4546",
"sbuzz": "2.0410"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "Marketing Services",
"sscore": "0.7850",
"smean": "0.2787",
"sbuzz": "2.0550"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "REIT - Office",
"sscore": "0.7780",
"smean": "0.2223",
"sbuzz": "1.5620"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "Health Care Plans",
"sscore": "0.6838",
"smean": "0.2249",
"sbuzz": "1.2270"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "General Building Materials",
"sscore": "0.6562",
"smean": "0.9809",
"sbuzz": "1.5220"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "Security & Protection Services",
"sscore": "0.5446",
"smean": "0.2790",
"sbuzz": "0.0000"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "Scientific & Technical Instruments",
"sscore": "0.5107",
"smean": "0.8250",
"sbuzz": "1.8800"
},
{
"datetime": "2013-10-28 05:40:00",
"subject": "Wireless Communications",
"sscore": "0.4528",
"smean": "0.9301",
"sbuzz": "0.6310"
}
]
}
}
{
"response": {
"tokendetails": {
"api_token": "ff0533e171594cc4710bd64d02bcf0bf",
"function": "search",
"request_quota_remaining": 179,
"expires": "2015-08-12 02:46:21",
"ip_address": "21.251.31.61",
"records_quota_remaining": 999998
},
"search_params": {
"subject": "AAPL,BBRY,GOOGG",
"ontology": "ticker",
"items": "sscore,smean,sdispersion",
"dates": "datetime eq recent",
"frequency": "",
"cycle": "",
"filter": "",
"sort": "sscore desc,smean desc,sdispersion desc",
"domain": "finance",
"format": "json",
"limit": "10",
"timezone": "US\/Eastern",
"received": "2015-08-12 03:41:21",
"completed": "2015-08-12 03:41:21"
},
"data": [
{
"datetime": "2015-08-12 03:40:00",
"subject": "AAPL",
"sscore": "0.6000",
"smean": "49.8444",
"sdispersion": "0.245"
},
{
"datetime": "2015-08-12 03:40:00",
"subject": "BBRY",
"sscore": "0.1946",
"smean": "11.1128",
"sdispersion": "0.293"
}
],
"warnings": [
{
"warning_id": 4002,
"warning_message": "Subject list contains invalid tickers. ",
"invalid_terms": [
"GOOGG"
]
}
]
}
}
{
"response": {
"tokendetails": {
"api_token": "33a4b798bc6ac9bcd4ab8aedf16687f2",
"function": "search",
"request_quota_remaining": "180",
"expires": "2013-11-01 03:07:37",
"ip_address": "50.63.50.192",
"records_quota_remaining": "100"
},
"search_params": {
"subject": "all",
"ontology": "ticker",
"items": "sscore,smean,sbuzz",
"dates": "datetime eq recent",
"frequency": "",
"filter": "",
"sort": "sscore desc,smean desc,sbuzz desc1",
"domain": "finance",
"format": "json",
"limit": "10",
"received": "2013-11-01 03:07:43",
"completed": "2013-11-01 03:07:43"
},
"error": {
"error_code": 2115,
"error_message": "Invalid sort",
"description": "Specified sort is invalid. Default sort pattern is descending in order specified on items list. Items in sort pattern must appear on items list. Sort order must be either asc or desc.",
"invalid_params": {
"type": "sort",
"params": [
[
"sbuzz desc1"
]
]
}
}
}
}
Parameters
Parameters | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
key string API level Parameter | required | Key must be sent using POST method. Key parameter is required to call the API. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
function string API level Parameter | required | Function must be sent using POST method. Function parameter is required to tell the API which function needs to be called. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subject string | required | Subject parameter is directly dependent on ontology parameter.
Use all for complete SMA universe and custom for ontology universe. Multiple values are accepted. Only Comma separated values are allowed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ontology string | optional | Possible ontologies are ticker, tsx, index, universe, future, forex, etf, private_company, and crypto. Note that crypto search calls are reachable at https://api-cc.socialmarketanalytics.com/api/search, the other ontologies are reachable at https://api.socialmarketanalytics.com/api/search. Ontology parameter is case sensitive. API shall return error for more than 1 ontology in a request. Default value for ontology is ticker. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
items string | optional | Items available are ontology specific. S-Factor items are sscore, smean, sbuzz, svolume, sdelta, sdispersion, svolatility, svmean,svscore,s,svvolatility, raws,rawsscore,rawsmean, rawsvolatility, srank, companyname, sector, industry,description,active,raws50,rawsmean50, rawsvolatility50,rawsscore50, rawsaccel50,rawsvelocity50, raws200,rawsmean200,rawsvolatility200, rawsscore200,rawsaccel200 and rawsvelocity200. Items parameter is case sensitive. Multiple items values can be specified by providing a Comma delimited list. For example: "items=sscore,svolume,sdispersion". Default value of items is sscore,sbuzz,sdispersion. Table of items available by ontology
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dates string | optional | Possible value is either a specific datetime or range of datetimes. For datetime range, provide Start and End datetime. Possible date operators are lt, le, gt, ge and eq. Dates parameter is case sensitive. Plus (+) signs can be used to format the dates parameter for a request. Start and End datetime values are separated by Comma.
Ex (Specific datetime):
dates=datetime+ge+201310290000 Default value for dates is datetime+eq+recent. Note: When using Specific datetime, timestamps following datetime+eq+ need to correspond to the data points available based on different frequency settings. (e.g. datetime+eq+202402060910 or datetime+eq+202402061615 with 1d frequency setting. Please refer to the Frequency section below for more information on which timestamps are available for each freqeuncy. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
frequency string | optional | Possible frequencies are 1d, 1h, 30m,15m and 1m. Frequency parameter is case sensitive. Default value for frequency is 1m. 1d frequency data points are available at 09:10am and 16:15pm ET. 1h and 30m frequency data points are available at every minute. 15m frequency data points are available at the :10, :25, :40, and :55th minutes. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cycle (deprecated) string | optional |
Cycle parameter is directly dependent on frequency parameter. Cycle parameter must be less than or equal to frequency parameter. API shall return error for more than 1 cycle in a request. Cycle is used in conjunction with frequency to specify the exact buckets to return. For a 15 minute frequency, there are 15 unique cycles. Cycle of bucket = bucket time % frequency To return Social Market Analytics standard 15 minute buckets, at 10, 25, 40 and 55 minutes past the hour, use: frequency=15m&cycle=10m. To return 15 minute buckets on the quarter hours use: frequency=15m&cycle=0m. Multiple cycles can also be added: frequency=1d&cycle=1h,10m. Possible cycles values is numeric value with m, h or d suffix. Cycle parameter is case sensitive. Ex:cycle=10m |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
filter string | optional | Possible filters are sscore, smean, sbuzz, svolume, sdelta, sdispersion, svolatility, svmean,svscore,s,svvolatility, raws,rawsscore,rawsmean, rawsvolatility, srank, companyname, sector, industry,description,active,raws50,rawsmean50,rawsvolatility50,rawsscore50,rawsaccel50,rawsvelocity50, raws200,rawsmean200,rawsvolatility200, rawsscore200,rawsaccel200 and rawsvelocity200. Possible filter operators are lt, le, gt, ge and eq. Filter parameter is case sensitive. Multiple values are accepted. Only Comma separated values are allowed. Plus (+) signs can be used to format the filter parameter for a request.
Ex (Single filter value):
sscore+lt+3 Some filters are not allowed with specific ontologies. Check "items" section for more information. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sort string | optional | Sort parameter is directly dependent on items parameter with addition of asc or desc direction. Sort parameter is case sensitive. Multiple values are accepted. Only Comma separated values are allowed. Plus (+) signs can be used to format the sort parameter for a request.
Ex (Single sort value):
sscore is selected Items parameter, and for sort value score is concatenated with
either asc or desc. Possible sort value shall be sscore+desc or sscore+asc. Default values for sort parameter is based on items parameter. All selected items parameter shall be concatenated with desc. Default values for items are sscore,sbuzz,sdispersion then possible sort default values shall be sscore+desc,sbuzz+desc,sdispersion+desc. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
domain string | optional | Possible domain values are finance, stocktwits, and reddit. finance: to access Twitter feed stocktwits: to access StockTwits feed reddit: to access reddit feed Default value for domain is finance. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
format string | optional | Possible format values are json and xml. Default value for format is json. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
limit integer | optional |
The limit parameter constrains the maximum number of records returned by a query. Possible limit value is any positive integer. Maximum allowed limit is 10000. Default value for limit is 10. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timezone string | optional | The default time zone is ‘US/Eastern’ or ‘America/New_York’. This parameter can be used to choose the time zone of the API query. The returned data datetime will be reported for this time zone as well. |
Return Value
Return Value | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JSON Array | Response JSON array shall contain error (optional), API token details, search
parameters and resultant data.
|
Errors
Code | Message | Description |
---|---|---|
1000 | Authentication error | Authentication error |
1001 | Forbidden | Forbidden |
1002 | Your API access is suspended | Please contact support for instructions on how to gain access privileges. |
1003 | Secure connection required. Please use https to connect | API requests must be made with https, not http. |
1004 | Must use POST to send API key & function | For security purposes, API requires that key and function be sent via POST. |
1005 | Your API seat access is suspended | Please contact support for instructions on how to gain access privileges. |
1011 | API key is missing | An API key is required to access service. |
1012 | Invalid API key | API key is not recognized. Please verify your API key. |
1013 | Expired API token | Expired API token |
1014 | Invalid API token | Token is not valid for this API function. |
1015 | Invalid API token | Token is not valid for this client. |
1016 | Your ontology access is suspended | Your access on given ontology is suspended. Please contact support for instructions on how to gain access privileges. |
1017 | Your item access is suspended | Your access on given item(s) is suspended. Please contact support for instructions on how to gain access privileges. |
1018 | Your API params settings are disabled | Please contact support for instructions on how to gain access privileges. |
1050 | Gone. API endpoint is not available | API URL has changed. |
1019 | Your domain access is suspended | Your access on given domain is suspended. Please contact support for instructions on how to gain access privileges. |
1100 | Quota exceeded | Quota exceeded |
1101 | Request limit exceeded | You have exceeded your request limit. Please contact support if you wish to increase your limit. |
1102 | Subject limit exceeded | You have exceeded your subject limit. Please contact support if you wish to increase your limit. |
1103 | Record limit exceeded | You have exceeded your record limit. Please contact support if you wish to increase your limit. |
1110 | Exceeded number of clients | Please contact support to increase the number of clients licensed to use this API key. |
2000 | Missing required parameter | Missing required parameter |
2001 | API function required | API function is required to get response from API. Valid function value is search. |
2011 | Ontology is required | Ontology is missing. Possible ontologies are ticker, index, universe, future, forex, etf, stockactivity, forexactivity, futureactivity, and etfactivity. |
2012 | Subject is required | Subject is missing. Subject choices depend on ontology. |
2013 | Items are required | Items are missing. Possible items are sscore, smean, sbuzz, svolume, sdelta, sdispersion, svolatility, svmean, svscore, s, svvolatility, raws, rawsscore, rawsmean, rawsvolatility, srank, companyname, sector, industry, active, description, raws50, rawsmean50, rawsvolatility50, rawsscore50, rawsaccel50, rawsvelocity50, raws200, rawsmean200, rawsvolatility200, rawsscore200, rawsaccel200 and rawsvelocity200. |
2100 | Syntax error | Syntax error |
2101 | Unknown parameter | Unknown parameter |
2111 | Invalid domain | The domain is not recognized. Domain must be finance. |
2112 | Invalid ontology | The ontology is not recognized. Ontology must be one of ticker, index, universe, future, forex, etf, stockactivity, futureactivity, forexactivity, etfactivity. |
2113 | Invalid subject | A subject is not recognized. Please review valid subject choices for your chosen ontology. |
2114 | Invalid item | A provided item is not recognized. Valid items are sscore, smean, sbuzz, svolume, sdelta, sdispersion, svolatility, svmean, svscore, s, svvolatility, raws, rawsscore, rawsmean, rawsvolatility, srank, companyname, sector, industry, active, description, raws50, rawsmean50, rawsvolatility50, rawsscore50, rawsaccel50, rawsvelocity50, raws200, rawsmean200, rawsvolatility200, rawsscore200, rawsaccel200 and rawsvelocity200. |
2115 | Invalid sort | Specified sort is invalid. Default sort pattern is descending in order specified on items list. Items in sort pattern must appear on items list. Sort order must be either asc or desc. |
2116 | Invalid frequency | Your specified frequency is not recognized. Possible frequencies are 1d, 1h, 30m and 15m. |
2117 | Invalid filter | Your provided filter is not recognized. Results can be filtered on sscore, smean, sbuzz, svolume, sdelta, sdispersion, svolatility, svmean, svscore, s, svvolatility, raws, rawsscore, rawsmean, rawsvolatility, srank, companyname, sector, industry, active, description, raws50, rawsmean50, rawsvolatility50, rawsscore50, rawsaccel50, rawsvelocity50, raws200, rawsmean200, rawsvolatility200, rawsscore200, rawsaccel200 and rawsvelocity200. Logical operators are lt, le, gt, ge and eq. |
2118 | Invalid limit | The limit specified is not recognized. Limit must be an integer. Limit value should be between 1 and 15000, inclusive. |
2119 | Invalid format | Your provided format is not recognized. Valid formats are json and xml. |
2120 | Invalid date | Your date parameter is invalid. Default pattern is (datetime+eq+recent). Valid logical operators are lt, le, gt, ge and eq. Valid date formats are YYYYMMDD and YYYYMMDDHHII. |
2121 | Invalid API function | Your specified function is not recognized. Valid function value is search. |
2122 | Invalid time zone | The specified time-zone is not recognized. |
2123 | Invalid cycle | Cycle is not recognized. Valid cycle format is a numeric value with m, h or d suffix. |
2124 | Invalid cycle | Cycle requires frequency to be set. |
2125 | Invalid cycle | Cycle must be less than or equal to frequency. |
2126 | Prohibitied Item(s) | Provided item(s) access is prohibitied. Please contact support for instructions on how to gain access privileges. |
2127 | Prohibitied Filter(s) | Provided filter(s) access is prohibitied. Please contact support for instructions on how to gain access privileges. |
2128 | Prohibitied Sort(s) | Provided sort(s) access is prohibitied. Please contact support for instructions on how to gain access privileges.. |
2129 | Invalid domain | The ontology is not associated with the provided domain. |
2201 | Only one domain may be present in a request | Only one domain may be present in a request |
2202 | Only one ontology may be present in a request | Only one ontology may be present in a request |
2203 | No custom list found | No user custom list found in our records. Please verify your custom list on our site. |
3000 | Internal Error | Your API call resulted in an internal server error. Please verify your parameters. If this error persists, please contact support. |
3001 | Service Unavailable. Api is down or being upgraded | Service is temporarily unavailable. Api is down or being upgraded. If this error persists, please contact support. |
3002 | Server capacity exceeded | Server capacity exceeded |
3003 | Database server is down. We expect to be back shortly | Database server is down. We expect to be back shortly. Please contact support if problem persists. |
3103 | Gateway timeout. Please try again | Gateway timeout. Please try again |
4001 | Invalid file type, please select valid file (i.e., html, txt, pdf) | We have uploaded the file, however, this file type is not supported |
4002 | Invalid document date | Invalid document date, Valid date formats is M-d-Y (e.g. Jul-24-2019) |
4003 | Invalid document id | Document id should be alpha numeric |
4004 | Tracking code | Tracking code is missing |
4005 | Invalid tracking code | The provided tracking code is not valid |
4006 | Document date is required | Required parameters are document_date, document_id, document_type, company_name) |
4007 | Document id is required | Required parameters are document_date, document_id, document_type, company_name) |
4008 | Document type is required | Required parameters are document_date, document_id, document_type, company_name) |
4009 | Company name is required | Required parameters are document_date, document_id, document_type, company_name) |
4010 | Comment is required | comment parameter is required) |
4011 | Company ID is required | Company ID parameter is required) |
4012 | Reprocessed Files | No reprocessed file found |
4013 | Document ID is required | Document ID is required and should be alpha numeric! |
4014 | Company ID is required | Company ID (cik) is required and should be numeric! |
4015 | Empty | No document found against this criteria! |
4016 | Countrycode Max length | Countrycode should not be greater than 15 characters |
4017 | Language Max length | Language should not be greater than 20 characters |
4018 | Invalid JSON | JSON is either invalid or null. |
4019 | No Data | Symbol does not have sufficient activity to derive requested metric |
4020 | Internal Error | Your API call resulted in an internal server error. Please verify your parameters. If this error persists, please contact support. |
4021 | Document ID is required | The document ids are missing or validation for the provided document ids are failed. |
Warnings
Code | Subject |
---|---|
4000 | Symbol does not have sufficient activity to derive requested metric |
4001 | Your record limit is changed due to short record limit. |
4002 | Subject list contains unrecognized term(s). |
4003 | Filter list contains incorrect items(s) based on the selected ontology. |
4004 | Sort list contains incorrect item(s) based on the selected ontology. |
4005 | Item list contains incorrect item(s) based on the selected ontology. |
4006 | Item list contains prohibitied item(s). |
4007 | Sort list contains prohibitied item(s). |
4008 | Filter list contains prohibitied item(s). |
4009 | We have disabled sorting with multiple ordering to achieve better efficiency. The current applied order is |