Validate market tick sizes and encode precise limit order amounts
This commit is contained in:
@@ -44,6 +44,8 @@ pub(crate) fn market_assets(db: &Connection, market: &str) -> Result<Value> {
|
||||
Ok(detail)
|
||||
},
|
||||
)?;
|
||||
detail["tick_size"] =
|
||||
json!(crate::tick_size::TickSize::load(db, market)?.map(|tick| tick.text()));
|
||||
detail["min_order_size"] =
|
||||
json!(crate::minimum_size::MinimumSize::load(db, market)?.map(|size| size.text()));
|
||||
detail["taker_fee_rate_ppm"] = json!(crate::fees::rate(db, market)?);
|
||||
@@ -66,6 +68,7 @@ pub(crate) fn resolve(db: &Connection, request: &mut Value) -> Result<()> {
|
||||
| "trades"
|
||||
| "market_sell"
|
||||
| "estimate"
|
||||
| "limit_amounts"
|
||||
| "market_buy"
|
||||
| "cancel_market_orders"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user