get one or more metrics for one or more securities
get one or more metrics for one or more securities
Request
- Base URLhttps://api.merqube.com
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Taken as an Exact name to find a resource by
Taken as a comma delimited list of Exact names to find a list if resources by
single id to pull
Taken as a comma delimited list of ids to pull. ignored if ?names is specified.
comma delimited list of metrics
a tiny query language that allows filtering securities by their metric values. For example, 'get all futures contracts with expiry < x and root == Y'.
This is not a row-level filter. This is intended for 'metadata' like metrics and not for metrics with many values, as the results could be surprising. For example, 'get me prices for this week for all stocks that have ever closed above 1000' will contain this weeks results, and those prices may be < 1000; however, given this filter, those stocks at one point closed > 1000.
Parenthesis and logicl ors between clauses are not currently supported. An arbitrary number of and clauses is supported, and or within a clause is supported, IE 'root = X or Y'
The supported value oeprators are '!=', '==', '>=', '<=', '<', '>'
The first parsed operator in each ^ seperated clause is used as the operator - no additional checking is performed, so something like ==<= will be parsed as "is equal to <=" which is probably not what you want (and is likely to return an empty result set).
The supported logical operators are '^' (and, since & conflicts with URL query args) and ',' (or)
When the target value is a list (contains ','), the only two valid operators are != and ==. IE you cannot use <=X,Y etc.
When the operator is '==' and the value is '*', it means "the security has this metric defined at least once" (ie, we don't care about the value, just that the row exists)
Examples -
futures_contract...&securityfilter=root==BTC,B6 - all contracts with root euql to BTC or B6
futures_contract...&securityfilter=root==BTC^expiry.merq>=2022-01-01T00:00:00 - all contracts with BTC root expiring in 2022 or later
futures_root...&securityfilter=cme_limit_scaling_factor!=1.0 - all roots with a special/custom scaling factor such as cents
It can also replace the names= parameter, e.g.,
futures_root...&securityfilter=name==A6,B6 - get the roots named either A6 or B6 (returns 2 records)
only return securities in this namespace
Start date for the results/computation
End date for the results/computation
choose csv (Default json)
should be a date-time as a string; YYYY-mm-dd HH-mm-ss
view the database as_of a certain timestamp; data corrections that were backdated but inserted after this timestamp are ignored
should be a date-time as a string; YYYY-mm-dd HH-mm-ss
view only data that was received since this timestamp. Note that because data could be corrected for previous days (eff_ts), this does not necessarily mean that eff_ts >= the since date. This will obtain data that was known about on or after the since date, but that data could be a correction for previous days.
only applies when format!=csv. Includes additional information about the raw security api records, such as the provider timestamp and the source of the data. This is an employee only feature.
Shows the full history of records including corrected records (that is, no max(prov_ts))). This is an employee only feature. Also implies raw=true automatically. NOTE, this breaks the typical unique index of id/eff_ts/metric because if there were corrections, the metric may have changed multiple times - the new unique index includes prov_ts in this case.
turns on debugging information by injecting a debug section at the top level
Only return records that have been validated by internal data quality system. Defaults to false
Opt into replica/cache-tolerant reads. Defaults to false, which keeps DB reads on the writer and bypasses SecAPI full-query caches for stronger read-after-write consistency.
Response
ok
Example response
{
"results": [
{
"id": "0000699a-fcd7-45d4-8ce4-064a4ffeced0",
"metric": "Level",
"source": "some_gcp_feed"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.