The Tape — API & MCP

Programmatic access to market sentiment, candles, trades, bot status, and backtests — over the Model Context Protocol. One endpoint, one bearer key.

Quickstart

  1. Create an API key — in your account → API Keys (verify your email first). The secret is shown once; store it safely.
  2. Add the server to your MCP client (Claude Desktop, Cursor) — see below.
  3. Ask or call — your client can now use the tools listed in the catalog.

Authentication

Every request sends your key as a bearer token:

Authorization: Bearer tc_live_YOUR_KEY_HERE

The MCP endpoint is https://mcp.ubiity.com/mcp. Keys are managed in your account — they're shown once at creation and can be revoked anytime. Treat a key like a password.

Connect from an MCP client

Add this to your client's MCP config (e.g. Claude Desktop claude_desktop_config.json or Cursor mcp.json):

{
  "mcpServers": {
    "trade-center": {
      "url": "https://mcp.ubiity.com/mcp",
      "headers": { "Authorization": "Bearer tc_live_YOUR_KEY_HERE" }
    }
  }
}
Using a client that only speaks stdio? Bridge to the remote server with npx mcp-remote https://mcp.ubiity.com/mcp --header "Authorization: Bearer tc_live_YOUR_KEY_HERE".

Quick test with curl

List the tools your key can see (streamable-HTTP MCP requires the Accept header shown):

curl -s https://mcp.ubiity.com/mcp \
  -H "Authorization: Bearer tc_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Python

Using the official mcp client SDK (pip install mcp):

import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

URL = "https://mcp.ubiity.com/mcp"
HEADERS = {"Authorization": "Bearer tc_live_YOUR_KEY_HERE"}

async def main():
    async with streamablehttp_client(URL, headers=HEADERS) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()
            result = await session.call_tool("get_sentiment_summary", {"period": "30d"})
            print(result)

asyncio.run(main())

Tool catalog

No P&L, no core portfolio, and no internal event logs are ever exposed over the API.

ToolReturnsAccess
list_recent_trades Recent trades, optionally filtered by asset (XSP, SPY) or bot. P&L is not included. All tiers
list_algo_positions Open algo-bot positions and holdings (P&L stripped). All tiers
list_algo_activity Recent algo-bot closed-trade activity — what it bought and sold (P&L stripped). All tiers
get_sentiment_summary Social-sentiment counts and average score by signal over a window (period: 7d, 30d, 90d, 1y, ytd, all). All tiers
list_sentiment_posts Recent sentiment-scored posts with per-post detail, newest first. All tiers
get_daily_candles Small daily OHLCV pull as inline JSON (up to 1000 rows). Dates are ISO YYYY-MM-DD. All tiers
list_bots The bot registry with each bot's last-seen heartbeat status. All tiers
get_bot_heartbeat Latest heartbeat / liveness for a single bot by name. All tiers
get_strategy_lab_summary Strategy Lab candidate counts by status and LLM spend. All tiers
list_backtest_runs List backtest runs, optionally filtered by strategy (xsp, spy, spxps). Backtest add-on
get_backtest_result One backtest run with its trades (strategy: xsp, spy, spxps). Backtest add-on

Tiers & rate limits

Free
$0
All core tools, 200 API calls per day.
API Access
$29/mo
Unlimited calls plus bulk CSV/Parquet candle export.
Backtest add-on
$19/mo
Unlocks the two backtest tools (full backtest data incl. P&L).

The free tier allows 200 calls/day; paid is unlimited. When you exceed the free cap a tool call returns:

Daily API rate limit exceeded (201/200 calls). Upgrade your plan for a higher limit.

Paid-only and add-on tools return a clear message if your plan doesn't include them (see Troubleshooting).

Bulk data export

Paid plans can pull large candle ranges as CSV or Parquet from a plain HTTPS endpoint (not MCP):

curl -s "https://mcp.ubiity.com/data/candles?symbol=SPY&start=2024-01-01&end=2024-12-31&format=csv" \
  -H "Authorization: Bearer tc_live_YOUR_KEY_HERE" -o spy_2024.csv
Free keys receive 402 Payment Required here — use get_daily_candles (≤1000 rows inline) on the free tier.

Troubleshooting

401 / no resultKey missing, malformed, or revoked. It must start with tc_live_ and be sent as Authorization: Bearer ….
"requires a paid API plan"That tool or the bulk export needs API Access. Free keys can use get_daily_candles for small pulls.
"Daily API rate limit exceeded"You hit the 200/day free cap. Upgrade for unlimited calls.
"Backtest data requires the Backtest Access add-on"Add the Backtest add-on to use list_backtest_runs / get_backtest_result.
"internal-only and not available via API keys"Operator/troubleshooting tools aren't part of the customer API. Everything customer-facing is in the catalog above.