anyone has experience using restful api trading?

Discussion in 'Automated Trading' started by trend2009, May 13, 2020.

  1. trend2009

    trend2009

    IB, as well as tdameritrade, etrade, have rest api for trading. anyone has experience using them? is it possible to submit 200 orders in one minute and track if the orders are filled or not?
     
  2. Robert Morse

    Robert Morse Sponsor

    treand2009-We do not offer a REST API. What is the advantage in using them?
     
  3. Girija

    Girija

    No specific advantage in new wine when stored in old bottle. When everyone moves to REST companies do find lost out.
    CSV is easy to parse than xml and json yet we ought to have json.
     
  4. Robert Morse

    Robert Morse Sponsor

    Is REST two way with respect to market data or only for order entry?
     
  5. trend2009

    trend2009

    REST is stateless, like html, no two way communication management.
     
  6. 2rosy

    2rosy

    not sure how these rest apis are implemented but they should accept batches of orders, so post one batch consisting of 200 orders... takes a second. rest api gets the batch and submits each order takes a second. continually poll the api to see if you're filled.
    it's easier to connect to a server (ibspi, fix, ...) and place orders, get fills, etc.
     
  7. gaussian

    gaussian

    REST is stateless. So you would need to POST the orders and either get the results back as a response (unlikely since orders need to be worked), or be given temporary order IDs you can continuously poll. Not very effective.

    This is probably why the industry as a whole hasn't moved off FIX.
     
    cruisecontrol likes this.
  8. trend2009

    trend2009

    How about WebSocket?
     
  9. qlai

    qlai

    It’s better, but it’s not guaranteed to be lossless like FIX. So recovering automatically after bounce/outage/gap is a bit tricky and still REST based.
     
  10. Robert Morse

    Robert Morse Sponsor

    I do not understand the advantage of the REST API over a C++ API or C#.net.
     
    #10     May 13, 2020