Skip to main content

Gopher API Guide

Welcome to the Gopher API. This guide explains how to request API access, make authenticated calls, and interpret JSON responses.
1

Request an API Key

To begin using the Gopher API, request an API key from the Gopher team.

How to Request

Fill out the API Key Request Form to request access.The team will review your request and send you an API key.
2

Making API Requests

All requests require an X-API-Key header.

cURL Request Template

curl -H "X-API-Key: <API_KEY>" \
"https://<GOPHER_URL>/api/market-data/candles?symbol=<EXCHANGE:ASSET_PAIR>&timeframe=<TIMEFRAME>&limit=<ROWS>"

Parameters

FieldDescriptionExample
symbolExchange + asset pairBINANCE:BTCUSDT
timeframeCandle interval15m, 1h, 1d
limitNumber of rows (1-1000)100

Supported Exchanges

  • ✅ BINANCE
  • ✅ COINBASE

Supported Timeframes

Only the following timeframes are accepted:1m, 5m, 15m, 1h, 4h, 1d

Row Limit

  • Maximum: 1000
  • Requests above this return an error.

Example Error Response

{"status":"error","error":{"code":"INVALID_LIMIT","message":"Limit must be between 1 and 1000"}}
3

Understanding the JSON Response

Example Response

{
  "status": "success",
  "data": {
    "symbol": "COINBASE:ETHUSDT",
    "timeframe": "4h",
    "count": 1,
    "candles": [
      {
        "timestamp": 1762329600,
        "open": 3331.06,
        "high": 3331.06,
        "low": 3282.84,
        "close": 3295.26,
        "volume": 1201.34418178
      }
    ]
  }
}

Response Fields

FieldMeaning
statussuccess/error
symbolExchange + pair
timeframeCandle timeframe
countTotal rows returned
candles[]OHLCV objects + timestamp

Example API Calls

Below are example calls using the development environment:

Binance — 15m, 100 candles

curl -H "X-API-Key: <API_KEY>" \
"https://gotrader.gopher-ai.com/api/market-data/candles?symbol=BINANCE:BTCUSDT&timeframe=15m&limit=100"

Binance — 1h, 10 candles

curl -H "X-API-Key: <API_KEY>" \
"https://gotrader.gopher-ai.com/api/market-data/candles?symbol=BINANCE:BTCUSDT&timeframe=1h&limit=10"

Coinbase — 4h, 20 candles

curl -H "X-API-Key: <API_KEY>" \
"https://gotrader.gopher-ai.com/api/market-data/candles?symbol=COINBASE:ETHUSDT&timeframe=4h&limit=20"

Summary

  • Request an API key from the Gopher team
  • Authenticate using X-API-Key
  • Query candles using <EXCHANGE:PAIR>
  • Max 1000 rows per request