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
Question by noah.kauffman · Sep 18, 2017 at 11:09 AM · pythontick historyjson requestexchange by day

How to pull exchange by day in Tick History V 2.0.

Can someone please post a description of the JSON request to pull back exchange by day files under the new tick history API. In the old version we simply downloaded the exchange by day files from their respective folders (e.g. corporate actions, market data etc) from a single ftp location. In the new system it appears you actually have to make calls to pull back these files. Can you please post an example of what the JSON Request should look like to get back different files such as corporate actions, market data, etc. Also can you refer me to where in the documentation this service is located?

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.

14 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by zoya.farberov · Sep 18, 2017 at 12:03 PM

I think you are looking to retrieve Venue By Day, VBD files?

If this is correct, please refer to REST API Tutorial 2: Retrieving VBD files

If this is different, please update the question with more detail?

Thanks

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 Christiaan Meihsl · Sep 20, 2017 at 08:55 AM

@noah.kauffman, to add to Zoya's reply, on the topic of documentation:

  • VBD extractions are also called "Standard extractions".
  • VBD relevant calls are documented in the REST API User Guide chapter 11.
  • The REST API Reference Tree is the API call reference describing all calls with their input parameters and outputs.

To experiment you can also run VBD calls and display the corresponding HTTP requests and responses using the C# example application, which has example calls under its section "Standard Extractions" (refer to screenshot below). The C# example application installation and usage are described in the Quick Start. Even though it is called the C# example application, as it displays HTTP requests and responses it is useful whatever programming language you use.


standardextractions.png (73.5 KiB)
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
Answer by noah.kauffman · Sep 20, 2017 at 02:31 PM

Thanks for the response. Any chance you could post a python file with an example call? That would be super helpful. Otherwise, can you simply explain what the JSON Request should look like? I'm running the following request string and getting a 400 response.:


requestUrl='https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/Packages'
requestHeaders={
    "Prefer":"respond-async",
    "Content-Type":"application/json",
    "charset":"utf-8",
    "Authorization": "token " + token
}




requestBody= {
  "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#UserPackages",
  "value": [
    {
      "UserPackageId": "0x0460dc1d24a62cb1",
      "PackageId": "0x0460dc1d24a62cb1",
      "PackageName": "US Insider Trading Model v3",
      "SubscriptionId": "0x0400dc1d24a00cb3",
      "SubscriptionName": "Insider"
    },
    {
      "UserPackageId": "0x04f21a8d1a559cb1",
      "PackageId": "0x04f21a8d1a559cb1",
      "PackageName": "CSI - CHINA SECURITIES INDEX COMPANY",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f9cf0080e59cb1",
      "PackageId": "0x04f9cf0080e59cb1",
      "PackageName": "ZHC - China Zhengzhou Commodity Exchange",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f9cf0080a59cb1",
      "PackageId": "0x04f9cf0080a59cb1",
      "PackageName": "TOJ - Asia Composite",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f21a8d23f59cb1",
      "PackageId": "0x04f21a8d23f59cb1",
      "PackageName": "MCE - BME SPANISH EXCHANGE EQUITIES LEVEL 2",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f21a8d2a359cb1",
      "PackageId": "0x04f21a8d2a359cb1",
      "PackageName": "SAP - Sapporo Stock Exchange",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f21a8d20859cb1",
      "PackageId": "0x04f21a8d20859cb1",
      "PackageName": "JNX - SBI JAPANNEXT PTS Level 2",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f21a8d2c059cb1",
      "PackageId": "0x04f21a8d2c059cb1",
      "PackageName": "SHF - Shanghai Futures Exchange",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    }
  ]
}


r2 = requests.post(requestUrl, json=requestBody,headers=requestHeaders)


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.farberov · Sep 20, 2017 at 04:27 PM

I do not have VBD python script to share but the tutorial REST API Tutorial 2: Retrieving VBD files contains the complete details and requests, and sample responses for the steps that are necessary to retrieve VBD.

In the most basic form, they are:

Get available packages, with PackageIds:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/Packages

Get specific VBD file list by PackageId:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveryGetUserPackageDeliveriesByPackageId(PackageId='0x04f21a8d28f59cb1') 

Get specific VBD file:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveries('0x05a61154de8b3016')/$value 

Does this help?

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
Answer by noah.kauffman · Sep 20, 2017 at 04:31 PM

