Settle sub-cent orders and migrate historical book prices

This commit is contained in:
2026-12-03 07:07:25 +08:00
parent 064b301ebd
commit 20ce08adf9
32 changed files with 393 additions and 138 deletions
+6
View File
@@ -177,6 +177,12 @@ impl Exchange {
{
json!(lots::display(n))
}
ValueRef::Integer(n)
if matches!(table, "orders" | "fills" | "paired_fills")
&& matches!(name.as_str(), "price" | "yes_price") =>
{
json!(crate::inventory::decimal(n.into(), 100))
}
ValueRef::Integer(n) => json!(n),
ValueRef::Text(s) => json!(std::str::from_utf8(s)?),
_ => anyhow::bail!("unexpected column type"),