Choosing an API

Discussion in 'Automated Trading' started by Edo, May 26, 2023.

  1. Edo

    Edo

    Hi folks: I have coding experience (C, C#, Python, etc.) but based on trying to do this a few years ago, I know I'll need to hire someone (resulting spaghetti code is a good sign) :).. but my first step is to figure out which API to use. I have some algos I want to hard-code. Algos are complex, will trade several symbols, and must be resilient. I have used TT API (C#) in the past but found fundamental issues with it (example: could not place order #2 until #1 was acknowledged) ... I love the idea of the stateless TradeStation RESTfull API but scared of it (scared of getting information that is out of sync).

    Any pointers / hints would be appreciated. My next step will be to find someone who can help code.
     
  2. Basically you have to create your own API on top of the broker's API... then you can prevent the said problem by issuing calls in right sequence, ie. syncing first...
    I find RESTful much easier than streaming or async, but of course depends on the requirements...
     
    Last edited: May 26, 2023
  3. rb7

    rb7

    Trading API are mostly associated with executing broker.
    You choose your broker, and you see which API they are offering.

    Personally, I'm not a big fan of REST API, especially for trading.

    I've developed trading applications using IB-API, IQ Feed (although not a 'real' API) and Rithmic R|API+.
    Since I'm using IB, I'm using their API (and IQ Feed for the market data feed).
    Pros:
    Fast
    Simple
    Supported in environments I know
    Asynch
    Stable

    Cons:
    A few bugs (although easily manageable with workarounds)
    Not very suitable/reliable for real-time market data (reason I'm using IQ Feed)

    Btw, I'm not working for IB. There may be better API, there may be better broker (whatever that means!), but for me, it works, and my profitability doesn't dependent on those. I wouldn't make more money (or less loss!) if I would be using a different API and a different broker.

    IMO, the algo is the most important aspect. The selected API is just a way to implement it.

    For Rithmic R|API+, I've tested it but never used it to trade with real money. But from what I've seen, it was looking promising.
     
    earth_imperator and spy like this.
  4. spy

    spy

    That's what compatibility shim layers are for, right? I still have some stuff from the VMS days that I'm still using ;)
     
    rb7 likes this.
  5. rb7

    rb7

    'VMS', that was the first OS I worked on when I started my career (more than 30 years ago!!).
     
    spy likes this.
  6. spy

    spy

    Yeah, I remember. Me too... writing reports for BoNY @ 240 Greenwich st., early-mid '90s. Ah the good old days; glad I wasn't there when they bombed the towers though!

    I remember when I saw the movie "The Matrix" there's a scene that reminded me exactly of walking into the building, like a typical front-line worker, swiping my badge and heading upstairs to plug away at Module-2 in front of a giant CRT xterminal.

    Still in front of an xterminal to this day (but have a nice LCD now). LOL!
     
    rb7 likes this.
  7. Rithmic R api can be used to trade stocks? How many orders can be sent per second? Which broker offers rithmic api?

    I am also looking for a good api. Thanks for info.
     
  8. rb7

    rb7

    Rithmic API can be used with AMP. Maybe other brokers, idk.
    Not sure either about stock. I'm only trading futures.
    As for the maximum number per second, I don't know and it's the least of the problem. And it should be the same for you unless you're an HFT. And if you are one, you wouldn't be asking those questions...;)

    As for a 'good API', it depends on your priorities and requirements.
     
  9. Edo

    Edo

    Remember the VT100's ?? and DECwriters?
     
    rb7 likes this.
  10. spy

    spy

    Lol, of course... those were in the lab at my uni. At BoNY we had something more like the NCD "pizza boxes". Man, I'm getting old :(
     
    #10     May 26, 2023