Coinlocally Docs
API Document
API Document
  • Introduction
    • API Basic Information
    • HTTP Error Codes
    • General Information
    • Limits
    • Endpoint Security Type
    • Signature Authentication
    • Timing Security
    • SIGNED Endpoint Example
  • Changelog
  • Spot
    • Public
    • Market
    • Trade
    • Account
  • Futures
    • Public
    • Market
    • Trade
    • Account
  • Margin
  • Withdraw
  • WebSocket
    • Spot
    • Futures
  • Official SDK
  • Enums
  • Error
  • FAQ
Powered by GitBook
On this page
  1. Spot

Market

PreviousPublicNextTrade

Last updated 18 days ago

These endpoints provide public access to market data, including order book depth, recent trades, candlestick charts, and 24-hour ticker statistics. No authentication is required.

Market Depth

get

Get current order book depth for a given symbol.

Query parameters
symbolstringRequired

Symbol name, e.g., BTC/USDT

limitinteger · max: 100Optional

Limit the number of price levels returned

Default: 100
Responses
200
Successfully retrieved order book depth.
application/json
get
GET /sapi/v2/depth HTTP/1.1
Host: openapi.coinlocally.com
Accept: */*
200

Successfully retrieved order book depth.

{
  "bids": [
    [
      "3.90000000",
      "431.00000000"
    ],
    [
      "4.00000000",
      "431.00000000"
    ]
  ],
  "asks": [
    [
      "4.00000200",
      "12.00000000"
    ],
    [
      "5.10000000",
      "28.00000000"
    ]
  ],
  "time": 1595563624731
}

24hr Ticker Price Change Statistics

get

Get 24 hour price change statistics. If no symbol is sent, data for all symbols is returned.

Query parameters
symbolstringOptional

Single symbol, e.g., BTC/USDT

Weight (IP/UID):

  • If symbol is provided: 5
  • If symbol is not provided: 80
symbolsstringOptional

Comma-separated list of symbols, e.g., BTC/USDT,ethusdt

Weight (IP/UID):

  • If symbols is not provided: 80
  • symbols (1–20): 5
  • symbols (21–100): 40
  • symbols (≥ 101): 80
Responses
200
Successfully retrieved 24hr ticker data.
application/json
Responseone of
get
GET /sapi/v2/ticker HTTP/1.1
Host: openapi.coinlocally.com
Accept: */*
200

Successfully retrieved 24hr ticker data.

{
  "high": "9279.0301",
  "vol": "1302",
  "last": "9200",
  "low": "9279.0301",
  "rose": "0",
  "time": 1595563624731,
  "symbol": "BTC/USDT",
  "amount": "3213",
  "askPrice": "123",
  "askVolume": "213213",
  "bidPrice": "12323",
  "bidVolume": "213213"
}

Recent Trades List

get

Get recent trades for a symbol.

Query parameters
symbolstringRequired

Symbol name, e.g., BTC/USDT

limitinteger · max: 1000Optional

Limit the number of trades returned

Default: 100
Responses
200
Successfully retrieved recent trades.
application/json
get
GET /sapi/v2/trades HTTP/1.1
Host: openapi.coinlocally.com
Accept: */*
200

Successfully retrieved recent trades.

{
  "list": [
    {
      "price": "3.00000100",
      "qty": "11.00000000",
      "time": 1499865549590,
      "side": "BUY"
    }
  ]
}

Kline/Candlestick Data

get

Get candlestick data for a given symbol and interval.

Query parameters
symbolstringRequired

Symbol name, e.g., BTC/USDT

intervalstringRequired

Interval of the candlestick data.

Supported values: 1min, 5min, 15min, 30min, 60min, 1day, 1week, 1month.

startTimeintegerOptional

Start time in milliseconds (optional)

endTimeintegerOptional

End time in milliseconds (optional)

Responses
200
Successfully retrieved candlestick data.
application/json
get
GET /sapi/v2/klines HTTP/1.1
Host: openapi.coinlocally.com
Accept: */*
200

Successfully retrieved candlestick data.

[
  {
    "high": "6228.77",
    "vol": "111",
    "low": "6228.77",
    "idx": 1594640340,
    "close": "6228.77",
    "open": "6228.77"
  },
  {
    "high": "6228.77",
    "vol": "222",
    "low": "6228.77",
    "idx": 1587632160,
    "close": "6228.77",
    "open": "6228.77"
  },
  {
    "high": "6228.77",
    "vol": "333",
    "low": "6228.77",
    "idx": 1587632100,
    "close": "6228.77",
    "open": "6228.77"
  }
]
  • GETMarket Depth
  • GET24hr Ticker Price Change Statistics
  • GETRecent Trades List
  • GETKline/Candlestick Data