question

Upvotes
Accepted
27 1 1 0

TRTH REST API for instrumentSearch

Hi Team,

From DSS GUI, we could choose the "Search Type" with "Historical". but for API it seems no parameter to set it. Could you pls help how to solve this issue ?

The reason why i ask this question is instrument NGN=D1 and USDLAK=LAOV could only be searched under "Historical", which caused I can't extract data with "ExtractRaw" method.

Thanks

tick-history-rest-api
1621323306595.png (31.1 KiB)
1621323401961.png (56.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
13k 32 12 18

@gang.chen1, here is my request message:

{
  "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
    "ContentFieldNames": [
    ],
    "IdentifierList": {
      "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
      "InstrumentIdentifiers": [{
          "Identifier": "USDLAK=LAOV",
          "IdentifierType": "Ric"
        }, {
          "Identifier": "NGN=D1",
          "IdentifierType": "Ric"
        }
      ],
      "UseUserPreferencesForValidationOptions": false,
      "ValidationOptions": {
        "AllowOpenAccessInstruments": true,
        "AllowHistoricalInstruments": true,
        "AllowLimitedTermInstruments": true,
        "AllowInactiveInstruments": true,
        "AllowUnsupportedInstruments": true,
        "ExcludeFinrAsPricingSourceForBonds": true,
        "UseExchangeCodeInsteadOfLipper": true,
        "UseUsQuoteInsteadOfCanadian": true,
        "UseConsolidatedQuoteSourceForUsa": true,
        "UseConsolidatedQuoteSourceForCanada": true,
        "UseDebtOverEquity": true,
        "UseOtcPqSource": true,
        "AllowSubclassImport": true
      },
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2021-04-06T06:20:00.000Z",
      "QueryEndDate": "2021-04-06T06:40:00.000Z",
      "DisplaySourceRIC": false
    }
  }
}

and the response:

{
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#RawExtractionResults/$entity",
    "JobId": "0x07902b7fc86c9943",
    "Notes": ["Extraction Services Version 14.5.42294 (737b0965c07f), Built Apr  8 2021 13:43:46
        User ID: 9011672
        Extraction ID: 2000000261658069
        Schedule: 0x07902b7fc86c9943 (ID = 0x0000000000000000)
        Input List (2 items):  (ID = 0x07902b7fc86c9943) Created: 21/05/2021 08:50:51 AM Last Modified: 21/05/2021 08:50:51 AM
        Report Template: _OnD_0x07902b7fc86c9943 (ID = 0x07902b7fc88c9943) Created: 21/05/2021 08:49:47 AM Last Modified: 21/05/2021 08:49:47 AM
        Schedule dispatched via message queue (0x07902b7fc86c9943), Data source identifier (C9A16BDB67FF4D5AAB0004817491DF44)
        Schedule Time: 21/05/2021 08:49:48 AM
        Processing started at 21/05/2021 08:49:48 AM
        Processing completed successfully at 21/05/2021 08:50:51 AM
        Extraction finished at 21/05/2021 12:50:51 PM UTC, with servers: tm01n01, TRTH (34.108 secs)
        Instrument <RIC,USDLAK=LAOV> expanded to 1 RIC: USDLAK=LAOV.
        Historical Instrument <RIC,NGN=D1> expanded to 1 RIC: NGN=D1.
        Total instruments after instrument expansion = 2
        (RIC,NGN=D1,)  row suppressed for lack of 'FXD3 (Matching Market Data Standard)' permission.
        Manifest: #RIC,Domain,Start,End,Status,Count
        Manifest: USDLAK=LAOV,Market Price,,,Inactive,0
    "]
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

Hi @gang.chen1,

The Historical Search is not the part of Instrument Search, but a separate endpoint in itself.

See this -


1621353349952.png (47.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hi Gurpreet,

thanks and the Historical Search works, but how could I extract historical data ? seems ExtractRaw method doesn't work that you can refer to bellow screenshot.


1621392359976.png (104.1 KiB)
Upvotes
13k 32 12 18

Please see this question on how to enable historical instruments in your instrument lists.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hi Gurpreet,

Maybe I didn't described my question. Can you take a try to extract historical data for RIC NGN=D1 and USDLAK=LAOV with ExtractRaw method ? or any other method is okay.

Thanks

Upvotes
13k 32 12 18

Hi @gang.chen1,

The extraction works for NGN=D1, but I don't have permission for this instrument to get data. Other instrument USDLAK=LAOV seems to be 3rd party contributed data, and so am unable to get any data for it. It would recommend that you raise a service ticket at my.refinitiv.com to directly talk to a DSS content expert.

{
  "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#RawExtractionResults/$entity",
  "JobId": "0x078fdb121edc97f0",
  "Notes": ["Extraction Services Version 14.5.42294 (737b0965c07f), Built Apr  8 2021 13:43:46
    User ID: 9011672
    Extraction ID: 2000000261278315
    Schedule: 0x078fdb121edc97f0 (ID = 0x0000000000000000)
    Input List (1 items):  (ID = 0x078fdb121edc97f0) Created: 20/05/2021 09:47:20 AM Last Modified: 20/05/2021 09:47:20 AM
    Report Template: _OnD_0x078fdb121edc97f0 (ID = 0x078fdb121efc97f0) Created: 20/05/2021 09:47:19 AM Last Modified: 20/05/2021 09:47:19 AM
    Schedule dispatched via message queue (0x078fdb121edc97f0)
    Schedule Time: 20/05/2021 09:47:19 AM
    Processing started at 20/05/2021 09:47:19 AM
    Processing completed successfully at 20/05/2021 09:47:20 AM
    Extraction finished at 20/05/2021 01:47:20 PM UTC, with servers: x01q13
    Historical Instrument <RIC,NGN=D1> expanded to 1 RIC: NGN=D1.
    Total instruments after instrument expansion = 1
    (RIC,NGN=D1,)  row suppressed for lack of 'FXD3 (Matching Market Data Standard)' permission.
    Report suppressed because no instruments are permitted
  "]
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hi Gurpreet,

Your message is very helpful and get no permission back is reasonable. The message what i get is "All identifiers were invalid. No extraction performed".

Could you pls share your source code ? Thanks


Click below to post an Idea Post Idea