Settle sub-cent orders and migrate historical book prices
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user