Intraday FX data from DataScope Select API

ChrisDeng
ChrisDeng Newcomer
edited January 29 in TRTH

Hey everyone,

I'm trying to retrieve tick-level FX traded price data from the REST API. However, the code I'm using (attached below) isn't returning any data.

I’d really appreciate any help—thanks in advance!

{
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
        "ContentFieldNames": [
            "Trade - Price"],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                {"Identifier": "EUR=",  "IdentifierType": "Ric"}, 
                {"Identifier": "JPY=X", "IdentifierType": "Ric"}
            ],
            "ValidationOptions": {
                "AllowHistoricalInstruments": "True"
            },
            "UseUserPreferencesForValidationOptions": "False"
        },
        "Condition": {
            "MessageTimeStampIn": "GmtUtc",
            "ReportDateRangeType": "Range",
            "QueryStartDate": "2022-01-01T00:00:00.000-05:00",
            "QueryEndDate":   "2022-01-31T00:00:00.000-05:00",
            "DisplaySourceRIC": "True",
            "TimeRangeMode": "Window"
        }
    }
}

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @ChrisDeng

    Thank you for reaching out to us.

    Those RICs may not have "Trade - Price".

    I tested it with the following request and could get the values of Bid and Ask prices. You may need to remove the TimeRangeMode property.

    {
    "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
    "ContentFieldNames": [
    "Trade - Price",
    "Quote - Bid Price",
    "Quote - Ask Price"
    ],
    "IdentifierList": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
    "InstrumentIdentifiers": [
    {"Identifier": "EUR=", "IdentifierType": "Ric"},
    {"Identifier": "JPY=X", "IdentifierType": "Ric"}
    ],
    "ValidationOptions": {
    "AllowHistoricalInstruments": "True"
    },
    "UseUserPreferencesForValidationOptions": "False"
    },
    "Condition": {
    "MessageTimeStampIn": "GmtUtc",
    "ReportDateRangeType": "Range",
    "QueryStartDate": "2022-01-01T00:00:00.000-05:00",
    "QueryEndDate": "2022-01-05T00:00:00.000-05:00",
    "DisplaySourceRIC": "True"
    }
    }
    }

    The output is:

    image.png

    Please contac the Tick History support team directly via MyAccount to verify the retrieved content.