NexusFi: Find Your Edge


Home Menu

 





Best C++ API?


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one kamaiu with 8 posts (2 thanks)
    2. looks_two Breukelen with 5 posts (0 thanks)
    3. looks_3 MigEsc with 2 posts (0 thanks)
    4. looks_4 iantg with 2 posts (0 thanks)
    1. trending_up 6,585 views
    2. thumb_up 2 thanks given
    3. group 11 followers
    1. forum 18 posts
    2. attach_file 1 attachments




 
Search this Thread

Best C++ API?

  #11 (permalink)
kamaiu
Singapore, Singapore
 
Posts: 14 since Oct 2022
Thanks Given: 1
Thanks Received: 14


Breukelen View Post
IQfeed has a newish data center in aurora, about 35-40ms latency from my testing from my VPS in chicago, but it's still way overpriced, but super fast historical data. I tested Rithmic to be consistently a few ms faster.

I use python for prototyping and optimizing never for actual trading.



Man I'm amazed, you created a tool that generates schemas? How does it work? I'm not familiar with the GO language but it seems similar enough to c.


If you can program C/C++ then Go is really easy to pick up. I use it to prototype and some production things. Rust takes some time to get proficient at, but quite nice once you are.

Make sure you pull in the latest from that repo. I pushed a change of latest work which updates to latest schema.


Sent using the NexusFi mobile app

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Tao te Trade: way of the WLD
21 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #12 (permalink)
MigEsc
Montreal, Quebec, Canada
 
Posts: 10 since Mar 2016
Thanks Given: 3
Thanks Received: 8

Thanks a lot for the feedback!

My intention is to scalp futures, but I need a good data source for stocks. i.e I will trade Nasdaq futures if AAPL moves. It looks like IQ Feed is the way to go for complementary live data. I don't think I will use it for historical data as much because I plan to serialize every quote/trade I receive to do my own replay later and also unit tests/non regression tests, etc. I guess I don't have to start collocating right now because many traders trade this system manually, but it is good to have a roadmap in case I do eventually. In any way I will isolate the program from the API because I need to do it in order to do my own replays, so I could start using Rithmic or Denali and then switch if needed, but prefer to avoid it. It looks like I should discard IB unless I rely on IQFeed for live data.

Rithmic Diamond (their faster API) claims " With Diamond Cutter the latency is more deterministic and with less variability than the classic ticker and order plant. Publicly we claim that tick to trade is typically less than 250 microseconds. You are likely to find that it is much less and with high consistency." But has certain requirements from brokers and collocation costs as I need to have my own server. Still waiting from them to answer.

Notice that as long as it is not something crazy, I don't mind paying up to $1000 per month while developing the algo well (I hope it will take me less than 6 months). Just want to choose the right APIs/tools.

Thanks again!

Miguel

Reply With Quote
  #13 (permalink)
 
syswizard's Avatar
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
Posts: 344 since Jan 2019
Thanks Given: 20
Thanks Received: 146



Breukelen View Post
...the live data is aggregated and only released every 250 milliseconds.

Who told you this ?

Reply With Quote
  #14 (permalink)
 Breukelen 
DC METRO
 
Experience: Intermediate
Platform: Custom Python
Broker: Interactive Brokers
Trading: ES
Posts: 43 since Mar 2018
Thanks Given: 16
Thanks Received: 44


syswizard View Post
Who told you this ?

I've used the TWS API, you'll notice it, if you time to ticks. It's a known thing

https://interactivebrokers.github.io/tws-api/top_data.html

Sent using the NexusFi mobile app

Reply With Quote
  #15 (permalink)
kamaiu
Singapore, Singapore
 
Posts: 14 since Oct 2022
Thanks Given: 1
Thanks Received: 14


MigEsc View Post
Thanks a lot for the feedback!



My intention is to scalp futures, but I need a good data source for stocks. i.e I will trade Nasdaq futures if AAPL moves. It looks like IQ Feed is the way to go for complementary live data. I don't think I will use it for historical data as much because I plan to serialize every quote/trade I receive to do my own replay later and also unit tests/non regression tests, etc. I guess I don't have to start collocating right now because many traders trade this system manually, but it is good to have a roadmap in case I do eventually. In any way I will isolate the program from the API because I need to do it in order to do my own replays, so I could start using Rithmic or Denali and then switch if needed, but prefer to avoid it. It looks like I should discard IB unless I rely on IQFeed for live data.



