API Reference

Complete reference for the GoldenClaw REST API and MCP tools

Base URL

https://stage.goldenclaw.sh/api/v1

Authentication

All requests require a Bearer token:

Terminal
curl "https://stage.goldenclaw.sh/api/v1/..." \
  -H "Authorization: Bearer YOUR_API_KEY"

See Authentication for scopes and plan details.

REST Endpoints

Exchange

MethodPathDescription
GET/exchangesList supported exchanges with capabilities

Market Data

MethodPathDescription
GET/market/priceGet current price for a symbol
GET/market/ohlcvGet OHLCV candlestick data
GET/market/pairsGet available trading pairs
GET/market/symbolsGet symbol details for an exchange
GET/market/tickerGet 24h ticker statistics
GET/market/timeframesGet supported timeframes

Trading

MethodPathDescription
POST/trading/orders/placePlace an order (MARKET, LIMIT, STOP, STOP_LIMIT)
POST/trading/orders/cancelCancel an open order
GET/trading/ordersGet open orders for a symbol
GET/trading/positionsGet open positions
POST/trading/positions/closeClose an open position

Account

MethodPathDescription
GET/account/balanceGet account balance with multi-currency breakdown
GET/account/infoGet full account information

Indicators

MethodPathDescription
GET/indicators/{category}List available indicators in a category
POST/indicators/{category}Calculate a technical indicator

Categories: trend, momentum, volatility, volume, support-resistance

Response Format

Success

{
  "success": true,
  "data": { ... },
  "meta": {
    "timestamp": 1741683600000,
    "remaining": 9847
  }
}

Error

{
  "success": false,
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid parameter: symbol"
  },
  "meta": {
    "timestamp": 1741683600000
  }
}

Error Codes

HTTPCodeDescription
400BAD_REQUESTInvalid parameters
401UNAUTHORIZEDInvalid or missing API key
403FORBIDDENInsufficient scope
404NOT_FOUNDResource not found
429RATE_LIMITEDRequest quota exceeded
500INTERNAL_ERRORServer error

MCP Endpoint

The same functionality is available via Model Context Protocol:

POST https://stage.goldenclaw.sh/mcp

15 tools across discovery, market data, trading, account, and indicator categories. See MCP Tools Reference for complete parameter documentation or MCP Tools Overview for example prompts.

SDKs

Coming Soon

  • @goldenclaw/sdk — TypeScript REST API client with full type safety
  • @goldenclaw/mcp — Run GoldenClaw MCP server locally via npx
  • @goldenclaw/ai — Vercel AI SDK plugin for building trading agents