查詢Greeks信息
獲取當前賬戶Greeks信息
HTTP 請求
GET /v5/asset/coin-greeks
請求參數
參數 | 是否必需 | 類型 | 類型 |
---|---|---|---|
baseCoin | false | string | baseCoin- 不傳入, 默認返回全部baseCoin的greeks |
響應參數
參數 | 類型 | 類型 |
---|---|---|
list | array | Object |
> baseCoin | string | baseCoin 例如: BTC、ETH、SOL etc |
> totalDelta | string | Delta值 |
> totalGamma | string | Gamma值 |
> totalVega | string | Vega值 |
> totalTheta | string | Theta值 |
請求示例
- HTTP
- Python
- Node.js
GET /v5/asset/coin-greeks?baseCoin=BTC HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672287887610
X-BAPI-RECV-WINDOW: 5000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_coin_greeks(
baseCoin="BTC",
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getCoinGreeks('BTC')
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"baseCoin": "BTC",
"totalDelta": "0.00004001",
"totalGamma": "-0.00000009",
"totalVega": "-0.00039689",
"totalTheta": "0.01243824"
}
]
},
"retExtInfo": {},
"time": 1672287887942
}