Apply per-market taker fees to cash budgets, fills and account activity
This commit is contained in:
@@ -18,7 +18,7 @@ pub(crate) fn outcomes(market: &str, yes: &str, no: &str) -> Value {
|
||||
|
||||
pub(crate) fn market_assets(db: &Connection, market: &str) -> Result<Value> {
|
||||
identifier(market)?;
|
||||
let detail = db.query_row(
|
||||
let mut detail = db.query_row(
|
||||
"SELECT COALESCE(s.yes_label,g.yes_label,CASE WHEN t.market IS NULL THEN 'YES' ELSE 'Up' END),
|
||||
COALESCE(s.no_label,g.no_label,CASE WHEN t.market IS NULL THEN 'NO' ELSE 'Down' END),m.phase,a.role,a.name
|
||||
FROM markets m LEFT JOIN sports_markets s ON s.market=m.id LEFT JOIN topic_markets g ON g.market=m.id LEFT JOIN twap_markets t ON t.market=m.id LEFT JOIN augmented_outcomes a ON a.market=m.id WHERE m.id=?1",
|
||||
@@ -34,6 +34,7 @@ pub(crate) fn market_assets(db: &Connection, market: &str) -> Result<Value> {
|
||||
Ok(detail)
|
||||
},
|
||||
)?;
|
||||
detail["taker_fee_rate_ppm"] = json!(crate::fees::rate(db, market)?);
|
||||
Ok(detail)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user