¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: How do you test the IB Gateway REST API in demo account?


 

I have only limited hands-on experience with the Client Portal API (it does not yet add anything that we can't do via TWS API already), but I think you have mixed up a couple things. If you have not done so yet, take a look at the and the explorer.

Any request you send to a URL that starts with "https://localhost:5000/" is handled by the Client Portal API Java gateway that ships with the Client Portal API installation. The gateway handles two kinds of requests:
  • REST requests through one of several API endpoints. All endpoint URLs start with "https://localhost:5000/v1/api/"
  • Requests for WebApps that you develop and install in the folder "root/webapps". URLs for WebApps start with "https://localhost:5000" followed by the WebApp name. The gateway simply serves those files to your browser.

The API ships with one WebApp called "demo". It consists of two files and is, consequently, installed under "root/webapps/demo"
  • root/webapps/demo/index.html
  • root/webapps/demo/gateway.demo.js

The message you get indicates that the gateway is ready to server the WebApp "demo". You start it by pointing your browser to "https://localhost:5000/demo", but the gateway has to be logged into an IBKR account for it to work. In case you have a funded live account at IBKR, you can create a companion "paper" account to try out your strategies.

I do not think that it is possible to connect a WebApp through the Client Portal API gateway to what the TWS application calls a "demo" account. The kind off account you can reach through the TWS application login screen where it says "No username? Try the demo".

Hope that helps,

´³¨¹°ù²µ±ð²Ô




On Fri, Oct 27, 2023 at 11:02 AM, Jimin Park wrote:
When I start the Gateway Java server locally I get this message saying demo app is available at

I tried sending REST API requests to ?and it doesn't work.

I want to test my algorithmic trading system against the demo account placing orders in real time and seeing it work before risking real money.

Could someone point me to an online documentation or anything I can read up on to learn how to do this?

Join [email protected] to automatically receive all group messages.