Add `ib` `Crypto` contract support
parent
9b2dad31b5
commit
e6e40313a6
|
@ -678,6 +678,13 @@ class Client:
|
|||
con = ibis.Commodity(**con_kwargs)
|
||||
con.bars_kwargs = bars_kwargs
|
||||
|
||||
# crypto$
|
||||
elif exch == 'PAXOS': # btc.paxos
|
||||
con = ibis.Crypto(
|
||||
symbol=symbol,
|
||||
currency=currency,
|
||||
)
|
||||
|
||||
# stonks
|
||||
else:
|
||||
# TODO: metadata system for all these exchange rules..
|
||||
|
|
|
@ -426,6 +426,7 @@ asset_type_map = {
|
|||
'WAR': 'warrant',
|
||||
'IOPT': 'warran',
|
||||
'BAG': 'bag',
|
||||
'CRYPTO': 'crypto', # bc it's diff then fiat?
|
||||
# 'NEWS': 'news',
|
||||
}
|
||||
|
||||
|
@ -722,7 +723,8 @@ async def stream_quotes(
|
|||
isnan(first_ticker.last)
|
||||
and type(first_ticker.contract) not in (
|
||||
ibis.Commodity,
|
||||
ibis.Forex
|
||||
ibis.Forex,
|
||||
ibis.Crypto,
|
||||
)
|
||||
):
|
||||
task_status.started((init_msgs, first_quote))
|
||||
|
|
Loading…
Reference in New Issue