Rithmic Diamond (their faster API) claims " With Diamond Cutter the latency is more deterministic and with less variability than the classic ticker and order plant. Publicly we claim that tick to trade is typically less than 250 microseconds. You are likely to find that it is much less and with high consistency." But has certain requirements from brokers and collocation costs as I need to have my own server. Still waiting from them to answer.



Notice that as long as it is not something crazy, I don't mind paying up to $1000 per month while developing the algo well (I hope it will take me less than 6 months). Just want to choose the right APIs/tools.



Thanks again!



Miguel



Sierra Chart Denali has Nasdaq TotalView for ~$25 extra per month. Nasdaq data comes from NY/NJ. You would only need to integrate with a single interface then. Otherwise, polygon.io or alpaca.markets have websocket APIs or you can stick with IQfeed.

If you go with Rithmic for order routing then ditch IQfeed for Rithmic data. If you use IQfeed for data, then it does not make much sense to get Rithmic’s expensive <250 micro routing, since IQfeed has 30-40ms latency and their protocol is text based rather than binary.

For co-location you can use beeksgroup.com. They have VPS and servers. Cheapest server is around $250 per month. They have a cross-connect to CME and Rithmic in their DC3 data center. Works for Sierra Chart Teton Order Routing as well.

Picking the right tools is a deceptively difficult and easily costly endeavor. Sierra Chart has possibly with worst UI and user friendliness and a website designed back in the 90s. It initially made me think the product was going to be abandoned in the near future. However, that assumption was wrong. It was just created by highly technical people. Denali connects to CME via a 10gb MDP link. That’s the absolute best connection CME offers. Denali normalizes the UDP messages into their DTC binary protocol then immediately broadcasts the message. Sierra Chart’s Teton Order Routing is the same design, but in reverse. It will be competitive with Rithmic’s 250 microsecond router, except Teton is free if you have Sierra Chart. Both have the same type of connection to CME in the same Aurora data center.

In summary, Sierra Chart is directly competitive with Rithmic and any difference in latency will be extremely minor. Sierra Chart will be around $80 per month with order routing and Denali with full market depth including CME licensing fees. Rithmic will be many times that. If cost isn’t a factor I personally would still go with Sierra Chart because of connecting via DTC protocol is lightweight and flexible. If I were you I’d ditch IQfeed and go with Sierra Chart or Rithmic and stick your application on a Beeks Group server / VPS in DC3. Low latency stock market access via Sierra Chart or polygon.io.

Reply With Quote
Thanked by:
  #16 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148

FWIW I built my platform with Rithmics RAPI / co-locate with them via TheOmne. I spend months doing a lot of latency optimization to get everything multi-threaded so I didn't block the main thread that read the data feed and submitted orders. I run everything in queues and have like 10 different threads all doing different stuff. This made a difference in a few nano-seconds I'm sure, but there are still plenty of days where the data feed lag alone is enough to kill me. I have seen plenty of bursts where the exchange stamp runs so far ahead of mine, there is nothing I can do but sit on the sidelines and wait.

I thought about going with the Diamond API, but I don't need faster execution, I need a faster data feed and I don't really have any benchmark to know how much faster their direct line is vs their ticker plant. If there is something out there faster than the standard rithmic ticker plant I'm all ears.

In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Visit my NexusFi Trade Journal Reply With Quote
  #17 (permalink)
kamaiu
Singapore, Singapore
 
Posts: 14 since Oct 2022
Thanks Given: 1
Thanks Received: 14


iantg View Post
FWIW I built my platform with Rithmics RAPI / co-locate with them via TheOmne. I spend months doing a lot of latency optimization to get everything multi-threaded so I didn't block the main thread that read the data feed and submitted orders. I run everything in queues and have like 10 different threads all doing different stuff. This made a difference in a few nano-seconds I'm sure, but there are still plenty of days where the data feed lag alone is enough to kill me. I have seen plenty of bursts where the exchange stamp runs so far ahead of mine, there is nothing I can do but sit on the sidelines and wait.



I thought about going with the Diamond API, but I don't need faster execution, I need a faster data feed and I don't really have any benchmark to know how much faster their direct line is vs their ticker plant. If there is something out there faster than the standard rithmic ticker plant I'm all ears.



Are you using C++ or .NET? .NET you have the GC to deal with. It’s impossible to audit their Rithmic’s API code base without them sharing their source to really dig in. Could be in their networking stack or possibly on their infrastructure side. The fact they have a “Diamond” API option kind of points directly at them throttling or de-prioritizing you.

How far behind is your application? How many milliseconds? How many instruments are you listening to?

Reply With Quote
  #18 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148


