API Guide

Request format, response structure, error codes, and endpoint reference

Base URL

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

Authentication

Include your API key as a Bearer token:

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

See Authentication for scopes and plan details.

Common Parameters

Most endpoints require these parameters:

ParameterTypeRequiredDescription
exchangestringExchange ID: binance, bybit, okx, kucoin, gate, htx, bitget, bingx, bitmart, bitmex, coinex, hyperliquid
marketTypestringMarket: spot, futures, coinm-futures
symbolstringMostTrading pair, e.g. BTC/USDT, ETH/USDT

Good to know

Use GET /exchanges to check which exchanges support which market types and features.

Request Format

  • GET endpoints accept query parameters
  • POST endpoints accept JSON body with Content-Type: application/json
GET example
curl "https://stage.goldenclaw.sh/api/v1/market/price?exchange=binance&marketType=futures&symbol=BTC/USDT" \
  -H "Authorization: Bearer YOUR_API_KEY"
POST example
curl -X POST "https://stage.goldenclaw.sh/api/v1/trading/orders/place" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "exchange": "binance",
    "marketType": "futures",
    "symbol": "BTC/USDT",
    "side": "BUY",
    "type": "MARKET",
    "quantity": 0.001,
    "leverage": 10
  }'

Response Format

Success

{
  "success": true,
  "data": {
    "symbol": "BTC/USDT",
    "price": 87432.50
  },
  "meta": {
    "timestamp": 1741683600000,
    "remaining": 9847
  }
}
FieldTypeDescription
successbooleanAlways true for successful responses
dataobjectResponse payload (varies by endpoint)
meta.timestampnumberServer timestamp (Unix ms)
meta.remainingnumberRemaining requests in current period

Error

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

Error Codes

HTTPCodeDescription
400BAD_REQUESTInvalid parameters or request body
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENAPI key lacks required scope
404NOT_FOUNDResource not found
429RATE_LIMITEDMonthly request quota exceeded
500INTERNAL_ERRORServer error (details hidden in production)

Endpoints

Exchange

MethodPathScopeDescription
GET/exchangesmarket:readList supported exchanges with capabilities

Market Data

MethodPathScopeDescription
GET/market/pricemarket:readCurrent price for a symbol
GET/market/ohlcvmarket:readOHLCV candlestick data
GET/market/pairsmarket:readAvailable trading pairs
GET/market/symbolsmarket:readSymbol details for an exchange
GET/market/tickermarket:read24h ticker statistics
GET/market/timeframesmarket:readSupported timeframes

Trading

MethodPathScopeDescription
POST/trading/orders/placetrade:*:writePlace an order (MARKET, LIMIT, STOP, STOP_LIMIT)
POST/trading/orders/canceltrade:*:writeCancel an open order
GET/trading/orderstrade:*:readList open orders for a symbol
GET/trading/positionstrade:*:readList open positions
POST/trading/positions/closetrade:*:writeClose an open position

Account

MethodPathScopeDescription
GET/account/balanceaccount:readAccount balance with multi-currency breakdown
GET/account/infoaccount:readFull account information

Indicators

MethodPathScopeDescription
GET/indicators/{category}indicators:readList available indicators in a category
POST/indicators/{category}indicators:readCalculate a technical indicator

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

MCP Alternative

All the same functionality is available via Model Context Protocol at:

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

MCP uses the same API key (Bearer token) and counts toward the same rate limits. See MCP Tools for the full tool catalog.