¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Placing a crypto order


Ewald de Wit
 

Hi all,

Has anyone figured out how to place a CRYPTO order yet? When I try with

contract = Contract(secType='CRYPTO', symbol='BTC', exchange='SMART', currency='USD')
order = Order(orderType='MKT', action='BUY', cashQty=5000)

it gives the error Invalid time in force:???. Setting order.tif to DAY or GTC is not accepted either.

-- Ewald


 

I'm not sure as I don't have permissions to even test this, can't even see the symbol BTC, but this IB web page may help.
Apparently IB is looking for a time option as part of the order, try replacing MKT with IOC.

KH


Ewald de Wit
 

Thanks for the link Kevin. Using this order:

order = Order(orderType='MKT', action='BUY', cashQty=5000, tif='IOC')

does get one step further, which in my case is a 'No trading permissions' error. Not sure how to add the permissions either as there seems to be no Crypto products listed in account management.

-- Ewald


 

I'm not positive, but pretty sure that I read that IB crypto was, at this stage, only open to US residents.

Not sure where you are, but I am in Australia, I don't get any crypto when I search IB, and Crypto is not in Account Management when I try to request trading permission. The only crypto I see is CME futures, plus a couple of stocks with crypto related names.

KH


Ewald de Wit
 

Ah yes, it's for US residents only. The crypto market data is available though, complete with fractional sizing and volume as made possible in the latest API.

-- Ewald