So I took a look at the tutorial, which is how I came to form that JSON request in the first place (it's the example they give in the documentation). However, I receive a 400 response from the request string mentioned in the tutorial. If you cannot provide an example in python would you at least be able to provide a sample JSON request string that we should be using? Thanks much!

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.farberov · Sep 22, 2017 at 01:25 PM

Hi @noah.kauffman,

Just to see how to request and use token in python, please refer to Python example in

TRTH Downloads Section

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
Answer by noah.kauffman · Sep 22, 2017 at 01:35 PM

I'm able to connect and download reports for tick data on demand. However, that example has three components to a call (a) requestUrl (b) requestHeader and (c) requestBody.

What you have told me is that for the type of call described that no request body should be sent. However, what I am seeing is that calling as follows:

requestUrl='https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/Packages'
requestHeaders={
    "Prefer":"respond-async",
    "Content-Type":"application/json",
    "charset":"utf-8",
    "Authorization": "token " + token
}
r2 = requests.post(requestUrl, headers=requestHeaders)

... Results in a response code of: 400

And more simply calling with the following ...

requestUrl='https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/Packages'
r2 = requests.post(requestUrl)

....

Leads to a response code of 401.

Could you please specify how this call is supposed to be made without requestBody, because I'm not able to get it to work.

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
Answer by noah.kauffman · Sep 22, 2017 at 02:28 PM

request-example-python.txt

Please see attached code, which generates a 400 response. Can you please let me know what the request call is supposed to look like if it is not supposed to look as I currently have it. Thanks!


request-example-python.txt (3.7 KiB)
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.farberov · Sep 22, 2017 at 03:37 PM

Hello @noah.kauffman,

Please note, the request should be GET, not POST for VBD, please try the following

 requestUrl='https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/Packages'
requestHeaders={
    "Prefer":"respond-async",
    "Content-Type":"application/json",
    "Authorization": "token " + token
}
r2 = requests.get(requestUrl, headers=requestHeaders)

please let us know if you get back 200/202 status + data

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
Answer by noah.kauffman · Sep 25, 2017 at 04:07 PM

nevermind - deleting last comment about packageids returning the same value.

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
Answer by noah.kauffman · Sep 25, 2017 at 04:28 PM

I'm receiving response code 400 when pulling for the following exchanges ...

Error 1:

NMS - NASDAQ Stock Market Exchange Large Cap (formally known as NASDAQ NATIONAL MARKET SYSTEM)

package_id: 0x04f21a8d26859cb1

GET: https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveryGetUserPackageDeliveriesByPackageId(PackageId='0x04f21a8d26859cb1')


Error 2: 

NSQ - Consolidated Issue Listed on Nasdaq Global Select Market

package_id: 0x04f21a8d27059cb1

GET: https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveryGetUserPackageDeliveriesByPackageId(PackageId='0x04f21a8d27059cb1')

other exchanges are working fine. Any idea why the error with the above exchanges?

Comment

People who like this

0 Show 2 · 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
zoya.farberov ♦♦ · Sep 25, 2017 at 04:53 PM 0
Share

Instead of /Packages

try

/UserPackages

to get the list, and this command will yield only packages your user is entitled for. Check if you are entitled to NASDAQ VBD.

avatar image
REFINITIV
zoya.farberov ♦♦ · Sep 26, 2017 at 10:16 AM 0
Share

Hi @noah.kauffman ,

I have just tested with these two ids, and these two do not come up, for me too. This is a suspected content missing issue, so the best way to investigate this is to open a content-related inquiry via My Account or to call Thomson Reuters Helpdesk to report this is happening and ask to investigate.

avatar image
Answer by noah.kauffman · Oct 16, 2017 at 01:57 PM

ok - all good now. thanks!

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
Answer by noah.kauffman · Oct 16, 2017 at 02:03 PM

So where do I submit the ticket regarding missing exchanges which I should be credentialed for.. is that via https://tickhistory.thomsonreuters.com/TickHistory/login.jsp or through another site?

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.farberov · Oct 16, 2017 at 04:21 PM

The best way to get a content issue that you suspect, looked and investigated by the appropriate content group, is by MyAccount Raise A Case or by calling Thomson Reuters Helpdesk.

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 >
14 People are following this question.

Related Questions

Calls to TRTH Service Appear Slow

TRTH: Python Extract market depth data

TRTH python code Username

TRTH Python API- Adding "wait" mechanism to the process

TRTH Date Time Response

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • 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
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges