{"name":"orderbook_audit","version":"0.1.0","description":"Estimate fill cost, fees, partial depth and snapshot freshness from a caller-provided order book. Decimal strings preserve precision. Does not fetch prices or execute trades.","endpoint":{"method":"POST","path":"/v1/orderbook-audit"},"input_schema":{"additionalProperties":false,"properties":{"base":{"pattern":"^[A-Z0-9]{2,12}$","title":"Base","type":"string"},"quote":{"pattern":"^[A-Z0-9]{2,12}$","title":"Quote","type":"string"},"snapshot_at":{"format":"date-time","title":"Snapshot At","type":"string"},"side":{"enum":["buy","sell"],"title":"Side","type":"string"},"amount_base":{"anyOf":[{"exclusiveMinimum":0.0,"maximum":1e+18,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,18}|(?=[\\d.]{1,37}0*$)\\d{0,18}\\.\\d{0,18}0*$)","type":"string"}],"title":"Amount Base"},"taker_fee_bps":{"anyOf":[{"maximum":1000.0,"minimum":0.0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,4}|(?=[\\d.]{1,23}0*$)\\d{0,4}\\.\\d{0,18}0*$)","type":"string"}],"title":"Taker Fee Bps"},"max_age_ms":{"default":10000,"maximum":3600000,"minimum":1,"title":"Max Age Ms","type":"integer"},"bids":{"items":{"additionalProperties":false,"properties":{"price":{"anyOf":[{"exclusiveMinimum":0.0,"maximum":1e+18,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,18}|(?=[\\d.]{1,37}0*$)\\d{0,18}\\.\\d{0,18}0*$)","type":"string"}],"title":"Price"},"size":{"anyOf":[{"exclusiveMinimum":0.0,"maximum":1e+18,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,18}|(?=[\\d.]{1,37}0*$)\\d{0,18}\\.\\d{0,18}0*$)","type":"string"}],"title":"Size"}},"required":["price","size"],"title":"Level","type":"object"},"maxItems":200,"minItems":1,"title":"Bids","type":"array"},"asks":{"items":{"additionalProperties":false,"properties":{"price":{"anyOf":[{"exclusiveMinimum":0.0,"maximum":1e+18,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,18}|(?=[\\d.]{1,37}0*$)\\d{0,18}\\.\\d{0,18}0*$)","type":"string"}],"title":"Price"},"size":{"anyOf":[{"exclusiveMinimum":0.0,"maximum":1e+18,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,18}|(?=[\\d.]{1,37}0*$)\\d{0,18}\\.\\d{0,18}0*$)","type":"string"}],"title":"Size"}},"required":["price","size"],"title":"Level","type":"object"},"maxItems":200,"minItems":1,"title":"Asks","type":"array"}},"required":["base","quote","snapshot_at","side","amount_base","taker_fee_bps","bids","asks"],"title":"AuditRequest","type":"object"},"output_schema":{"type":"object","properties":{"kind":{"type":"string","const":"snapshot_estimate"},"base":{"type":"string"},"quote":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"snapshot_at":{"type":"string"},"snapshot_age_ms":{"type":"integer"},"freshness":{"type":"string","enum":["fresh","stale","future"]},"best_bid":{"type":"string"},"best_ask":{"type":"string"},"spread_bps":{"type":"string"},"requested_base":{"type":"string"},"filled_base":{"type":"string"},"unfilled_base":{"type":"string"},"fully_fillable":{"type":"boolean"},"levels_used":{"type":"integer"},"vwap_quote_per_base":{"type":"string"},"slippage_from_best_bps":{"type":"string"},"gross_quote_for_filled":{"type":"string"},"fee_quote_for_filled":{"type":"string"},"cash_quote_for_filled":{"type":"string"},"cash_direction":{"type":"string","enum":["pay","receive"]},"assumptions":{"type":"string"}},"required":["kind","base","quote","side","snapshot_at","snapshot_age_ms","freshness","best_bid","best_ask","spread_bps","requested_base","filled_base","unfilled_base","fully_fillable","levels_used","vwap_quote_per_base","slippage_from_best_bps","gross_quote_for_filled","fee_quote_for_filled","cash_quote_for_filled","cash_direction","assumptions"],"additionalProperties":false},"example":{"synthetic":true,"fixed_clock":"2026-09-05T02:00:01Z","input":{"base":"BTC","quote":"USD","snapshot_at":"2026-09-05T02:00:00Z","side":"buy","amount_base":"0.03","taker_fee_bps":"5","max_age_ms":10000,"bids":[{"price":"99900","size":"0.1"}],"asks":[{"price":"100000","size":"0.01"},{"price":"100100","size":"0.04"}]},"output":{"kind":"snapshot_estimate","base":"BTC","quote":"USD","side":"buy","snapshot_at":"2026-09-05T02:00:00+00:00","snapshot_age_ms":1000,"freshness":"fresh","best_bid":"99900","best_ask":"100000","spread_bps":"10.0050025012506253126563281640820410205102551275637818909455","requested_base":"0.03","filled_base":"0.03","unfilled_base":"0","fully_fillable":true,"levels_used":2,"vwap_quote_per_base":"100066.666666666666666666666666666666666666666666666666666667","slippage_from_best_bps":"6.6666666666666666666666666666666666666666666666666666667","gross_quote_for_filled":"3002","fee_quote_for_filled":"1.501","cash_quote_for_filled":"3003.501","cash_direction":"pay","assumptions":"Provided snapshot only; fee charged in quote currency; no FX, transfers, lot-size rounding or execution guarantee."}},"deployment":"hosted_preview","mainnet_enabled":false,"marketplace_registration":"not_registered","mode":"testnet"}