Support `Forex` tracts in `normalize()`

fix_forex
Tyler Goodlet 2022-07-12 16:55:15 -04:00
parent 6a1a62d8c0
commit 4e5df973a9
1 changed files with 11 additions and 1 deletions

View File

@ -573,7 +573,6 @@ def normalize(
con = ticker.contract con = ticker.contract
if type(con) in ( if type(con) in (
ibis.Commodity, ibis.Commodity,
ibis.Forex,
): ):
# commodities and forex don't have an exchange name and # commodities and forex don't have an exchange name and
# no real volume so we have to calculate the price # no real volume so we have to calculate the price
@ -581,6 +580,14 @@ def normalize(
# no real volume on this tract # no real volume on this tract
calc_price = True calc_price = True
elif type(con) in (
ibis.Forex,
):
suffix = 'forex'
con.symbol = con.pair()
# no real volume on forex feeds..
calc_price = True
else: else:
suffix = con.primaryExchange suffix = con.primaryExchange
if not suffix: if not suffix:
@ -812,6 +819,9 @@ async def data_reset_hack(
successful. successful.
- other OS support? - other OS support?
- integration with ``ib-gw`` run in docker + Xorg? - integration with ``ib-gw`` run in docker + Xorg?
- is it possible to offer a local server that can be accessed by
a client? Would be sure be handy for running native java blobs
that need to be wrangle.
''' '''