kamaiu View Post
Are you using C++ or .NET? .NET you have the GC to deal with. It’s impossible to audit their Rithmic’s API code base without them sharing their source to really dig in. Could be in their networking stack or possibly on their infrastructure side. The fact they have a “Diamond” API option kind of points directly at them throttling or de-prioritizing you.

How far behind is your application? How many milliseconds? How many instruments are you listening to?

I am only trading one instrument. The NQ.

This is an example of what I see sometimes. This was on 10-07-22 at roughly 7:30 AM Chicago time. Each row represents an event that takes roughly 6 points to reach. For about 10 minutes my Applications Timestamp microseconds lagged the exchange by such a significant margin that I was like 10+ events behind. I don't think this is garbage collection, or throttling per se. It's just sometimes the market literally goes nuts, and using their public ticker plant isn't going to be fast enough. From what I understand their Diamond program bypasses the public ticker plant, so you would be in a priority lane to receive data, but I have no clue if it could handle something like this.

APP TIMESTAMP EXCHANGE TIMESTAMP
1665145798 0.429232 1665145798 0.400441
1665145798 0.443568 1665145798 0.416144
1665145798 0.443592 1665145798 0.416144
1665145798 0.44371 1665145798 0.416498
1665145798 0.443815 1665145798 0.416957
1665145798 0.448944 1665145798 0.419126
1665145798 0.454307 1665145798 0.422032
1665145798 0.457788 1665145798 0.428331
1665145798 0.461122 1665145798 0.438997
1665145798 0.461136 1665145798 0.439106
1665145798 0.463649 1665145798 0.440888
1665145798 0.463661 1665145798 0.441828
1665145798 0.463666 1665145798 0.444851
1665145798 0.480502 1665145798 0.453003
1665145798 0.480522 1665145798 0.453136
1665145798 0.480578 1665145798 0.453222
1665145798 0.480596 1665145798 0.45326
1665145798 0.480601 1665145798 0.453381



In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Visit my NexusFi Trade Journal Reply With Quote
  #19 (permalink)
 Breukelen 
DC METRO
 
Experience: Intermediate
Platform: Custom Python
Broker: Interactive Brokers
Trading: ES
Posts: 43 since Mar 2018
Thanks Given: 16
Thanks Received: 44


kamaiu View Post
Sierra Chart Denali has Nasdaq TotalView for ~$25 extra per month. Nasdaq data comes from NY/NJ. You would only need to integrate with a single interface then. Otherwise, polygon.io or alpaca.markets have websocket APIs or you can stick with IQfeed.

If you go with Rithmic for order routing then ditch IQfeed for Rithmic data. If you use IQfeed for data, then it does not make much sense to get Rithmic’s expensive <250 micro routing, since IQfeed has 30-40ms latency and their protocol is text based rather than binary.

For co-location you can use beeksgroup.com. They have VPS and servers. Cheapest server is around $250 per month. They have a cross-connect to CME and Rithmic in their DC3 data center. Works for Sierra Chart Teton Order Routing as well.

Picking the right tools is a deceptively difficult and easily costly endeavor. Sierra Chart has possibly with worst UI and user friendliness and a website designed back in the 90s. It initially made me think the product was going to be abandoned in the near future. However, that assumption was wrong. It was just created by highly technical people. Denali connects to CME via a 10gb MDP link. That’s the absolute best connection CME offers. Denali normalizes the UDP messages into their DTC binary protocol then immediately broadcasts the message. Sierra Chart’s Teton Order Routing is the same design, but in reverse. It will be competitive with Rithmic’s 250 microsecond router, except Teton is free if you have Sierra Chart. Both have the same type of connection to CME in the same Aurora data center.

In summary, Sierra Chart is directly competitive with Rithmic and any difference in latency will be extremely minor. Sierra Chart will be around $80 per month with order routing and Denali with full market depth including CME licensing fees. Rithmic will be many times that. If cost isn’t a factor I personally would still go with Sierra Chart because of connecting via DTC protocol is lightweight and flexible. If I were you I’d ditch IQfeed and go with Sierra Chart or Rithmic and stick your application on a Beeks Group server / VPS in DC3. Low latency stock market access via Sierra Chart or polygon.io.

Hey I was giving SC with DTC a test run, then I received a strange message: DTC MARKET_DATA_REJECT: Market data request not allowed

When I googled I ran into this:

https://www.sierrachart.com/SupportBoard.php?ThreadID=71596&Page=1

it appears that live market data via the DTC protocol is no longer allowed, seems to render the DTC protocol useless. I'm I reading this wrong?

Reply With Quote




Last Updated on October 26, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts