返回所有可用的交易品种及其元数据:品种代码、名称、类型、点值、合约规格。
响应 200 OK
{
"items": [
{
"symbol": "XAUUSD",
"name": "黄金兑美元",
"type": "commodity",
"pip_size": 0.01,
"contract_size": 100,
"margin_rate": 0.01,
"min_lot": 0.01,
"max_lot": 50
}
],
"count": 30
}
cURLPythonJavaScript
curl -H "X-API-Key: YOUR_KEY" "https://dapexlabs.com"
import requests
r = requests.get("https://dapexlabs.com",
headers={"X-API-Key": "YOUR_KEY"})
symbols = r.json()["items"]
for s in symbols:
print(f"{s['symbol']}: {s['name']}")
fetch("https://dapexlabs.com", {
headers: { "X-API-Key": "YOUR_KEY" }
}).then(r => r.json()).then(data => {
data.items.forEach(s => console.log(s.symbol, s.name));
});
发表评论