Introduction

You can use our data services from the website through dowloadable links or in your own application by means of API requests. Logged-in users can browse to dedicated pages, use visualization tools and download data. For example you can visit the Instruments page, choose an instrument and explore End-Of-Day, Intraday, Indicators or Options Chains data. On the other hand you can build your own application and interact with our data services through API requests.
This documentation will help you explore our exposed endpoints and give you specific details about their usage. We strive to make it as simple and legible as possible. Feel free to contact us should you experience any issue using it.

Global Specifications

API base url: https://tallacoptions.com/api

Additional segments and parameters are appended to the base url according to the topic of your request. Parameters appear in curly braces. A table gives type, format and description details for each parameter.
When the request succeeds, a response message is returned with data in the content and additional information in the header. The supported data formats include CSV, JSON, XML and BSON. You can set the desired content type in the header when issuing requests. Failed requests return error messages with specific details.
Examples are given throughout this documentation for illustrative purpose.
Logged-in users can take advantage of Try It Out sections for quick interactive tests.

Topics

Different topics are covered. Some of them are purely informational and don't require any authentication or authorization. Others are subject to restrictions as they require authentication and access rights.
This documentation is organized topic-wise and will go through a list of topics that we deem relevant.

Authentication

You use our APIs by submitting requests to our exposed endpoints. Some API requests need to include a security token for authentication purpose. Registered users are assigned an API key they can use to generate these tokens.
Logged-in users can omit the authentication token or API key when they initiate a request from their browser.
Explore the Tokens topic to see how you can generate them and authenticate your requests.

Authorization

Access to our different data services is granted depending on your account profile. You have a set of basic data accesses attached to your account by default to let you explore our services. You can extend your data access rights depending on your needs. See the different plans for information about data access levels.

Availability

Data availability highly depends on the instrument and the type of data you are searching for. We update our database on a regular basis with new and past data. You can obtain extensive information from the instrument's details page. You can also refer to the Instruments section to see how to obtain the information through API requests.

Restrictions

In order to provide our users with quality services, we take action to prevent abuses of any kind. As such, restrictions about the number of requests allowed within a period of time may apply.

Community Support

You can use our GitHub Support Page to raise issues you may encounter and share your experience with other developers. Also feel free to suggest new endpoints if you don't find one that best meets your needs.

Introduction

You use security tokens to send requests to endpoints that require authentication. Tokens are generated with your API key and are usable only once before they expire. By default you can generate a single 2-minute token per request.
Users with Premium or Full Access privilege can generate multiple 5-minute tokens per request.
Logged-in users don't need authentication tokens when they send requests from their browser. Your API key is accessible from the Settings section of your Account.
For obvious security reasons, keep it secret and only use it with requests that are submitted server-side. Change it if you feel that its secrecy has been compromised.

Introduction

We expose the following endpoints to provide extensive information about available instruments and instrument categories.
No authentication or authorization is needed for these endpoints.
Please note that it is crucial to know some details about an instrument in order to make successful data requests.

Introduction

End-Of-Day data can be obtained for available instruments over a period ranging from a start-date to an end-date.

Introduction

We provide intraday data for all instruments we cover. You can access historical data or live snapshots.

Introduction

We provide options EOD data for regular options written on 100 shares of the underlying. You can access information about an options chain's expirations. You can also fetch data for groups (same underlying and expiration) of options or for a specific option. Use moneyness and factor filters to avoid processing all options within a group.
Note: We can accommodate for options tick data upon request.

Introduction

We provide real-time data for stocks, indices and ETFs/ETNs through our TCP server. Follow the protocol below to connect your TCP client to the server, request and receive a real-time stock data feed.

Connection

Connect to the host: www.tallacoptions.com

Listen to the port: 6670

A successfull connection will be greeted with the message "TallacOptions 6670\r\n".

Request

After successfully connecting to the server, send the ticker of the instrument you want appended with the '\n' character. You'll then receive a stream of length-prefixed messages containing live data for the instrument.

Message Structure

Each message is prepended with its length. The length's format is "4-byte signed little-endian" (i.e., "int" in C#).
A message itself consists of data fields delimited by the '\0' character. The fields are sent in this order: Last, LastSize, Bid, BidSize, Ask, AskSize, Volume, Open, High and Low.

Specifications

Each TCP client can only handle one ticker. Once a client is connected and set to fetch data for a ticker, it cannot be modified to fetch data for another ticker. You can create multiple clients, each handling a different ticker.

The server will drop a connection when it fails to send data to the client. Check the client's connectivity by sending a keep-alive message to the server and take action when the sending fails.
After the live stream has started the client should only send keep-alive messages. The keep-alive message processing frequency is 30 seconds. The message should be maximum 10 characters long.
The keep-alive message will be echoed with an empty message (length=0) by the server. So zero-length messages should be discarded from the normal data stream.

Examples

A barebones sample for connecting to the server and streaming live data.

A more complex example featuring keep-alive and reconnecting.