The Carry Trade Lifecycle
for AI Agents
MCP server covering a Binance Portfolio Margin carry trade end to end — long spot, short UM or CM perpetual. Public market data only — no execution, no custody, no account access.
A funding rate is an estimate until it settles. Past statistics are observations, not a forecast.
What is 0xCarry
A Model Context Protocol server that measures one specific trade: buy spot on Binance, short the matching perpetual in a Portfolio Margin account, and hold to collect funding. It reports what the market and your own ledger actually say — the decision stays with you.
Discovery Without a Watchlist
Rank by real 24h spot volume instead of naming symbols yourself. UM and CM count separately, and a listing too new to cover the window is excluded — never padded to fill the sample.
Decimal-Exact, No Floats
40-digit decimals, HALF_EVEN rounding, Binance strings never parsed into doubles. Inverse CM contracts use a reciprocal-weighted average price — an arithmetic mean of fill prices is simply wrong there.
Stateless by Design
No keys, no account connection, nothing stored between calls. You send the actual balances, remaining contracts, capital contributed and settled cashflows; it values them and quotes the exit.
Available Tools
Find candidates in a universe you declare. Returns the current funding estimate, daily funding statistics over every window you ask for, and 24h liquidity for both legs.
Walk both order books at your actual size. Returns fees at your declared rates, the base you would really end up holding, and conditional daily carry at current or historical rates.
Value the snapshot you send, quote the exit leg by leg, and reconcile the final result — including the coin balance a CM settlement leaves behind after the short is closed.
Input and output JSON Schemas are published through MCP tools/list. Errors return isError with a machine-readable code — missing or malformed data fails loudly instead of defaulting.
Call Sequence
A carry trade rarely matches its plan. One leg fills partially, a CM funding settlement pays in coin, fees come out of a third asset. Reconstructing that from an entry price and a date silently invents numbers.
So the position call takes the balances you really hold, the contracts really left, the capital really contributed and the cashflows really settled. P&L then comes from an asset identity rather than a guess:
trade_pnl = trade_value − net_contributed_value
Cashflow categories explain the change. They are never added on top of it.
Scope
The split is intentional. Measurement — multi-window statistics, trimmed means, whether mean and median even agree on the sign — belongs in the interface, because it costs nothing extra and hides no assumption. Entry rules, position sizing and hysteresis are yours: they encode risk tolerance a data server has no business guessing.
Get Started
Remote
Connect any MCP client to the hosted endpoint. No setup needed.
Claude Desktop Config
{ "mcpServers": { "0xcarry": { "url": "https://mcp.0xcarry.com" } } }
Allow at least 120 seconds for a tool call. A scan has an 80 second deadline and each evaluation 30 seconds; a client timeout or a dropped connection cancels the upstream work rather than leaving it running.