Match fractional share lots and preserve order quantities across restart

This commit is contained in:
2026-12-03 07:01:24 +08:00
parent 2c4179a64e
commit 064b301ebd
27 changed files with 343 additions and 111 deletions
+2 -2
View File
@@ -63,8 +63,8 @@ impl Filter {
trades.push(
json!({"execution":execution,"order":order,"market":market,"outcome":outcome,
"asset_id":assets::id(&market,&outcome),"side":r.get::<_,String>(4)?,
"kind":r.get::<_,String>(5)?,"price_micros":price*10000,"size":size,
"gross_cents":price*size,"fee_micros":r.get::<_,i64>(10)?,"at_ms":r.get::<_,Option<i64>>(8)?,
"kind":r.get::<_,String>(5)?,"price_micros":price*10000,"size":crate::lots::display(size),
"gross_cents":crate::inventory::decimal(i128::from(price)*i128::from(size),100),"fee_micros":r.get::<_,i64>(10)?,"at_ms":r.get::<_,Option<i64>>(8)?,
"role":r.get::<_,Option<String>>(9)?}),
);
last = Some((execution, order));