Parameter | Meaning | Data Type |
---|---|---|
T | Application Key which authenticates you with cloudquote (required) | Base64 string |
search | A compound query to execute | String |
sort | The sorting algorithm to use to sort/rank results | String |
limit | Number of results to return. Default: 25 | Number |
The response is the same as the getStockPrice API, detailed below.
The search string is a pipe | separated list of search queries, which evaluate one after another from left to right in order to fill in the desired number of results passed in the "limit" order.
Each search string executes against the securities index, matching on fields such as Ticker Symbol, or Company Name. Each index entry is a string in the format TYPE/VALUE, and can either be matched exactly, or with a prefix match.
If a particular query returns more than one result, the result is sorted using the algorithm chosen in the sort= parameter
For example, if a user were to enter the query GOOG
, an application might construct the following compound query:
SYMBOL/GOOG|NAME/GOOG|SYMBOL/GOOG*|NAME/GOOG
Let's break that down into each piece
SYMBOL/GOOG
GOOG
exactlyNAME/GOOG
GOOG
exactlySYMBOL/GOOG
GOOG
NAME/GOOG
GOOG
Currently, the only supported sort is "Popularity", which sorts the results based upon a popularity ranking. The base popularity ranking for a security is based upon the popularity/credibility of the exchange, and more popularity is added for Major Indexes (Dow, Nasdaq, S&P), Companies in the S&P 500 index, and other noteworthy securities that experience above average interest.
Passing an empty or invalid sort= parameter returns the results in the same order they were indexed in.
From market data feeds to website content solutions and trading software to our flagship financial portal, Barchart.com, and individual subscription services, Barchart is the definitive source for comprehensive financial data and information.