Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 09:55:29 +0000



Post From: EUR.USD CFDs Interactive Brokers

[2020-07-10 01:00:40]
User253985 - Posts: 21
I Got this response from IB

Thank you for contacting Interactive Brokers.

Sample CFD(for FX underlying) Contract (in Python):
contract = Contract()
contract.symbol = "EUR"
contract.secType = "CFD"
contract.currency = "USD"
contract.exchange = "SMART"

Please refer to API manual for how to define contract:
https://interactivebrokers.github.io/tws-api/basic_contracts.html#cfd

Also there's a function reqContractDetails to retrieve all posible contracts' parameters that given symbol§ype(with currency/exchange or more parameters is better to narrow the range), this is detailed in manual:
https://interactivebrokers.github.io/tws-api/contract_details.html