Skip to navigation

Commodities

View as MarkdownOpen in Claude

Symbol: String. Specify the symbol of the commodity.

SecType: String. Specify CMDTY.

Exchange: String. Specify SMART.

Currency: String. Specify the base currency the commodity is traded with.

contract = Contract()
contract.symbol = "XAUUSD"
contract.secType = "CMDTY"
contract.exchange = "SMART"
contract.currency = "USD"