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. The request payload must be a validly formatted JSON object.

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 providing a date range for a specific field value. Date format is YYYY-MM-DD or YYYY-MM-DD HH:mm:ss.SSS.

"dateRangeFilters": [ {

    "startDate" "2017-02-10",

    "endDate" "2017-05-10",

    "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 100, then records 11 to 110 are returned.

IMPORTANT: The offset has a max value of 500,000. See the Platform Usage Limits page for details on using filters in conjunction with the offset parameter to access records beyond a 500,000 offset range.

"offset" : 2000 0
quoteValues Can be used to specify quoted values when Accept header is set to text/plain. "quoteValues" false true
delimiter Can be used to specify a character delimiter when Accept header isset to text/plain. Allowed values are pipe (|), comma, tab, or control A. "delimiter" "|" comma
async The API request type. Set to true to specify an asynchronous request. Set to false to specify an synchronous request. "async" : true false
sortFields Comma delimited list of field names to sort by. You can prepend a + or - before the field name to specify an ascending or descending sort on that field respectively. See the Sorting Restrictions page for more details.  "-last_updated" ] sorting not performed

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

POST 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"

}

]