Close Navigation
Learn more about IBKR accounts
Why cURL?

Why cURL?

Posted December 6, 2023
Andrew Wise
Interactive Brokers

For those that have been keeping up with our latest Client Portal API Documentation, may have noticed that our Endpoints Section uses a system formatted using “cURL”. cURL is a tool used with most major operating systems to transfer data to and from a given URL, typically through a command prompt interface. This is preinstalled for Windows and MacOS and is typically available in most major Linux distributions.

While we did choose the cURL formatting largely for its OS-agnostic properties, we also chose to use it as a means of simplifying requests. While programming in languages like C#, Python, or JS are excellent methods of trading, and of course the expected system when trying to make internet requests outside of a web browser, the humble terminal helps to keep things as simple as possible. There is no need to manage libraries and language-specific syntax, it is as minimal as possible. That lets users make a request using cURL without any room for potential programming fault.

And as a final reason for using cURL in our documentation, the tool is very easy to read and will produce the same requirements as any programming library will require. This includes the request type, such as GET or POST, the URL, and in some cases the data or body content. The easy to read and easy to extract format should allow Interactive Brokers customers a better means of reviewing our data.

While brass tacks trading will require customers to trade using a programmatic implementation, we often suggest troubleshooting any issues with cURL to avoid any room for error. The act of simplifying all of our requests will allow for a more streamlined test than fidgeting with larger blocks of code. For those who are adverse towards command lines, the same concepts can be applied to using an interface like POSTMAN. Using tools to simplify implementations and remove as many variables as possible can help to troubleshoot common issues even if they aren’t meant for a more wholistic implementation.

Just because the documentation was written with a focus on cURL, doesn’t mean that is the end. Moving forward, we plan to roll out access to other major languages like C#, Python and JavaScript. We are also exploring other avenues and tools to bring to Interactive Brokers customers that should aid in programming and development such as POSTMAN collections.

Join The Conversation

If you have a general question, it may already be covered in our FAQs. If you have an account-specific question or concern, please reach out to Client Services.

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclosure: Interactive Brokers

The analysis in this material is provided for information only and is not and should not be construed as an offer to sell or the solicitation of an offer to buy any security. To the extent that this material discusses general market activity, industry or sector trends or other broad-based economic or political conditions, it should not be construed as research or investment advice. To the extent that it includes references to specific securities, commodities, currencies, or other instruments, those references do not constitute a recommendation by IBKR to buy, sell or hold such investments. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

The views and opinions expressed herein are those of the author and do not necessarily reflect the views of Interactive Brokers, its affiliates, or its employees.

Disclosure: Order Types / TWS

The order types available through Interactive Brokers LLC's Trader Workstation are designed to help you limit your loss and/or lock in a profit. Market conditions and other factors may affect execution. In general, orders guarantee a fill or guarantee a price, but not both. In extreme market conditions, an order may either be executed at a different price than anticipated or may not be filled in the marketplace.

Disclosure: API Examples Discussed

Throughout the lesson, please keep in mind that the examples discussed are purely for technical demonstration purposes, and do not constitute trading advice. Also, it is important to remember that placing trades in a paper account is recommended before any live trading.

IBKR Campus Newsletters

This website uses cookies to collect usage information in order to offer a better browsing experience. By browsing this site or by clicking on the "ACCEPT COOKIES" button you accept our Cookie Policy.