Skip to main content

接口

GET
string
https://api.llmquant.com/prices/crypto/snapshot

参数

必填

symbol
string
required
交易对(如 BTCUSDT)。支持逗号分隔的多个交易对批量查询。

选填

market_type
string
default:"spot"
市场类型,可选值:spot(现货)、futures(合约)。

返回值

snapshots
array
CryptoSnapshot 对象数组。

代码示例

import requests

headers = {"X-API-KEY": "your_api_key_here"}

url = "https://api.llmquant.com/prices/crypto/snapshot?symbol=BTCUSDT,ETHUSDT&market_type=futures"
response = requests.get(url, headers=headers)
snapshots = response.json().get("snapshots")

for s in snapshots:
    print(f"{s['symbol']}: {s['price']} | 资金费率: {s['funding_rate']}")