`.accounting`: Use `_fqme()` throughout and export decimal converters
parent
d4c8ba19a2
commit
afdbf8e10a
|
@ -32,17 +32,27 @@ from ._pos import (
|
||||||
Position,
|
Position,
|
||||||
PpTable,
|
PpTable,
|
||||||
)
|
)
|
||||||
|
from ._mktinfo import (
|
||||||
|
Asset,
|
||||||
|
dec_digits,
|
||||||
|
digits_to_dec,
|
||||||
|
MktPair,
|
||||||
|
)
|
||||||
|
|
||||||
log = get_logger(__name__)
|
log = get_logger(__name__)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
'Asset',
|
||||||
|
'dec_digits',
|
||||||
|
'digits_to_dec',
|
||||||
|
'MktPair',
|
||||||
|
'Position',
|
||||||
|
'PpTable',
|
||||||
'Transaction',
|
'Transaction',
|
||||||
'TransactionLedger',
|
'TransactionLedger',
|
||||||
'open_trade_ledger',
|
|
||||||
'PpTable',
|
|
||||||
'open_pps',
|
|
||||||
'load_pps_from_ledger',
|
'load_pps_from_ledger',
|
||||||
'Position',
|
'open_pps',
|
||||||
|
'open_trade_ledger',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ class Position(Struct):
|
||||||
# drop symbol obj in serialized form
|
# drop symbol obj in serialized form
|
||||||
s = d.pop('symbol')
|
s = d.pop('symbol')
|
||||||
fqme = s.fqme
|
fqme = s.fqme
|
||||||
broker, key, suffix = unpack_fqme(fqme)
|
broker, mktep, venue, suffix = unpack_fqme(fqme)
|
||||||
|
|
||||||
if isinstance(s, Symbol):
|
if isinstance(s, Symbol):
|
||||||
sym_info = s.broker_info[broker]
|
sym_info = s.broker_info[broker]
|
||||||
|
|
Loading…
Reference in New Issue