Filter tick history by Type

I'm using the rest API to pull tick history using python. This pulls Quote and trades. Is there a way to only pull records where Type=Trade?


{
 "ExtractionRequest": {
 "@odata.type":
"#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
 "ContentFieldNames": [


 ],
 "IdentifierList": {
 "@odata.type":
"#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
 "InstrumentIdentifiers": [
 {
 "Identifier": "SPXA192420000.U",
 "IdentifierType": "Ric"
 }
 ],
 "ValidationOptions": null,
 "UseUserPreferencesForValidationOptions": false
 },
 "Condition": {
 "MessageTimeStampIn": "GmtUtc",
 "ReportDateRangeType": "Range",
 "QueryStartDate": "2021-08-02T17:00:00.000Z",
 "QueryEndDate": "2021-08-02T19:59:59.000Z",
 "DisplaySourceRIC": true
 }
 }
}

1682102948980.png


Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @brian.collins

    Thanks for reaching out to us.

    I checked and found that the TickHistoryRawExtractionRequest extraction doesn't have a condition to filter the data by the update type.

    You may need to use different report templates, such as TickHistoryTimeAndSalesExtractionRequest. You can specify trade-related fields in the content fields of this report template.

    {
      "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
        "ContentFieldNames": [
          "Trade - Exchange/Contributor ID",
          "Trade - Price",
          "Trade - Volume",
          "Trade - Market VWAP",
          "Trade - Block Trade",
    ...

    You can refer to the REST API Reference Tree for more information.

    I hope that this information is of help.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.