Charts & Trades

Charts

GET /api/v3/charts

Charts Query Parameters

ParameterTypeDescription
pairstringpair symbol like BTC_USDT, required
intervalstringchart interval (1, 5, 15, 30, 60, 240, 1D), required
sinceintegerUnix timestamp, filter from
untilintegerUnix timestamp, filter to
limitintegerlimit of candles (default 500, max 500)
import time
from alpcom_api import dto

candle_list = public_api.charts(
    pair='BTC_USDT',
    interval=dto.ChartInterval.DAY,
    since=int(time.time()) - 60 * 60 * 24 * 10  # last 10 days
)

Charts Response

[{
    "time": 1630862400,
    "open": 45000.0,
    "close": 45100.0,
    "low": 44900.0,
    "high": 45200.0,
    "volume": 1000.0,
    "quoteVolume": 45050000.0,
    "tradesCount": 150,
    "takerBuyBaseVolume": 600.0,
    "takerBuyQuoteVolume": 27030000.0
}, ...]

Trades

GET /api/v3/trades

Trades Query Parameters

ParameterTypeDescription
pairstringpair symbol like BTC_USDT, required
limitintegerlimit of records
last_trades = public_api.trades(pair='BTC_USDT', limit=10)

Trades Response

[{
    "id": 1,
    "price": 45000.0,
    "amount": 2.5,
    "timestamp": 1630862400.0,
    "pair": "BTC_USDT",
    "type": "buy"
}, ...]