• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Anyone familiar with Takion API?

Hey folks,
I'm fairly new to OOP using C++; been banging my head against the wall for the past week in an attempt to figure out the Takion API. Specifically, i'm just trying to retrieve some level 2 data and have been sifting through several header files trying to figure which header file can help me in that respect. The documentation was not that helpful mainly as a result of the discrepancy between the level of proficiency assumed when writing the documentation and that of mine at the current moment. I'm just trying to export top 10 bids for a stock into a vector in real-time. Anyone have any references/documentation I can use to figure out the important header files i'll need for this?
Any help is very much appreciated


-Biggus Dickus
Hello Biggus,

I do not have any experience with the Takion API, but I've worked with a lot of other Market Data APIs, and they all share similar behaviors. I hope you'll find the following helpful (or at least not completely wrong for the case of Takion).

The most common way that nearly all market data APIs work for summary order books (orders aggregated by price level, 'n' best bid price levels and "n" best ask price levels, where n is usually equal to 5 or 10), is that when your subscription is successful, you will get an initial image of all "n" price levels (price and quantity for each side). If you want just a snapshot, then you're done.

But subsequent changes to the order book are sent as deltas - only what's changed in the order book since the initial image or the last update. So if, say, the size of the second-best bid price level changed, you'll get an update for only the second-best bid price level, and its size will be different. Normally the API will expose an event and you'll register a callback function to process the new level. It's up to you to keep the state of the summary price book on your side in sync with the actual state of the order book on the feed handler. So you'll have a data structure on your side with 10 price levels for each side, and you'll update your price book's state with the callback that will fire when a price book level is updated.

The reason why nearly everyone publishes updates only as deltas (instead of sending you a whole new updated book) is because it's very expensive in network bandwidth and for the client machine's CPU if the feed handler sent an entire new book when only parts of it have changed. (Sending a whole new book every time there's a price change might sound good - but it's not.)

Again, I don't have any experience with Takion, so I don't know how much (if any) of the above is applicable or helpful, but in English that's pretty much the way all of them work.
Hey StephenKim,
Thanks for your answer, it was certainly helpful in that I gained a better idea of what's going on in a technical sense. I was more confused on the C++ coding aspect of market data API (I apologize, I should have elaborated a bit more); Specifically how to figure out under which header i can access the objects and functions pertaining to calling certain level 2 data. The documentation provided is minimal in this respect and I am currently employing a brute force method, going through numerous headers and seeing what each one is for. Would you know of a better approach to getting familiar with an API in this respect? Thanks again for your help, it's much appreciated
Hello Biggus,

I'm assuming that if there's a callback or a class related to Level-2 data that's mentioned in the documentation, that you already did a search for some of those terms in the header files.

Also, many vendors implement Level2 and Level3 data using different models than they do for Level1 (or top of book), so it might be in a completely different directory than where you're searching.