Broker API HubMenu

Interactive Brokers API error code

Interactive Brokers API error: Bad Request Error

The error, as text you can copy

Bad Request Error
Kind
API error code
HTTP status
400
API
Interactive Brokers

What does Bad Request Error mean on the Interactive Brokers API?

On the Client Portal Web API, Interactive Brokers says some endpoints may return a Bad Request when the JSON body is invalid, for instance when it contains carriage returns or newlines.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Independent and unofficialinteractivebrokers.github.iochecked

How do I fix Bad Request Error?

The vendor's page says to try removing the carriage returns and newlines from the JSON body first, then call the endpoint again.