Broker API HubMenu

Interactive Brokers API error code

Interactive Brokers API error: The contract description specified for <Symbol> is ambiguous

The error, as text you can copy

The contract description specified for <Symbol> is ambiguous
HTTP status
None recorded for this error
API
Interactive Brokers

What does The contract description specified for <Symbol> is ambiguous mean on the Interactive Brokers API?

Interactive Brokers prints this message, in the vendor's wording, in its TWS error table directly under code 200 and without a code number of its own. The contract definition sent is not unique. The vendor gives two cases: stocks that share the same symbol, currency and exchange, and futures that have more than one multiplier for the same expiration.

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 The contract description specified for <Symbol> is ambiguous?

For stocks, specify the IBApi.Contract.PrimaryExch attribute. For futures, specify the IBApi.Contract.Multiplier attribute. Both are what the vendor's page says.