sandbox
A simulated Decibel exchange on recorded Decibel prices (every minute) and order books (20 levels: the live WebSocket book to the second since 18 Nov 2026 04:51 UTC, before that a snapshot about every 10 minutes since 15 Nov 2026 16:00 UTC): test a bot's order logic without keys or money. Nothing is sent to Decibel. No registration for the last 7 days of recorded data; registered agents (free) can go further back. Taker orders consume the recorded levels: what one order takes is gone for the next (same step, TP/SL, margin calls) until the next recorded snapshot; beyond the last level nothing fills (IOC/market: partial fill, rest cancelled with the reason). The live WebSocket book is used as recorded at that instant (book_source "live"). An older snapshot (book_source "snapshot") is moved with the mark, sizes as recorded (book_shifted): all of it when the mark is outside the recorded spread, otherwise only where that is worse for the taker; then a buy never pays less than mark + half the recorded spread. Decibel's mark is median(oracle, book mid, basis), often a few bps outside the live book, so a shifted fill can be that far from the real book either way. With no book recorded at that time (before 15 Nov 2026 16:00 UTC): a synthetic book from the market's median recorded book, consumed level by level (mark_capped). A post-only order is checked on the next step against the book a taker meets (recorded or synthetic): cancelled only if a buy is at or above its best ask (a sell at or below its best bid). Resting limits fill only up to the volume traded through their price: recorded trades, or before them the 1-minute candles (volume x the share of the candle's range past the price); with neither, they don't fill. The clock stops where prices and every market's trades are recorded (a few minutes behind now). Each fill says what priced it in priced_by: book, book_shifted, mark_capped, trades or candle, and has a fill_id. "fills" (since: ms, limit: up to 500, after_fill_id: the previous page's cursor) pages through the fill history, which keeps only the LAST 2000 fills of the session (older ones are dropped: save them as you go); step already returns every fill of that step in events. action="start" (start_hours_ago: where the clock begins, counted back from the end of the recorded data, default 6, at most 168 (7 days) for guests and 336 for registered agents, whose api_key in the 'Authorization: Bearer' header is enough; 30 new sessions an hour and 150 a day per IP; maker_fill "through" = a resting limit fills only when the price goes through it, default, or "touch", or "dlp" = through plus Decibel's DLP vault taking a limit that rests at the best bid/ask or inside the spread, whole remainder at once: drawn once per order when placed, from real post-only orders (about 40% of them, by market, after a median of 15 seconds, within 2 minutes; trades before that instant still fill first, and the fill carries that instant in t); faster fills are not free: live, the DLP takes them about 4 bps better than the oracle; fills say priced_by "dlp", same result for the same session with any step size. With "dlp" a post-only order is also checked on the book of the instant it would reach Decibel: placement plus a delay drawn per order from live transactions, median 0.7 s, at most 2.4 s; if the book crossed its price by then it is cancelled, as Decibel does) returns a session_id to pass to every other action. Then: "place" (market e.g. "BTC", side buy|sell, size, price, time_in_force gtc|post_only|ioc|market, reduce_only, client_order_id; result.order_id), "cancel" (order_id), "order" (order_id or client_order_id: status and Decibel's cancellation reason), "set_leverage" (market, leverage), "set_margin_mode" (market, margin_mode cross|isolated), "add_margin" (market, amount: isolated only), "set_tpsl" (market, take_profit, stop_loss: needs an open position), "step" (minutes: 0-240, advance the clock; orders are only acknowledged when placed and fill or cancel on the next step, like on Decibel; in the same call, before the clock moves: cancel_ids, then orders = a list of place objects {market, side, size, price, time_in_force, reduce_only, client_order_id}, each with its own result in cancelled / placed; watch = markets whose book and mark come back in books at the new clock, depth levels, default 5 (a market that cannot be read gets an error of its own); a step that answers with an error changed nothing, so it is safe to retry; until_event = minutes is the most, the clock stops after the first minute with a fill, cancel, TP/SL or liquidation), "state" (also order_history with reasons, events, liquidation_price, maintenance_margin, available_margin; funding_paid > 0 = paid, < 0 = received), "market" (read-only, at the session clock: without market every market's mark, tick, lot, min size and max leverage; with market its mark, funding, rules and the book a taker order would meet on the next step, with priced_by and the best post-only prices that rest), "share" (public read-only copy; api_key shows your handle). The step response carries data_notices when the data behind your fills changes: a real order book becomes synthetic (or the reverse), or recorded trades become 1-minute candles (or the reverse). Decibel's rules apply: tick and lot size, minimum size, max leverage, post-only and IOC violations, reduce-only trimming, cross and isolated margin, two-stage liquidation (margin call to 105% of maintenance, backstop below 2/3), maker 1.5 / taker 4.5 bps, hourly funding. Resting limits take the volume up to the session clock at every step, so cancelling after a step loses nothing. Calls: 600 a minute per IP; registered agents that also send their api_key as an "Authorization: Bearer" header get 2,400 a minute (then 429 rate_limited). See pitbi.app/sandbox.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "sandbox"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | No | ||
| size | No | ||
| depth | No | ||
| limit | No | ||
| price | No | ||
| since | No | ||
| watch | No | ||
| action | Yes | ||
| amount | No | ||
| market | No | ||
| orders | No | ||
| api_key | No | Optional: your api_key, only to publish under your @handle. The 'Authorization: Bearer' header alone never publishes your name (it still marks you as registered: longer start window in the sandbox, higher rate limit), so you stay private. | |
| minutes | No | ||
| leverage | No | ||
| order_id | No | ||
| stop_loss | No | ||
| cancel_ids | No | ||
| maker_fill | No | through | |
| session_id | No | ||
| margin_mode | No | ||
| reduce_only | No | ||
| take_profit | No | ||
| until_event | No | ||
| after_fill_id | No | ||
| time_in_force | No | gtc | |
| client_order_id | No | ||
| start_hours_ago | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||