Closed goodboy closed 1 year ago
I got something similar due to a couple different issues, so here is a (partial) follow up TODO list:
Transaction
-like entry in our pps.toml
of the form:
[kraken.spot."xrpeur.kraken"]
size = 78.31125778
ppu = 0.3222278400000044
bsuid = "xrpeur"
clears = [
{ dt = "2022-12-21T07:20:16.316061+00:00", ppu = 0.3222278400000044, accum_size = 778.33125778, price = 0.3212, size = 778.33125778, cost = 0.4, tid = "TJKLRL-7UE2L-BX2UE5" },
{ dt = "2022-12-21T07:26:56+00:00", ppu = 0.3222278400000044, accum_size = 78.31125778, price = "NaN", size = -700.02, cost = 0, tid = "1503A92E24BAA1E8B8E7B78E79A78AAF3E6C3F3E35227EF7D2C13754876B37D5" },
]
price
field has a Nan
value which seemingly can break .pp.py
clearing table calcs, though adjusting the clear iteration loop to sort on datetime seems to have resolved the crash?type
field which can be filled with things like 'withdrawal'
or 'split'
or 'reverse_split'
, which i'm pretty sure is a bullet somewhere in https://github.com/pikers/piker/issues/345cost
field in each ledger entry, obviously this should resolve any accounting discrepancies a transfer-as-sell clear should have a cost (that kraken takes) as part of the position calc.ergg,
found another after a recent xrp transfer..
Traceback (most recent call last):
File "/home/goodboy/repos/tractor/tractor/_runtime.py", line 196, in _invoke
res = await coro
File "/home/goodboy/repos/piker/piker/brokers/kraken/broker.py", line 609, in trades_dialogue
raise ValueError(
ValueError: Could not reproduce balance:
dst: xrp, 7.78e-06
Closed in favor of #515
Discovered by @iamzoltan and not surprising since i never tested any of this in the development of #349. The plan is to land that PR despite this issue (since master has a half working / bug filled order mode for
kraken
right now) and resolve this in post mortem fixes.issue descr
More or less there seems to be the
ValueError
raised from the pp validation logic section oftrades_dialogue()
but reproducing this requires a ledger with the appropriate intercrypto pair transactions.Solutions/TODO:
trades_kraken_spot.toml
fileClient.get_balances()
which can be hard coded manually in the code for testingtraceback