公共行情接口
獲取某個 Ticker 信息
HTTP 請求 取得某個 ticker 訊息
- GET
/api/v2/market/ticker
限速規則:20 次/ 1s
請求參數
參數名 | 參數類型 | 是否必須 | 描述 |
---|---|---|---|
symbol | String | 是 | 交易對名稱 |
curl "https://api-spot.weex.com/api/v2/market/ticker?symbol=BTCUSDT_SPBL"
傳回參數
欄位名 | 類型 | 欄位說明 |
---|---|---|
symbol | String | 幣對 |
priceChange | String | 價格漲跌幅 |
priceChangePercent | String | 價格漲跌幅百分比 |
trades | long | 24小時成交筆數 |
size | String | 24小時成交量 |
value | String | 24小時成交額 |
high | String | 24小時最高價 |
low | String | 24小時最低價 |
open | String | 24小時內開盤價 |
close | String | 24小時內收盤價 |
highTime | long | 24小時最高價時間 |
lowTime | long | 24小時最低價時間 |
startTime | long | 24小時行情開始時間 |
endTime | long | 24小時行情結束時間 |
lastPrice | String | 最新成交價 |
markPrice | String | 當前標記價格 |
indexPrice | String | 當前指數價格 |
openInterest | String | 當前未平倉的持倉量 |
傳回範例
{
"code": "00000",
"msg": "success",
"requestTime": 1743665793483,
"data": {
"symbol": "BTCUSDT_SPBL",
"priceChange": "-965.6",
"priceChangePercent": "-0.011451",
"trades": 105901,
"size": "78570.57284800",
"value": "6731333236.9492884000",
"high": "88495.5",
"low": "82175.9",
"open": "84319.6",
"close": "83354.0",
"highTime": 1743625002550,
"lowTime": 1743638655112,
"startTime": 1743576300000,
"endTime": 1743665400000,
"lastPrice": "83354.0",
"markPrice": "0",
"indexPrice": "0",
"openInterest": "0"
}
}
獲取全部 Ticker 信息
HTTP 請求 取得全部 ticker 信息
- GET
/api/v2/market/tickers
限速規則:20 次/ 1s
請求參數
NONE
請求範例
curl "https://api-spot.weex.com/api/v2/market/tickers"
傳回參數
欄位名 | 類型 | 欄位說明 |
---|---|---|
symbol | String | 幣對 |
priceChange | String | 價格漲跌幅 |
priceChangePercent | String | 價格漲跌幅百分比 |
trades | long | 24小時成交筆數 |
size | String | 24小時成交量 |
value | String | 24小時成交額 |
high | String | 24小時最高價 |
low | String | 24小時最低價 |
open | String | 24小時內開盤價 |
close | String | 24小時內收盤價 |
highTime | long | 24小時最高價時間 |
lowTime | long | 24小時最低價時間 |
startTime | long | 24小時行情開始時間 |
endTime | long | 24小時行情結束時間 |
lastPrice | String | 最新成交價 |
markPrice | String | 當前標記價格 |
indexPrice | String | 當前指數價格 |
openInterest | String | 當前未平倉的持倉量 |
傳回範例
{
"code": "00000",
"msg": "success",
"requestTime": 1743667090710,
"data": [{
"symbol": "BTCUSDT_SPBL",
"priceChange": "-628.0",
"priceChangePercent": "-0.007465",
"trades": 106283,
"size": "78680.72453000",
"value": "6740487302.7932238000",
"high": "88495.5",
"low": "82175.9",
"open": "84125.9",
"close": "83497.9",
"highTime": 1743625002550,
"lowTime": 1743638655112,
"startTime": 1743577200000,
"endTime": 1743666300000,
"lastPrice": "83497.9",
"markPrice": "0",
"indexPrice": "0",
"openInterest": "0"
}]
}
取得成交數據
HTTP 請求 取得成交數據
- GET
/api/v2/market/fills
限速規則:20 次/ 1s
請求參數
參數名 | 參數類型 | 是否必須 | 描述 |
---|---|---|---|
symbol | String | 是 | 交易對ID |
limit | String | 否 | 默認100,最大1000 |
請求範例
curl "https://api-spot.weex.com/api/v2/market/fills?symbol=BTCUSDT_SPBL&limit=1"
傳回參數
欄位名 | 類型 | 欄位說明 |
---|---|---|
symbol | String | 幣對名稱 |
tradeId | String | 成交訂單 ID |
fillTime | long | 成交時間 |
fillPrice | String | 成交價格 |
fillQuantity | String | 成交數量 |
tradeValue | String | 成交額 |
bestMatch | boolean | 是否完全匹配 |
buyerMaker | boolean | 是否為maker單 |
傳回範例
{
"code": "00000",
"msg": "success",
"requestTime": 1743668717640,
"data": [
{
"symbol": "BTCUSDT_SPBL",
"tradeId": "778a5376-a0b6-4c8f-ab64-dd6ea40f896e",
"fillTime": 1743668713364,
"fillPrice": "83609.7",
"fillQuantity": "0.00011400",
"tradeValue": "9.531505800",
"bestMatch": true,
"buyerMaker": true
}
]
}
取得 K 線數據
HTTP 請求 取得 K 線數據
- GET
/api/v2/market/candles
限速規則:20 次/ 1s
請求參數
參數名 | 參數類型 | 是否必須 | 描述 |
---|---|---|---|
symbol | String | 是 | 交易對 |
period | String | 是 | K線的時間單位,粒度(取值參考如下列表)[1m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,1w,1M] |
after | Long | 否 | 時間之後的 |
before | Long | 否 | 時間之前的 |
limit | Integer | 否 | 返回結果的數量 |
請求範例
curl "https://api-spot.weex.com/api/v2/market/candles?symbol=BTCUSDT_SPBL&period=30m&after=&before=&limit="
傳回參數
欄位名 | 類型 | 欄位說明 |
---|---|---|
0 | long | 系統時間戳(毫秒) |
1 | String | 開盤價格 |
2 | String | 最高價格 |
3 | String | 最低價格 |
4 | String | 收盤價格 |
5 | String | 成交量 |
6 | String | 成交額 |
傳回範例
{
"code": "00000",
"msg": "success",
"requestTime": 1743669821003,
"data": [
[
1743669000000,
"83654.0",
"83778.0",
"83531.5",
"83688.7",
"248.17024800",
"20755885.859164900"
],
[
1743667200000,
"83457.9",
"83719.0",
"83457.9",
"83654.0",
"247.94000200",
"20730711.264144200"
]
]
}
取得深度數據
HTTP 請求 取得深度數據
- GET
/api/v2/market/depth
限速規則:20 次/ 1s
請求參數
參數名 | 參數類型 | 是否必須 | 描述 |
---|---|---|---|
symbol | String | 是 | 交易對 |
type | String | 否 | 默認:step0:不合併,取值:step0, step1, step2, step3, step4, step5 |
limit | String | 否 | 查詢條數,只有15和200 |
請求範例
curl "https://api-spot.weex.com/api/v2/market/depth?symbol=BTCUSDT_SPBL&type=step0&limit="
傳回參數
欄位名 | 類型 | 欄位說明 |
---|---|---|
asks | array | 賣盤 [價位, 掛單量] |
bids | array | 買盤 [價位, 掛單量] |
傳回參數
{
"code":"00000",
"msg":"success",
"requestTime":1622102974025,
"data":{
"asks":[
[
"38084.5",
"0.0039"
],
[
"38085.7",
"0.0018"
],
[
"38086.7",
"0.0310"
],
[
"38088.2",
"0.5303"
]
],
"bids":[
[
"38073.7",
"0.4993000000000000"
],
[
"38073.4",
"0.4500"
],
[
"38073.3",
"0.1179"
],
[
"38071.5",
"0.2162"
]
],
"timestamp":"1622102974025"
}
}
WEEX唯客官網:www.weex.com
你也可以在 CMC| Coingecko|非小號|X(Twitter)|Youtube|Facebook|Linkedin|微博 上關注我们,第一时间获取更多投資導航和福利活動!了解平台幣 WXT 最新資訊請訪問 WXT專區
在線諮詢:
WEEX唯客中文交流群:https://t.me/weex_group
WEEX唯客英文交流群:https://t.me/Weex_Global