Fix PURE contracts lookup...
parent
5bb11826f3
commit
2f8737af6a
|
@ -252,11 +252,21 @@ class Client:
|
||||||
# stonks
|
# stonks
|
||||||
else:
|
else:
|
||||||
# TODO: metadata system for all these exchange rules..
|
# TODO: metadata system for all these exchange rules..
|
||||||
|
primaryExchange = ''
|
||||||
|
|
||||||
if exch in ('PURE', 'TSE'): # non-yankee
|
if exch in ('PURE', 'TSE'): # non-yankee
|
||||||
currency = 'CAD'
|
currency = 'CAD'
|
||||||
|
if exch in ('PURE',):
|
||||||
|
# stupid ib...
|
||||||
|
exch = 'SMART'
|
||||||
|
primaryExchange = 'PURE'
|
||||||
|
|
||||||
con = ibis.Stock(symbol=sym, exchange=exch, currency=currency)
|
con = ibis.Stock(
|
||||||
|
symbol=sym,
|
||||||
|
exchange=exch,
|
||||||
|
primaryExchange=primaryExchange,
|
||||||
|
currency=currency,
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
exch = 'SMART' if not exch else exch
|
exch = 'SMART' if not exch else exch
|
||||||
contract = (await self.ib.qualifyContractsAsync(con))[0]
|
contract = (await self.ib.qualifyContractsAsync(con))[0]
|
||||||
|
|
Loading…
Reference in New Issue