Skip to main content

POST Data

Returns data from specified dataset in delimited (default) or JSON format depending on the value of the ACCEPT header in the request. Advanced selection criteria including filters are available via the request payload.

POST /data/group/{group name}/name/{dataset name}

Request Payload Parameters

parameter description example default
fields Comma delimited list of field names to retrieve. "fields" : ["mpid","issuesymbolidentifier" ] all fields are returned
compareFilters Used for field value comparisons with standard operators. Greater, Lesser, Equals, GTE, LTE, NOT_EQUAL. "compareFilters": [{
"fieldName" "ats_mp_id",
"fieldValue" "ADAM",
"compareType" "EQUAL"
}]
n/a
dateRangeFilters Used for giving a date range for a specific field value. The dates must follow a formatting of YYYY-MM-DD or YYYY-MM-DD HH:mm:ss.SSS.

"dateRangeFilters": [ {

    "startDate" "2017-02-10 12:12:12.000",

    "endDate" "2017-05-10 12:12:12.000",

    "fieldName" "trade_time"

  } ]

n/a
domainFilters Used for specifying a filter based on specific values for a field. "domainFilters": [{
"fieldName" "MarketCenter",
"values" : [ "A""B""C""J" ]
}]
n/a
limit

Number of records to return. 

NOTE: See the Platform Usage Limits page for more details.

"limit" : 5000 1000
offset

Record number to start with (exclusive). Range of records to be returned is offset record plus limit. If offset is 0 and limit is 20, then records 1 to 20 are returned for a total of 20 records. If offset is 10 and limit is 10, then records 11 to 20 are returned.

NOTE: See the Platform Usage Limits page for more details.

"offset" : 2000 0
quoteValues Can be used to specify if values should be quoted if the Accept header is text/plain. "quoteValues" false true
delimiter Can be used to specify a character delimiter if the Accept header is text/plain. Allowed values are pipe, comma, tab, or control A. "delimiter" "|" comma (",")

Request Headers

header required description default
Authorization required Contains the word Basic followed by a space and a base64-encoded string of the form "clientid:clientsecret". n/a
Accept optional Can be used to specify a format for the data returned. Supports (application/json, text/plain). If the native data format cannot be converted between JSON/CSV then a status code of 400 will be returned. If an unsupported MIME type is supplied, then  a status code 406 is returned. text/plain
Data-API-Version optional Used to specify version of the API to use. version 1

Sample Request

https://api.finra.org/data/group/otcmarket/name/weeklysummary

Sample Request Payload


{
"fields":["issueSymbolIdentifier", "issueName", "totalWeeklyShareQuantity","totalWeeklyTradeCount","lastUpdateDate"],  
"compareFilters": [ 
{  "compareType": "equal", "fieldName": "tierIdentifier", "fieldValue": "T1" },
{  "compareType": "greater", "fieldName": "summaryStartDate", "fieldValue":"2019-09-01"},
{  "compareType": "equal", "fieldName": "summaryTypeCode", "fieldValue": "OTC_W_SMBL" },
{  "compareType": "equal", "fieldName": "issueSymbolIdentifier", "fieldValue" : "AAPL"}
]
}

Sample Response


[

{

"totalWeeklyShareQuantity": 26209776,

"totalWeeklyTradeCount": 123120,

"issueSymbolIdentifier": "AAPL",

"issueName": "Apple Inc. Common Stock",

"lastUpdateDate": "2019-09-23"

},

{

"totalWeeklyShareQuantity": 59995277,

"totalWeeklyTradeCount": 296668,

"issueSymbolIdentifier": "AAPL",

"issueName": "Apple Inc. Common Stock",

"lastUpdateDate": "2019-09-30"

},

{

"totalWeeklyShareQuantity": 59932154,

"totalWeeklyTradeCount": 256271,

"issueSymbolIdentifier": "AAPL",

"issueName": "Apple Inc. Common Stock",

"lastUpdateDate": "2019-10-21"

},

{

"totalWeeklyShareQuantity": 36183038,

"totalWeeklyTradeCount": 157411,

"issueSymbolIdentifier": "AAPL",

"issueName": "Apple Inc. Common Stock",

"lastUpdateDate": "2019-10-17"

},

{

"totalWeeklyShareQuantity": 46913014,

"totalWeeklyTradeCount": 167054,

"issueSymbolIdentifier": "AAPL",

"issueName": "Apple Inc. Common Stock",

"lastUpdateDate": "2019-10-07"

}

]