`.accounting`: Use `_fqme()` throughout and export decimal converters

rekt_pps
Tyler Goodlet 2023-04-18 19:03:04 -04:00
parent d4c8ba19a2
commit afdbf8e10a
2 changed files with 15 additions and 5 deletions

View File

@ -32,17 +32,27 @@ from ._pos import (
Position,
PpTable,
)
from ._mktinfo import (
Asset,
dec_digits,
digits_to_dec,
MktPair,
)
log = get_logger(__name__)
__all__ = [
'Asset',
'dec_digits',
'digits_to_dec',
'MktPair',
'Position',
'PpTable',
'Transaction',
'TransactionLedger',
'open_trade_ledger',
'PpTable',
'open_pps',
'load_pps_from_ledger',
'Position',
'open_pps',
'open_trade_ledger',
]

View File

@ -145,7 +145,7 @@ class Position(Struct):
# drop symbol obj in serialized form
s = d.pop('symbol')
fqme = s.fqme
broker, key, suffix = unpack_fqme(fqme)
broker, mktep, venue, suffix = unpack_fqme(fqme)
if isinstance(s, Symbol):
sym_info = s.broker_info[broker]