API & MCP
Everything a person can do on RavingDesk Crypto Spot Round-Trip Cost Planner, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ravingdeskcryptoroundtrip.usefulweb.site/api/v1/calculate– run RavingDesk Crypto Spot Round-Trip Cost PlannerGET https://ravingdeskcryptoroundtrip.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
RavingDesk Crypto Spot Round-Trip Cost Planner
Estimates a hypothetical spot round trip from the mid prices and cost assumptions you enter: buy fill (ask plus slippage), sell fill (bid minus slippage), trading fees on both sides and a network/withdrawal fee in base units, with net profit or loss, return on cost and the exit mid price needed to break even. Nothing is fetched and no order is sent. It is the crypto spot lab of the RavingDesk workspace.
| Field | Type | Default | Description |
|---|---|---|---|
base | text | "BTC" | Base asset |
quote | text | "USDT" | Quote asset |
quantity (required) | number | 1 | Base quantity bought |
entryMid (required) | number | 60000 | Entry mid price |
exitMid (required) | number | 62000 | Exit mid price |
spreadBps | number | 10 | Full bid–ask spread |
slippageBps | number | 5 | Slippage per side |
entryFeePercent | number | 0.1 | Entry trading fee |
exitFeePercent | number | 0.1 | Exit trading fee |
networkBase | number | 0 | Network / withdrawal fee. In base units, deducted once between buying and selling (e.g. moving coins to another exchange). |
Example request
Fictional BTC round trip: 1 BTC, 60,000 → 62,000, 10 bps spread, 0.1 % fees
curl -X POST https://ravingdeskcryptoroundtrip.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"base":"BTC","quote":"USDT","quantity":1,"entryMid":60000,"exitMid":62000,"spreadBps":10,"slippageBps":5,"entryFeePercent":0.1,"exitFeePercent":0.1,"networkBase":0}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://ravingdeskcryptoroundtrip.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ravingdesk_crypto_round_trip - Local stdio connector:
node src/mcp-stdio.ts --tool=ravingdesk-crypto-round-trip
{
"mcpServers": {
"ravingdesk-crypto-round-trip": { "type": "http", "url": "https://ravingdeskcryptoroundtrip.usefulweb.site/mcp" }
}
}