t (required) | Ticket (previously obtained by the GetTicket method) | Ticket value exactly as it was returned by the GetTicket method. The current ticket values are GUIDs, however, this might change in the future. |
type (required) | Request the specified data types | "orderflow" - Order Flow data "timesales" - Time & Sales data "indicators" - Indicators data "oscillators" - Oscillators data |
format (required) | Retrieve data in the specified format | The list of possible format values is below. Please consult specifications of the requested data type what formats are supported. "XML" - XML "CSV" - CSV (comma separated values) "TXT" - TXT (formatted text with fixed-width columns) "I40" - TotalView-ITCH 4.0 native format. Specifications "BIN" - binary format |
compression (required) | Compression data in the specified way | "stream" - compress HTTP response stream using GZIP content-enconding "file" - return file compressed in .z8 format "auto" - compress HTTP response stream only if the browser accepts GZIP content-encoding ("stream"), otherwise compress the returned file ("file") "none" - do not use compression at all. This option must be used for streaming data (when keepconnection=true) |
date (required) | Target date for which the data is requested | Date string in "YYYYMMDD" format. Use today's date for real-time streams. |
stock (required) | Stock ticker for which the data is requested | Stock ticker with up to 6 characters in length |
keepconnection (optional) | true: streaming data false: file data
Default: keepconnection=false | This option (keepconnection=true) can be used to retrieve data in real time when the requested date is equal to today's session. This option instructs the server to keep the TCP connection open and keep sending the data or heartbeats if the data is not yet available. The heartbeats (empty lines, 0x0D 0x0A) are sent every 1/2 second, so you can set the read timeout of your TCP client at 1 second and reconnect if the timeout exception occurs due to a broken TCP session. The server starts sending the heartbeats as soon as your client catches up with the realtime data, i.e. all prior ticks to the moment when the connection was established have been sent. At the end of the session, the server will send a final heartbeat and will close the TCP connection. Restrictions: * Data stream is not compressed (compression=none) * File formats other than CSV are currently not supported (format=csv) Note: Please set KeepAlive property to true if you are using an HTTP request method in order to ensure that your client will not close the connection after a certain period of time. |
indicators (optional) | Indicators to be retrieved | List of indicators separated with "+". If this parameter is not provided, the entire list of indicators will be returned. The complete list of market indicators
|
oscillators (optional) | Oscillators to be retrieved | List of oscillators separated with "+". If this parameter is not provided, the entire list of oscillators will be returned. The complete list of oscillators
|
RETURNED VALUE | The method returns the status using an HTTP status code, with the data file or an error message returned in the response body | 200 OK: the data object is returned in the response body. For historical files, the header will contain the fields that help save the file using a web browser in a user-friendly SAVE-AS fashion: Content-Disposition: attachment; filename=FILENAME.EXT Content-Type: application/octet-stream For realtime streams, the Content-Type is set to text/plain, there is no Content-Disposition field, and the connection is not immediately closed after the initial data is transferred. Instead, the server keeps the connection alive and keeps sending data as it arrives in realtime from the exchanges. If no data arrives within 1 second, the server sends a hearbeat in the form of an empty line (CR-LF) to signal that the connection is still alive. The client simply ignores all empty lines while parsing the incoming CSV or XML data in realtime. 400 Bad Request: there was an error while processing the request. A more detailed error message is returned in the response body in plain text. |