跳到主要内容

CoinGecko

CoinGecko

现货交易对

请求地址

GET /coingecko/spot/pairs

请求参数

返回示例

[
{
"ticker_id": "BTC/USDT",
"base": "BTC",
"target": "USDT"
}
]

现货行情

请求地址

GET /coingecko/spot/tickers

请求参数

返回示例

[
{
"ticker_id": "BTC/USDT",
"base_currency": "BTC",
"target_currency": "USDT",
"last_price": "38715.7",
"base_volume": "33983.6373687487",
"target_volume": "655729682.1670185",
"bid": "38703.65",
"ask": "38729.78",
"high": "39074.47",
"low": "38177.47"
}
]

现货订单簿

请求地址

GET /coingecko/spot/orderbook

请求参数

字段名是否必填类型说明
ticker_idstring产品 ID
depthinteger深度范围 [2, 100]

返回示例

{
"ticker_id": "BTC/USDT",
"timestamp": "1710000000000",
"asks": [["38710", "2"]],
"bids": [["38700", "1"]]
}

现货历史成交

请求地址

GET /coingecko/spot/historical_trades

请求参数

字段名是否必填类型说明
ticker_idstring产品 ID

返回示例

{
"ticker_id": "BTC/USDT",
"buy": [
{
"trade_id": "1001044845875020",
"price": "38599.1",
"base_volume": "0.0099",
"target_volume": "382.13109",
"trade_timestamp": "1710000000",
"type": "buy"
}
],
"sell": [
{
"trade_id": "1001044845875021",
"price": "38601.1",
"base_volume": "0.005",
"target_volume": "193.0055",
"trade_timestamp": "1710000001",
"type": "sell"
}
]
}

合约基础信息

请求地址

GET /coingecko/swap/contracts

请求参数

返回示例

[
{
"ticker_id": "BTCUSDT",
"base_currency": "BTC",
"target_currency": "USDT",
"last_price": "38599",
"base_volume": "64903.37",
"target_volume": "1260192387.609877",
"bid": "38597.5",
"ask": "38601",
"high": "39067",
"low": "38160",
"product_type": "Swap",
"open_interest_usd": "26262478",
"index_price": "38618.656",
"index_name": "BTC/USDT",
"index_currency": "USDT",
"mark_price": "38600",
"start_timestamp": "0",
"end_timestamp": "0",
"funding_rate": "0.00018783",
"next_funding_rate": "0.00018783",
"next_funding_rate_timestamp": "1710000000",
"contract_type": "Vanilla",
"contract_price": "0.001",
"contract_price_currency": "BTC"
}
]

合约订单簿

请求地址

GET /coingecko/swap/orderbook

请求参数

字段名是否必填类型说明
ticker_idstring产品 ID
depthinteger深度范围 [2, 100]

返回示例

{
"ticker_id": "BTCUSDT",
"timestamp": "1710000000000",
"bids": [["38700", "1"]],
"asks": [["38710", "2"]]
}