Problem with IB REST API? Any alternatives?

Discussion in 'Automated Trading' started by MercForHire, Dec 30, 2019.

  1. Hi everyone, I am building an app running on Mac OS that needs to connect to my IB paper account to place orders.
    However the "place order" endpoint doesn't seem to work, always getting
    Code:
    {"error":"You currently do not have trading permission for this instrument type. Update Trading Permissions from the Trade Configuration page in Account Management."}
    I even called their customer support and they admitted that this has been broken for over a month and they are working on it.

    What do you think is the best way for an external app to place trades on a paper trading account to test out its strategy? I don't mind switching to another broker just for testing purposes.

    I know NinjaTrader lets you place trades by creating files, is that method reliable/quick enough?
     
  2. I thought the rest api was only for special people
     
  3. guru

    guru

    Maybe use the regular/older IB API, although not as simple as REST.
    Otherwise you could try Alpaca.
     
  4. I figured it out, turns out I need to pass raw text instead of JSON for the params
    IE:
    Code:
    { "acctId": "12345", "conid": 346577750, "secType": "FUT", "cOID": "test003", "orderType": "MKT", "listingExchange": "GLOBEX", "outsideRTH": false, "side": "BUY", "price": 7000, "ticker": "NQ", "tif": "GTC", "quantity": 1, "useAdaptive": false}
     
  5. carrer

    carrer

    So the customer service guy was lying?
     
  6. They didn't lie, the bug is their server can only parse raw text file instead of a properly formatted JSON. Anyways, only programmers can understand the difference.