Tick History's REST API is a Representational State Transfer (REST)-compliant API that programmatically exposes Tick History functionality on the DataScope Select platform. Client applications can be written in most programming languages, such as C#, C++, Visual Basic, Java, Python, Objective-C, and Swift.
The REST API supports both kinds of Tick History reporting:
- Custom reporting, in which you specify all report attributes.
- Standard reporting, also called Venue by Day (VBD), which automatically generates a day's complete trading data for a given exchange.
The REST API supports two custom reporting workflows:
On demand, in which you specify the fields and instruments directly in a single HTTP request. This requires that you know the field names and the identifiers (such as RICs or CUSIPs) of the instruments that you want in your report. The report begins running as soon as you submit the request.
In most cases you use the ExtractRaw endpoint, and retrieve the report as a raw stream of CSV data in compressed (gzip) format. For some types of reports you can also use the ExtractWithNotes endpoint, which provides the report as JSON data in the body of the HTTP response.
This workflow is faster to code and more concise than the stored & scheduled workflow.
- Stored & scheduled, in which you specify the instruments in an instrument list, and specify the report fields, conditions, and formatting in a report template. The instrument list and report template persist beyond the current API request, and provide you with a way of easily specifying the same instruments, and the same report fields and formatting, in other requests. The report begins running at the time at which you have scheduled it to begin (which can be immediately or in the future) or when it is triggered by an event that you have specified.
You retrieve the report by downloading a compressed (gzip) file of CSV data. (Note that the report output parameters Destination, DeliveryType, CompressionType, and OutputFormat are not supported for the Tick History Time and Sales, Market Depth, Intraday Summaries, and Raw report types.)
This workflow requires more HTTP requests than the on-demand workflow. It is very effective for managing bulk scheduled tasks.
REST API Toolkit
The REST API can be used with a toolkit or by communicating directly with the server using HTTPS. Currently there is a .NET version of the toolkit. The toolkit is the recommended way to communicate with the server, but one may also communicate directly over HTTPS with other languages.
A sample client, the REST API Example Application, is provided to illustrate the use of the REST API. It contains sample REST API client code samples for use in testing and developing client programs. The samples can be run from the provided application. The code can be analyzed to help understand it, and can be reused to help create customized client programs. The API Example Application comes with an executable that can be run on any Windows machine. This enables even non-.Net developers to try out all the examples and to view the HTTP requests and responses and the C# code. Installing and running this API Example Application is described in the Quick Start section.
There is also a set of tutorials that deliver and explain more C# sample code.
The latest versions of the toolkit, API Example Application, C# tutorials code, and Java code samples are available under the Downloads tab.