跳轉到內容

查詢標的訂單簿

接口信息

接口: GET /api/v1/tickers/{symbol}/orderbooks?exchange={exchange}

描述: 查詢平台訂單簿

鑑權: 匿名下可訪問

查詢參數

參數類型必填說明
symbolstring路由參數,股票代碼
exchangeintURL參數,交易所代碼。詳見Exchange枚舉類型說明

響應參數

字段類型說明
symbolstring股票代碼
marketstring市場代碼枚舉項。詳見Market枚舉類型說明
askobject array賣盤
ask[].pricedecimal對應市場的價格
ask[].volumedecimal數量
bidobject array買盤
bid[].pricedecimal對應市場的價格
bid[].volumedecimal數量
timestring時間

請求示例

bash
curl -X GET "/api/v1/tickers/AAPL/orderbooks?exchange=0" \
     -H "Content-Type: application/json"

響應示例

json
{
    "code": 0,
    "data": {
        "symbol": "AAPL",
        "market": "usex",
        "ask": [
            {"price": "150.25", "volume": "100"},
            {"price": "150.30", "volume": "200"}
        ],
        "bid": [
            {"price": "150.20", "volume": "150"},
            {"price": "150.15", "volume": "250"}
        ],
        "time": "2025-01-17T03:00:24Z"
    }
}