查詢最新行情信息
可獲取到快照的最新市場價格,最佳買賣價格,以及過去時間內的交易量等.
覆蓋範圍: 現貨 / USDT永續 / USDC永續 / USDC交割 / 反向合約 / 期權
HTTP請求
GET /v5/market/tickers
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
category | true | string | 產品類型. spot ,linear ,inverse ,option |
symbol | false | string | 合約名稱 |
baseCoin | false | string | 交易幣種. 僅option 有效, baseCoin 和symbol 必傳其中一個 |
expDate | false | string | 到期日. 舉例, 25DEC22. 僅option 有效 |
響應參數
- Linear/Inverse
- Option
- Spot
參數 | 類型 | 說明 |
---|---|---|
category | string | 產品類型 |
list | array | Object |
> symbol | string | 合約名稱 |
> lastPrice | string | 最新市場成交價 |
> indexPrice | string | 指數價格 |
> markPrice | string | 標記價格 |
> prevPrice24h | string | 24小時前的整點市價 |
> price24hPcnt | string | 市場價格相對24h前變化的百分比 |
> highPrice24h | string | 最近24小時的最高價 |
> lowPrice24h | string | 最近24小時的最低價 |
> prevPrice1h | string | 1小時前的整點市價 |
> openInterest | string | 未平倉合約的數量 |
> openInterestValue | string | 未平倉合約的價值 |
> turnover24h | string | 最近24小時成交額 |
> volume24h | string | 最近24小時成交量 |
> fundingRate | string | 資金費率 |
> nextFundingTime | string | 下次結算資金費用的時間 (毫秒) |
> predictedDeliveryPrice | string | 預計交割價格. 交割前30分鐘有值 |
> basisRate | string | 交割合約基差率 |
> basis | string | 交割合約基差 |
> deliveryFeeRate | string | 交割費率 |
> deliveryTime | string | 交割時間戳 (毫秒) |
> ask1Size | string | 買1價的數量 |
> bid1Price | string | 買1價 |
> ask1Price | string | 賣1價 |
> bid1Size | string | 買1價的數量 |
> preOpenPrice | string | 盤前合約預估開盤價格 |
> preQty | string | 盤前合約預估開盤數量 |
> curPreListingPhase | string | 當前盤前交易階段 |
參數 | 類型 | 說明 |
---|---|---|
category | string | 產品類型 |
list | array | Object |
> symbol | string | 合約名稱 |
> bid1Price | string | 買1價 |
> bid1Size | string | 買1價的數量 |
> bid1Iv | string | 買1價對應的iv |
> ask1Price | string | 賣1價 |
> ask1Size | string | 賣1價的數量 |
> ask1Iv | string | 賣1價對應的iv |
> lastPrice | string | 最新市場成交價 |
> highPrice24h | string | 最近24小時的最高價 |
> lowPrice24h | string | 最近24小時的最低價 |
> markPrice | string | 標記價格 |
> indexPrice | string | 指數價格 |
> markIv | string | 標記價格對應的iv |
> underlyingPrice | string | 底層資產的價格 |
> openInterest | string | 未平倉合約的數量 |
> turnover24h | string | 最近24小時成交額 |
> volume24h | string | 最近24小時成交量 |
> totalVolume | string | 總成交量 |
> totalTurnover | string | 總成交額 |
> delta | string | Delta |
> gamma | string | Gamma |
> vega | string | Vega |
> theta | string | Theta |
> predictedDeliveryPrice | string | 預估交割價. 交割前30分鐘有值 |
> change24h | string | 過去24小時的變化 |
參數 | 類型 | 說明 |
---|---|---|
category | string | 產品類型 |
list | array | Object |
> symbol | string | 合約名稱 |
> bid1Price | string | 買1價 |
> bid1Size | string | 買1價的數量 |
> ask1Price | string | 賣1價 |
> ask1Size | string | 賣1價的數量 |
> lastPrice | string | 最新市場成交價 |
> prevPrice24h | string | 24小時前的整點市價 |
> price24hPcnt | string | 市場價格相對24h前變化的百分比 |
> highPrice24h | string | 最近24小時的最高價 |
> lowPrice24h | string | 最近24小時的最低價 |
> turnover24h | string | 最近24小時成交額 |
> volume24h | string | 最近24小時成交量 |
> usdIndexPrice | string | USD指數價格
|
請求示例
- Inverse
- Option
- Spot
- HTTP
- Python
- GO
- Java
- Node.js
GET /v5/market/tickers?category=inverse&symbol=BTCUSD HTTP/1.1
Host: api-testnet.bybit.com
from pybit.unified_trading import HTTP
session = HTTP(testnet=True)
print(session.get_tickers(
category="inverse",
symbol="BTCUSD",
))
import (
"context"
"fmt"
bybit "github.com/wuhewuhe/bybit.go.api"
)
client := bybit.NewBybitHttpClient("", "", bybit.WithBaseURL(bybit.TESTNET))
params := map[string]interface{}{"category": "inverse", "symbol": "BTCUSD"}
client.NewUtaBybitServiceWithParams(params).GetMarketTickers(context.Background())
import com.bybit.api.client.domain.CategoryType;
import com.bybit.api.client.domain.market.*;
import com.bybit.api.client.domain.market.request.MarketDataRequest;
import com.bybit.api.client.service.BybitApiClientFactory;
var client = BybitApiClientFactory.newInstance().newAsyncMarketDataRestClient();
var tickerReueqt = MarketDataRequest.builder().category(CategoryType.INVERSE).symbol("BTCUSD").build();
client.getMarketTickers(tickerReueqt, System.out::println);
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
});
client
.getTickers({
category: 'inverse',
symbol: 'BTCUSDT',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
- HTTP
- Python
- GO
- Java
- Node.js
GET /v5/market/tickers?category=option&symbol=BTC-30DEC22-18000-C HTTP/1.1
Host: api-testnet.bybit.com
from pybit.unified_trading import HTTP
session = HTTP(testnet=True)
print(session.get_tickers(
category="option",
symbol="BTC-30DEC22-18000-C",
))
import (
"context"
"fmt"
bybit "github.com/wuhewuhe/bybit.go.api"
)
client := bybit.NewBybitHttpClient("", "", bybit.WithBaseURL(bybit.TESTNET))
params := map[string]interface{}{"category": "option", "symbol": "BTC-30DEC22-18000-C"}
client.NewUtaBybitServiceWithParams(params).GetMarketTickers(context.Background())
import com.bybit.api.client.domain.CategoryType;
import com.bybit.api.client.domain.market.*;
import com.bybit.api.client.domain.market.request.MarketDataRequest;
import com.bybit.api.client.service.BybitApiClientFactory;
var client = BybitApiClientFactory.newInstance().newAsyncMarketDataRestClient();
var tickerReueqt = MarketDataRequest.builder().category(CategoryType.OPTION).symbol("BTC-30DEC22-18000-C").build();
client.getMarketTickers(tickerReueqt, System.out::println);
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
});
client
.getTickers({
category: 'option',
symbol: 'BTC-30DEC22-18000-C',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
- HTTP
- Python
- GO
- Java
- Node.js
GET /v5/market/tickers?category=spot&symbol=BTCUSDT HTTP/1.1
Host: api-testnet.bybit.com
from pybit.unified_trading import HTTP
session = HTTP(testnet=True)
print(session.get_tickers(
category="spot",
symbol="BTCUSDT",
))
import (
"context"
"fmt"
bybit "github.com/wuhewuhe/bybit.go.api"
)
client := bybit.NewBybitHttpClient("", "", bybit.WithBaseURL(bybit.TESTNET))
params := map[string]interface{}{"category": "spot", "symbol": "BTCUSDT"}
client.NewUtaBybitServiceWithParams(params).GetMarketTickers(context.Background())
import com.bybit.api.client.domain.*;
import com.bybit.api.client.domain.market.*;
import com.bybit.api.client.domain.market.request.*;
import com.bybit.api.client.service.BybitApiClientFactory;
var client = BybitApiClientFactory.newInstance().newAsyncMarketDataRestClient();
var tickerReueqt = MarketDataRequest.builder().category(CategoryType.SPOT).symbol("BTCUSDT").build();
client.getMarketTickers(tickerReueqt, System.out::println);
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
});
client
.getTickers({
category: 'spot',
symbol: 'BTCUSDT',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
- Inverse
- Option
- Spot
{
"retCode": 0,
"retMsg": "OK",
"result": {
"category": "inverse",
"list": [
{
"symbol": "BTCUSD",
"lastPrice": "16597.00",
"indexPrice": "16598.54",
"markPrice": "16596.00",
"prevPrice24h": "16464.50",
"price24hPcnt": "0.008047",
"highPrice24h": "30912.50",
"lowPrice24h": "15700.00",
"prevPrice1h": "16595.50",
"openInterest": "373504107",
"openInterestValue": "22505.67",
"turnover24h": "2352.94950046",
"volume24h": "49337318",
"fundingRate": "-0.001034",
"nextFundingTime": "1672387200000",
"predictedDeliveryPrice": "",
"basisRate": "",
"deliveryFeeRate": "",
"deliveryTime": "0",
"ask1Size": "1",
"bid1Price": "16596.00",
"ask1Price": "16597.50",
"bid1Size": "1",
"basis": ""
}
]
},
"retExtInfo": {},
"time": 1672376496682
}
{
"retCode": 0,
"retMsg": "OK",
"result": {
"category": "option",
"list": [
{
"symbol": "BTC-30DEC22-18000-C",
"bid1Price": "0",
"bid1Size": "0",
"bid1Iv": "0",
"ask1Price": "435",
"ask1Size": "0.66",
"ask1Iv": "5",
"lastPrice": "435",
"highPrice24h": "435",
"lowPrice24h": "165",
"markPrice": "0.00000009",
"indexPrice": "16600.55",
"markIv": "0.7567",
"underlyingPrice": "16590.42",
"openInterest": "6.3",
"turnover24h": "2482.73",
"volume24h": "0.15",
"totalVolume": "99",
"totalTurnover": "1967653",
"delta": "0.00000001",
"gamma": "0.00000001",
"vega": "0.00000004",
"theta": "-0.00000152",
"predictedDeliveryPrice": "0",
"change24h": "86"
}
]
},
"retExtInfo": {},
"time": 1672376592395
}
{
"retCode": 0,
"retMsg": "OK",
"result": {
"category": "spot",
"list": [
{
"symbol": "BTCUSDT",
"bid1Price": "20517.96",
"bid1Size": "2",
"ask1Price": "20527.77",
"ask1Size": "1.862172",
"lastPrice": "20533.13",
"prevPrice24h": "20393.48",
"price24hPcnt": "0.0068",
"highPrice24h": "21128.12",
"lowPrice24h": "20318.89",
"turnover24h": "243765620.65899866",
"volume24h": "11801.27771",
"usdIndexPrice": "20784.12009279"
}
]
},
"retExtInfo": {},
"time": 1673859087947
}