Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TRTH /
avatar image
REFINITIV
Question by Vinod A · Mar 23 at 01:10 PM · trth-rest-api

Timestamp in Tick History Historical Search API

Client ID: 9013472

Please let us know if the timestamp in result is local or UTC for the response First Date and Last Date.

I provide the code below:

RESTURL = https://selectapi.datascope.refinitiv.com/RestApi/v1/

BULKSEARCHURL = RESTURL + "Search/HistoricalBulkSearch"

headers = {

'Authorization': "Token " + _token,

'X-Client-Session-Id': _sessionid,

'Prefer': 'respond-async',

'Content-Type': 'application/json; odata=minimalmetadata'

}

content = json.dumps({

'Request': {

'Identifiers': identifier,

'Range': {

'Start': start,

'End': end

},

'ResultsBy': 'Ric'}

})

toLog("Validating RICs...")

resp = requests.post(BULKSEARCHURL, data = content, headers = headers)


Result:
Results {
Identifier: "HUH1V.HE"
IdentifierType: Ric
Key: "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHxIVUgxVi5IRXw"
Description: "Historical Instrument"
DomainCode: "6"
FirstDate {
seconds: 987465600 //2001-04-16 20:00:00.000
}
LastDate {
seconds: 1647907200 //2022-03-21 20:00:00.000
}
}

Also, Could you just let me know how to add the option to define response results to be GMT or not for the API request?
Is there a way to add it into the body.


@Vinod A @Beera.Rajesh

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by zoya faberov · Mar 23 at 03:24 PM

Hello @Vinod A,

From my testing if I run the bulk search via API ( I test with Postman):

{
                {protocol}}{
                {host}}{
                {api}}Search/HistoricalBulkSearch
{
    "Request": {
        "Identifiers": [
            {
                "Identifier": "TRI.N",
                "IdentifierType": "Ric",
                "LineNumber": "0",
                "Exchange": "",
                "Currency": ""
            },
            {
                "Identifier": "CA8849031056",
                "IdentifierType": "Isin",
                "LineNumber": "1",
                "Exchange": "",
                "Currency": ""
            }
        ],
        "Range": {
            "Start": "2015-11-17T00:00:00.000Z",
            "End": "2015-11-24T00:00:00.000Z"
        }
    }
}

My result is:

{
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Search.HistoricalBulkSearchResult",
    "Results": [
        {
            "Identifier": "TRI.N",
            "IdentifierType": "Ric",
            "Source": "",
            "Key": "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHxUUkkuTnw",
            "Description": "Historical Instrument",
            "InstrumentType": "Unknown",
            "Status": "Valid",
            "DomainCode": "6",
            "FirstDate": "1996-01-02T00:00:00.000Z",
            "LastDate": "2022-03-23T00:00:00.000Z",
            "History": []
        },
...

Where Z is the zone designator for the zero UTC offset.

Do you observe the same format of the results?

If I try to pass the format such as in the comment in the question:

       "Range": {
            "Start": "2001-04-16 20:00:00.000",
...

this results in:

{
    "error": {
        "message": "Malformed request payload: Invalid DateTimeOffset format '2001-04-16 20:00:00.000Z' for property Start.  Expected 'year \"-\" month \"-\" day \"T\" hour \":\" minute [ \":\" second [ \".\" fractionalSeconds ] ] ( \"Z\" / sign hour \":\" minute )'."
    }
}

Further, per HistoricalBulkSearch spec in REST API Reference Tree there is no option to specify a different request or result date time zone.

I believe I know what you refer to, with several of the extraction request types, an option to specify time zone for request and for result is included, but not for HistoricalBulkSearch.

Hope this information helps?



Comment
Jirapongse

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Vinod A · Mar 25 at 12:24 PM

Hi @zoya faberov Thank you.

But wanted to how client was able to get the result without the GMT timezone. Below highlighted; is it considering his local time or User Preference.
Client Result:


Results {
Identifier: "HUH1V.HE"
IdentifierType: Ric
Key: "VjF8MHgzMDAwMDAwMDAwMDAwMDAwfDB4MzAwMDAwMDAwMDAwMDAwMHx8fHx8fHxIVUgxVi5IRXw"
Description: "Historical Instrument"
DomainCode: "6"
FirstDate {
seconds: 987465600 //2001-04-16 20:00:00.000
}
LastDate {
seconds: 1647907200 //2022-03-21 20:00:00.000
}
}

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by zoya faberov · Mar 25 at 09:40 PM

Hello @Vinod A ,

More information from the client would be very helpful:

  • The complete request being submitted
  • Any non-default settings in their Datascope User Preferences



Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

Connection reset by peer error

Tick History Relative Query

Why TR_TRD_FLG value doubled quoted in TRTH normalized

Can we use the Cloud berry application for the S3 bucket migration? Or can you make a separate bucket for us? Or can we sync our S3 bucket with yours?

Why are these future contract RICs inconsistent from FuturesAndOptionsSearch?

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • FX Venues
    • FX Trading – RFQ Maker
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • Yield Book Analytics
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges