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