Similarly to making snapshots, you can request historical tick data by performing an HTTP request.
All endpoints listed below are relative to
https://HOST:PORT/repo
. The value ofHOST:PORT
is provided by Spotware's service assurance team upon request.
Note that all requests listed below return arrays of bytes that you can serialise into the required entities. For example, in Java this can be done by calling the
parseFrom()
method from a suitable static class.
HTTP Method | URL |
---|---|
GET |
/tickdata |
Gets historical tick data for a symbol for a certain time period. The maximum period for which it is possible to request tick data via one request is 24 hours.
Parameters
Parameter | Parameter Type | Required? | Data Type | Description |
---|---|---|---|---|
symbolId |
query | Yes | integer | The ID of the symbol for which you would like to request historical tick data. |
type |
query | Yes | string | The type of historical tick data you would like to request. This parameter can only take two possible values.BID . The tick data for bid prices is requested.ASK . The tick data for ask prices is requested. |
fromTimestamp |
query | Yes | integer | The Unix timestamp of the start of the period for which you would like to request tick data (including milliseconds). |
toTimestamp |
query | Yes | integer | The Unix timestamp of the end of the period for which you would like to request tick data (including milliseconds). |
size |
query | Yes | integer | The total number of ticks to return; this parameter can only take values ranging from 100 to 15000 . |
Request Body
No request body.
Output
An array of bytes representing the requested entity(-ies).
Request Examples
Requesting the first 100 ASK
ticks for symbol whose ID equals 1
starting from 22/06/2019, 11:12:31.681 until 22/06/2019, 12:32:30.231.
curl -X GET "https://HOST:PORT/repo/tickData?symbolId=1&type=ASK&fromTimestamp=1563793951681&toTimestamp=1563798750231&size=100"
Response Example
As the response contains only an array of bytes, no specific example can be provided.