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

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.

Inputs of RavingDesk Crypto Spot Round-Trip Cost Planner
FieldTypeDefaultDescription
basetext"BTC"Base asset
quotetext"USDT"Quote asset
quantity (required)number1Base quantity bought
entryMid (required)number60000Entry mid price
exitMid (required)number62000Exit mid price
spreadBpsnumber10Full bid–ask spread
slippageBpsnumber5Slippage per side
entryFeePercentnumber0.1Entry trading fee
exitFeePercentnumber0.1Exit trading fee
networkBasenumber0Network / 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)

{
  "mcpServers": {
    "ravingdesk-crypto-round-trip": { "type": "http", "url": "https://ravingdeskcryptoroundtrip.usefulweb.site/mcp" }
  }
}