期权
获取期权过期日
对应的请求类:OptionExpirationQueryRequest
说明
获取期权过期日,请求上限为30支股票
参数
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
symbols | array | Yes | 股票代码列表,上限为:30 |
market | string | Yes | US/HK港股 |
返回com.tigerbrokers.stock.openapi.client.https.response.option.OptionExpirationResponse
source
结构如下:
public class OptionExpirationResponse extends TigerResponse {
@JSONField(name = "data")
private List<OptionExpirationItem> optionExpirationItems;
}
返回数据可通过OptionExpirationResponse.getOptionExpirationItems()
方法访问,返回OptionExpirationItem
对象,其中com.tigerbrokers.stock.openapi.client.https.domain.option.item.OptionExpirationItem
属性如下:
名称 | 类型 | 说明 |
---|---|---|
symbol | string | 股票代码 |
count | int | 过期日期个数 |
dates | array | 过期时间,日期格式,如:2024-06-28 |
timestamps | array | 过期日期,时间戳格式,如:1544763600000(美国NewYork时间对应的时间戳) |
periodTags | array | 期权周期标签,m为月期权,w为周期权 |
具体字段可通过对象的get方法,如getSymbol()
进行访问,或通过对象的toString()
方法转换为字符串
示例
List<String> symbols = new ArrayList<>();
symbols.add("AAPL");
OptionExpirationResponse response = client.execute(
new OptionExpirationQueryRequest(symbols, Market.US));
// HK market opition. market parameter must be Market.HK
// symbols.add("PAI.HK");
// OptionExpirationResponse response = client.execute(
// new OptionExpirationQueryRequest(symbols, Market.HK));
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response));
} else {
System.out.println("response error:" + response.getMessage());
}
返回示例
{
"code": 0,
"data": [
{
"count": 19,
"dates": [
"2024-06-28",
"2024-07-05",
"2024-07-12",
"2024-07-19",
"2024-07-26",
"2024-08-02",
"2024-08-16",
"2024-09-20",
"2024-10-18",
"2024-11-15",
"2024-12-20",
"2025-01-17",
"2025-03-21",
"2025-06-20",
"2025-09-19",
"2025-12-19",
"2026-01-16",
"2026-06-18",
"2026-12-18"
],
"periodTags": [
"w",
"w",
"w",
"m",
"w",
"w",
"m",
"m",
"m",
"m",
"m",
"m",
"m",
"m",
"m",
"m",
"m",
"w",
"m"
],
"symbol": "AAPL",
"timestamps": [
1719547200000,
1720152000000,
1720756800000,
1721361600000,
1721966400000,
1722571200000,
1723780800000,
1726804800000,
1729224000000,
1731646800000,
1734670800000,
1737090000000,
1742529600000,
1750392000000,
1758254400000,
1766120400000,
1768539600000,
1781755200000,
1797570000000
]
}
],
"message": "success",
"sign": "gfb9aJczS42KWYQGV6H/6mrB2EIBI5B4QJ9Mf1bMqFKh29hKPwwnsBOJEssA4j6Vt3zToJi4bbbYr/d1OC3NMSoGy+vXxhVIFTkJ/jJfowTChtmobSVEL/8cibDp0+MjOBjpF58qNjbd678PKGTXLJFATdNj/0sCGh5hdFrOmiQ=",
"success": true,
"timestamp": 1719405255933
}
获取期权链
对应的请求类:OptionChainQueryV3Request
说明
获取期权链。返回的希腊字母不是最新数据,是上个交易日最后更新的数据,盘中可以用期权指标计算
参数
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
symbol | string | Yes | 股票代码,symbol和expiry组合上限为:30 |
expiry | String | Yes | 期权过期日,示例:'2022-01-01' |
market | string | Yes | US/HK港股 |
筛选参数:
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
implied_volatility | double | No | 隐含波动率 |
in_the_money | boolean | No | 是否价内 |
open_interest | int | No | 未平仓量 |
delta | double | No | delta |
gamma | double | No | gamma |
theta | double | No | theta |
vega | double | No | vega |
rho | double | No | rho |
返回com.tigerbrokers.stock.openapi.client.https.response.option.OptionChainResponse
source
结构如下:
public class OptionChainResponse extends TigerResponse {
@JSONField(name = "data")
private List<OptionChainItem> optionChainItems;
}
返回数据可通过OptionChainResponse.getOptionChainItems()
方法访问,返回OptionChainItem
对象,其中com.tigerbrokers.stock.openapi.client.https.domain.option.item.OptionChainItem
属性如下:
名称 | 类型 | 说明 |
---|---|---|
symbol | string | 标的股票代码 |
expiry | long | 期权过期日 |
items | List<OptionRealTimeQuoteGroup> | 列表,包含OptionRealTimeQuoteGroup对象,保存期权链数据,说明见下文 |
OptionRealTimeQuoteGroup
对象结构:
名称 | 类型 | 说明 |
---|---|---|
put | OptionRealTimeQuote | 看跌期权合约 |
call | OptionRealTimeQuote | 看涨期权合约 |
OptionRealTimeQuote
对象结构:
名称 | 类型 | 说明 |
---|---|---|
identifier | string | 期权标识,如:AAPL 210115C00095000 |
strike | double | 行权价 |
right | string | 期权方向 PUT/CALL |
askPrice | double | 卖盘价格 |
askSize | int | 卖盘数量 |
bidPrice | double | 买盘价格 |
bidSize | int | 买盘数量 |
lastTimestamp | long | 最新成交时间 如:1543343800698 |
latestPrice | double | 最新价 |
multiplier | double | 乘数,US期权默认100 |
openInterest | int | 未平仓量 |
preClose | double | 前一交易日的收盘价 |
volume | long | 成交量 |
impliedVol | double | 隐含波动率 |
delta | double | delta |
gamma | double | gamma |
theta | double | theta |
vega | double | vega |
rho | double | rho |
具体字段可通过对象的get方法,如getSymbol()
进行访问,或通过json方法转换为字符串
示例
OptionChainModel basicModel = new OptionChainModel("AAPL", "2024-07-26", TimeZoneId.NewYork);
OptionChainFilterModel filterModel = new OptionChainFilterModel()
.inTheMoney(true)
.impliedVolatility(0.1537, 0.8282)
.openInterest(10, 50000)
.greeks(new OptionChainFilterModel.Greeks()
.delta(-0.8, 0.6)
.gamma(0.024, 0.30)
.vega(0.019, 0.343)
.theta(-0.1, 0.1)
.rho(-0.096, 0.101)
);
OptionChainQueryV3Request request = OptionChainQueryV3Request.of(basicModel, filterModel, Market.US);
OptionChainResponse response = client.execute(request);
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response));
} else {
System.out.println("response error:" + response.getMessage());
}
返回示例
{
"code": 0,
"data": [
{
"expiry": 1721966400000,
"items": [
{
"put": {
"askPrice": 4.65,
"askSize": 2,
"bidPrice": 4.5,
"bidSize": 66,
"delta": -0.503388,
"gamma": 0.037062,
"identifier": "AAPL 240726P00210000",
"impliedVol": 0.183129,
"lastTimestamp": 1719345582586,
"latestPrice": 4.6,
"multiplier": 100,
"openInterest": 1858,
"preClose": 5.26,
"rho": -0.072819,
"right": "put",
"strike": "210.0",
"theta": -0.060326,
"vega": 0.24135,
"volume": 404
}
},
{
"put": {
"askPrice": 7.75,
"askSize": 59,
"bidPrice": 7.4,
"bidSize": 260,
"delta": -0.686314,
"gamma": 0.03523,
"identifier": "AAPL 240726P00215000",
"impliedVol": 0.18012,
"lastTimestamp": 1719345365800,
"latestPrice": 7.8,
"multiplier": 100,
"openInterest": 1222,
"preClose": 8.5,
"rho": -0.084955,
"right": "put",
"strike": "215.0",
"theta": -0.048649,
"vega": 0.21153,
"volume": 134
}
}
],
"symbol": "AAPL"
}
],
"message": "success",
"sign": "dA0ngWPHWC0GOme2h0/FPma5UAcLSKiR5vWw9ldZ1wz8sHiRG7QMroO78JXqK5A+J3m6XWT9esAXagwbs8D6mI/3vhFU5QCJQbDd58lQRJRWeAK/G+7eQOwAQIqvgLttBtMBbRKlHMchhHATgUi9U7v/eu4NG5tDHr04InQy0cc=",
"success": true,
"timestamp": 1719407360986
}
获取期权行情摘要
对应的请求类:OptionBriefQueryV2Request
说明
获取期权行情摘要。批量参数上限为30
参数
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
market | Market | yes | 市场,只支持US、HK |
option_basic | List<OptionCommonModel> | yes | 期权四要素列表,最大30 |
OptionCommonModel
参数结构如下
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
symbol | string | yes | 股票代码,港股请参考“获取港股期权名称”接口返回的symbol |
right | string | yes | 看多或看空(CALL/PUT) |
expiry | long | yes | 到期时间 |
strike | string | yes | 行权价 |
返回com.tigerbrokers.stock.openapi.client.https.request.option.OptionBriefResponse
source
结构如下:
public class OptionBriefResponse extends TigerResponse {
@JSONField(name = "data")
private List<OptionBriefItem> optionBriefItems;
}
返回数据可通过TigerResponse.getOptionBriefItems()
方法访问,返回OptionBriefItem
对象,其中com.tigerbrokers.stock.openapi.client.https.domain.option.item.OptionBriefItem
属性如下:
字段 | 类型 | 说明 |
---|---|---|
symbol | string | 股票代码 |
strike | string | 行权价 |
bidPrice | double | 买盘价格 |
bidSize | int | 买盘数量 |
askPrice | double | 卖盘价格 |
askSize | int | 卖盘数量 |
latestPrice | double | 最新价格 |
timestamp | long | 最新成交时间 |
volume | int | 成交量 |
high | double | 最高价 |
low | double | 最低价 |
open | double | 开盘价 |
preClose | double | 前一交易日收盘价 |
openInterest | int | 未平仓量 |
change | double | 涨跌额 |
multiplier | int | 乘数,us期权默认100 |
ratesBonds | double | 一年期美国国债利率,每天更新一次,如:0.0078 表示实际利率为:0.78% |
right | string | 方向 (PUT/CALL) |
volatility | string | 历史波动率 |
expiry | long | 到期时间(毫秒,当天0点) |
具体字段可通过对象的get方法,如getSymbol()
进行访问, 或通过对象的toString()
方法转换为字符串
示例
OptionCommonModel model = new OptionCommonModel();
model.setSymbol("BRK.B");
model.setRight("CALL");
model.setStrike("400.0");
model.setExpiry("2024-06-28", TimeZoneId.NewYork);
List<OptionCommonModel> models = new ArrayList<>();
models.add(model);
OptionBriefQueryV2Request request = new OptionBriefQueryV2Request(models, Market.US);
OptionBriefResponse response = client.execute(request);
if (response. isSuccess()) {
System.out.println(JSONObject.toJSONString(response));
} else {
System.out.println("response error:" + response.getMessage());
}
返回示例
{
"code": 0,
"data": [
{
"askPrice": 10.65,
"askSize": 29,
"bidPrice": 7.7,
"bidSize": 32,
"change": 0,
"expiry": 1719547200000,
"high": 14.1,
"identifier": "BRKB 240628C00400000",
"latestPrice": 14.1,
"low": 14.1,
"multiplier": 100,
"open": 14.1,
"openInterest": 28,
"preClose": 14.1,
"ratesBonds": 0.051339,
"right": "call",
"strike": "400.0",
"symbol": "BRK.B",
"volatility": "0.00%",
"volume": 0
}
],
"message": "success",
"sign": "QIP1Jd9BraCJLMhGxKn3mpefuMA6USHdb9K6iibwBZFBnBNSrsmuMnkpzdA0aF+yj7urKFXm/m2Uwvd8kVJLJVi/ExKlHJV6EojVPw8OaZgEwNh7pe+7/thRBorPRYNZgSA0mBTCi9Ud6aSIhYgeLcTWLMci4++T+D8rWtIApxU=",
"success": true,
"timestamp": 1719416337924
}
获取期权K线
对应的请求类:OptionKlineQueryV2Request
说明
获取期权K线。批量参数上限为30
参数
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
market | Market | yes | 市场,只支持US、HK |
option_query | List<OptionKlineModel> | yes | 期权K线查询条件列表,最大30 |
OptionKlineModel
参数结构如下
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
symbol | string | yes | 股票代码 |
right | string | yes | 看多或看空(CALL/PUT) |
expiry | long | yes | 到期时间 |
strike | string | yes | 行权价 |
begin_time | long | yes | 开始时间 |
end_time | long | yes | 结束时间 |
period | string | no | K线类型,取值范围(day:日K,1min:1分钟,5min:5分钟,30min:30分钟,60min:60分钟) |
limit | int | no | 分钟线返回最近记录数,默认300,最大1200。如果limit设置大于1200,只会返回1200条数据。日K线暂不支持 |
sort_dir | string | no | 排序方向,包括:升序,降序,排序方向枚举:排序方向 |
返回com.tigerbrokers.stock.openapi.client.https.domain.option.item.OptionKlineResponse
source
结构如下:
public class OptionKlineResponse extends TigerResponse {
@JSONField(name = "data")
private List<OptionKlineItem> klineItems;
}
返回数据可通过OptionKlineResponse.getKlineItems()
方法访问,返回OptionKlineItem
对象,其中com.tigerbrokers.stock.openapi.client.https.domain.option.item.OptionKlineItem
属性如下:
名称 | 类型 | 说明 |
---|---|---|
symbol | string | 股票代码 |
period | string | 周期类型 |
right | string | 看多或看空,取值CALL/PUT |
strike | string | 行权价 |
expiry | long | 到期时间,毫秒 |
items | List<OptionKlinePoint> | 包含OptionKlinePoint的List,OptionKlinePoint为k线数组,包含的具体数据见下文 |
OptionKlinePoint对象属性如下:
名称 | 类型 | 说明 |
---|---|---|
high | double | 最高价 |
low | double | 最低价 |
open | double | 开盘价 |
close | double | 收盘价 |
time | long | k线时间 |
volume | int | 成交量 |
openInterest | int | 未平仓量(只有日K线有值) |
具体字段可通过对象的get方法,如getSymbol()
进行访问, 或通过对象的toString()
方法转换为字符串
示例
OptionKlineModel model = new OptionKlineModel();
model.setSymbol("AAPL");
model.setRight("CALL");
model.setStrike("170.0");
model.setExpiry("2024-06-28", TimeZoneId.NewYork);
model.setBeginTime("2024-06-26", TimeZoneId.NewYork);
model.setEndTime("2024-06-26 12:59:59", TimeZoneId.NewYork);
model.setPeriod(OptionKType.min1.getValue());
model.setLimit(10);
model.setSortDir(SortDir.SortDir_Descend);
OptionKlineQueryV2Request request = OptionKlineQueryV2Request.of(model).market(Market.US);
OptionKlineResponse response = client.execute(request);
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response));
} else {
System.out.println("response error:" + response.getMessage());
}
返回示例
{
"code": 0,
"data": [
{
"expiry": 1719547200000,
"items": [
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719419340000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719419280000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719419220000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719419160000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719419100000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719419040000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719418980000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719418920000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719418860000,
"volume": 0
},
{
"close": 43.13,
"high": 43.13,
"low": 43.13,
"open": 43.13,
"time": 1719418800000,
"volume": 0
}
],
"period": "1min",
"right": "CALL",
"strike": "170.0",
"symbol": "AAPL"
}
],
"message": "success",
"sign": "Hpb51+k2OzC8HmcstBV+bCLTbpflPKpR/AxXwCLd9nhhzuiZquPNGbNOhLYzzihJzRrmfCPWQeXM4ldMGLtbXUluLW79vcKBHdoPghENu+68Zod9dqzsH/InAXt444HOSsRXiubITZ+d9OWil+gvitjn9w7x4kn916KlT6R7hYg=",
"success": true,
"timestamp": 1719419362447
}
获取期权逐笔成交
对应的请求类:OptionTradeTickQueryRequest
说明
获取期权逐笔成交数据。只支持美国市场期权,批量参数上限为30
参数
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
symbol | string | yes | 股票代码 |
right | string | yes | 看多或看空(call/put) |
expiry | long | yes | 到期时间(美国NewYork时间当天0点所对应的毫秒值) |
strike | string | yes | 行权价 |
返回com.tigerbrokers.stock.openapi.client.https.response.option.OptionTradeTickResponse
source
结构如下:
public class OptionTradeTickResponse extends TigerResponse {
@JSONField(name = "data")
private List<OptionTradeTickItem> optionTradeTickItems;
}
开盘前半小时可以取到前一个交易日的全部,开盘后是新一天的数据。
返回数据可通过OptionTradeTickResponse.getOptionTradeTickItems()
方法访问,返回OptionTradeTickItem
对象列表,其中com.tigerbrokers.stock.openapi.client.https.domain.option.item.OptionTradeTickItem
属性如下:
名称 | 类型 | 说明 |
---|---|---|
symbol | string | 标的股票代码 |
expiry | long | 到期时间 |
strike | string | strike price |
right | string | PUT或CALL |
items | List<TradeTickPoint> | TradeTickPoint对象列表,每个TradeTickPoint对象对应单条逐笔成交数据 |
TradeTickPoint对象结构如下:
名称 | 类型 | 说明 |
---|---|---|
price | double | 成交价格 |
time | long | 成交时间 |
volume | long | 成交量 |
具体字段可通过对象的get方法,如getSymbol()
进行访问, 或通过对象的toString()
方法转换为字符串
示例
List<OptionCommonModel> modelList = new ArrayList<>();
OptionCommonModel model1 = new OptionCommonModel();
model1.setSymbol("AAPL");
model1.setRight("PUT");
model1.setStrike("185.0");
model1.setExpiry("2024-03-08", TimeZoneId.NewYork);
modelList.add(model1);
OptionCommonModel model2 = new OptionCommonModel();
model2.setSymbol("AAPL");
model2.setRight("CALL");
model2.setStrike("185.0");
model2.setExpiry("2024-03-08", TimeZoneId.NewYork);
modelList.add(model2);
OptionTradeTickResponse response = client.execute(OptionTradeTickQueryRequest.of(modelList));
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response);
} else {
System.out.println("response error:" + response.getMessage());
}
返回示例
{
"code": 0,
"data": [{
"expiry": 1709874000000,
"items": [{
"price": 2.63,
"time": 1708698601086,
"volume": 4
}, {
"price": 2.62,
"time": 1708698602594,
"volume": 6
}, {
"price": 2.73,
"time": 1708698606317,
"volume": 4
}, {
"price": 2.72,
"time": 1708698607576,
"volume": 38
}, {
"price": 2.72,
"time": 1708698610488,
"volume": 7
}],
"right": "put",
"strike": "185.0",
"symbol": "AAPL"
}, {
"expiry": 1709874000000,
"items": [{
"price": 2.98,
"time": 1708698600473,
"volume": 1
}, {
"price": 2.98,
"time": 1708698601051,
"volume": 5
}, {
"price": 2.98,
"time": 1708698601051,
"volume": 23
}, {
"price": 2.98,
"time": 1708698601051,
"volume": 5
}, {
"price": 2.99,
"time": 1708698601051,
"volume": 11
}],
"right": "call",
"strike": "185.0",
"symbol": "AAPL"
}],
"message": "success",
"success": true,
"timestamp": 1708918385248
}
获取期权深度行情
对应的请求类:OptionDepthQueryRequest
说明
获取期权深度行情数据。只支持美国市场期权,批量参数上限为30
参数
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
market | Market | yes | 市场,只支持US |
option_basic | List<OptionCommonModel> | yes | 期权四要素列表,最大30 |
OptionCommonModel
参数结构如下
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
symbol | string | yes | 股票代码 |
right | string | yes | 看多或看空(CALL/PUT) |
expiry | long | yes | 到期时间(美国NewYork时间当天0点所对应的毫秒值) |
strike | string | yes | 行权价 |
返回com.tigerbrokers.stock.openapi.client.https.response.option.OptionDepthResponse
source
结构如下:
public class OptionDepthResponse extends TigerResponse {
@JSONField(name = "data")
private List<OptionDepthItem> optionDepthItems;
}
返回数据为盘中17个交易所的实时报价。 如果报价为0表示该交易所没有报价
返回数据可通过OptionDepthResponse.getOptionDepthItems()
方法访问,返回OptionDepthItem
对象列表,其中com.tigerbrokers.stock.openapi.client.https.domain.option.item.OptionDepthItem
属性如下:
名称 | 类型 | 说明 |
---|---|---|
symbol | string | 标的股票代码 |
expiry | long | 到期时间 |
strike | string | strike price |
right | string | PUT或CALL |
timestamp | long | 数据时间戳 |
ask | List<OptionDepthOrderBook> | OptionDepthOrderBook对象列表,每个OptionDepthOrderBook对象对应期权交易所的卖盘挂单数据 |
bid | List<OptionDepthOrderBook> | OptionDepthOrderBook对象列表,每个OptionDepthOrderBook对象对应期权交易所的买盘挂单数据 |
OptionDepthOrderBook对象结构如下:
名称 | 类型 | 说明 |
---|---|---|
price | double | 委托价 |
code | string | 期权交易所Code |
timestamp | long | 交易所时间 |
volume | int | 委托量 |
具体字段可通过对象的get方法,如getSymbol()
进行访问, 或通过对象的toString()
方法转换为字符串
示例
OptionCommonModel model = new OptionCommonModel();
model.setSymbol("AAPL");
model.setRight("PUT");
model.setStrike("210.0");
model.setExpiry("2024-06-28", TimeZoneId.NewYork);
OptionDepthQueryRequest request = OptionDepthQueryRequest.of(model).market(Market.US);
OptionDepthResponse response = client.execute(request);
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response);
} else {
System.out.println("response error:" + response.getMessage());
}
返回示例
{
"code": 0,
"data": [{
"ask": [{
"code": "CBOE",
"price": 1.19,
"volume": 10,
"timestamp": 1718654399000
},
{
"code": "BZX",
"price": 1.19,
"volume": 10,
"timestamp": 1718654399000
},
{
"code": "AMEX",
"price": 1.19,
"volume": 2,
"timestamp": 1718654400000
},
{
"code": "NSDQ",
"price": 1.19,
"volume": 2,
"timestamp": 1718654399000
},
{
"code": "BX",
"price": 1.19,
"volume": 2,
"timestamp": 1718654399000
},
{
"code": "PHLX",
"price": 1.2,
"volume": 54,
"timestamp": 1718654399000
},
{
"code": "BOX",
"price": 1.2,
"volume": 31,
"timestamp": 1718654399000
},
{
"code": "GEM",
"price": 1.2,
"volume": 24,
"timestamp": 1718654399000
},
{
"code": "MCRY",
"price": 1.2,
"volume": 24,
"timestamp": 1718654399000
},
{
"code": "MIAX",
"price": 1.2,
"volume": 24,
"timestamp": 1718654399000
},
{
"code": "EDGX",
"price": 1.2,
"volume": 23,
"timestamp": 1718654399000
},
{
"code": "EMLD",
"price": 1.2,
"volume": 18,
"timestamp": 1718654399000
},
{
"code": "ISE",
"price": 1.2,
"volume": 18,
"timestamp": 1718654399000
},
{
"code": "MPRL",
"price": 1.2,
"volume": 8,
"timestamp": 1718654399000
},
{
"code": "C2",
"price": 1.2,
"volume": 6,
"timestamp": 1718654399000
},
{
"code": "ARCA",
"price": 1.2,
"volume": 1,
"timestamp": 1718654399000
},
{
"code": "MEMX",
"price": 0.0,
"volume": 0,
"timestamp": 1718654402000
}],
"bid": [{
"code": "PHLX",
"price": 1.12,
"volume": 48,
"timestamp": 1718654399000
},
{
"code": "MIAX",
"price": 1.12,
"volume": 37,
"timestamp": 1718654399000
},
{
"code": "BX",
"price": 1.12,
"volume": 34,
"timestamp": 1718654399000
},
{
"code": "BOX",
"price": 1.12,
"volume": 32,
"timestamp": 1718654399000
},
{
"code": "CBOE",
"price": 1.12,
"volume": 29,
"timestamp": 1718654399000
},
{
"code": "MPRL",
"price": 1.12,
"volume": 22,
"timestamp": 1718654399000
},
{
"code": "GEM",
"price": 1.12,
"volume": 21,
"timestamp": 1718654399000
},
{
"code": "EDGX",
"price": 1.12,
"volume": 18,
"timestamp": 1718654399000
},
{
"code": "EMLD",
"price": 1.12,
"volume": 16,
"timestamp": 1718654399000
},
{
"code": "ISE",
"price": 1.12,
"volume": 15,
"timestamp": 1718654399000
},
{
"code": "C2",
"price": 1.12,
"volume": 10,
"timestamp": 1718654399000
},
{
"code": "BZX",
"price": 1.12,
"volume": 10,
"timestamp": 1718654399000
},
{
"code": "MCRY",
"price": 1.12,
"volume": 8,
"timestamp": 1718654399000
},
{
"code": "AMEX",
"price": 1.12,
"volume": 4,
"timestamp": 1718654400000
},
{
"code": "ARCA",
"price": 1.12,
"volume": 4,
"timestamp": 1718654399000
},
{
"code": "NSDQ",
"price": 1.12,
"volume": 4,
"timestamp": 1718654399000
},
{
"code": "MEMX",
"price": 0.0,
"volume": 0,
"timestamp": 1718654402000
}],
"expiry": 1719547200000,
"right": "PUT",
"strike": "210.0",
"timestamp": 1718654402000
}],
"message": "success",
"sign": "tlxKbPzgJBN2Q2oUz8GBwpAJ/aUFlNrM3V/uh1fTWd2r3lHfD2TvTul/i6yBtvxR+G7gwfkpE7yoVVo74JacJPOA724zLdSkkHDuC5K2Q9WzIi/C1z0vdRZYtQSPpKsIrDSGc5g9D6m1IYz7HJNSeDa4a5WwyggDetNO86M1PeE=",
"success": true,
"timestamp": 1718712279180
}
获取港股期权名称
对应的请求类:OptionSymbolRequest
说明
获取港股期权标的名称列表。只支持香港市场
参数
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
market | Market | yes | 市场,只支持HK |
lang | string | No | 语言支持: zh_CN,zh_TW,en_US, 默认: en_US |
返回com.tigerbrokers.stock.openapi.client.https.response.option.OptionSymbolResponse
source
结构如下:
public class OptionSymbolResponse extends TigerResponse {
@JSONField(name = "data")
private List<OptionSymbolItem> symbolItems;
}
返回香港市场所有期权的symbol代码及底层资产标的集合
返回数据可通过OptionSymbolResponse.getSymbolItems()
方法访问,返回OptionSymbolItem
对象列表,其中com.tigerbrokers.stock.openapi.client.https.domain.option.item.OptionSymbolItem
属性如下:
名称 | 类型 | 说明 |
---|---|---|
symbol | string | 期权四要素的symbol |
name | string | 标的名称 |
underlyingSymbol | string | 底层资产标的代码 |
具体字段可通过对象的get方法,如getSymbol()
进行访问, 或通过对象的toString()
方法转换为字符串
示例
OptionSymbolRequest request = OptionSymbolRequest.newRequest(Market.HK, Language.en_US);
OptionSymbolResponse response = client.execute(request);
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response);
} else {
System.out.println("response error:" + response.getMessage());
}
返回示例
{"code":0,"data":[{"name":"ALC","symbol":"ALC.HK","underlyingSymbol":"02600"},{"name":"CRG","symbol":"CRG.HK","underlyingSymbol":"00390"},{"name":"PAI","symbol":"PAI.HK","underlyingSymbol":"02318"},{"name":"XCC","symbol":"XCC.HK","underlyingSymbol":"00939"},{"name":"XTW","symbol":"XTW.HK","underlyingSymbol":"00788"},{"name":"SHL","symbol":"SHL.HK","underlyingSymbol":"00968"},{"name":"GHL","symbol":"GHL.HK","underlyingSymbol":"00868"},{"name":"HEX","symbol":"HEX.HK","underlyingSymbol":"00388"},{"name":"ACC","symbol":"ACC.HK","underlyingSymbol":"00914"},{"name":"STC","symbol":"STC.HK","underlyingSymbol":"02888"},{"name":"VNK","symbol":"VNK.HK","underlyingSymbol":"02202"},{"name":"CLI","symbol":"CLI.HK","underlyingSymbol":"02628"},{"name":"LNK","symbol":"LNK.HK","underlyingSymbol":"00823"},{"name":"SMC","symbol":"SMC.HK","underlyingSymbol":"00981"},{"name":"BEA","symbol":"BEA.HK","underlyingSymbol":"00023"},{"name":"TRP","symbol":"TRP.HK","underlyingSymbol":"09961"},{"name":"GWM","symbol":"GWM.HK","underlyingSymbol":"02333"},{"name":"NBM","symbol":"NBM.HK","underlyingSymbol":"03323"},{"name":"ANA","symbol":"ANA.HK","underlyingSymbol":"02020"},{"name":"CMB","symbol":"CMB.HK","underlyingSymbol":"03968"},{"name":"HNP","symbol":"HNP.HK","underlyingSymbol":"00902"},{"name":"HEH","symbol":"HEH.HK","underlyingSymbol":"00006"},{"name":"MET","symbol":"MET.HK","underlyingSymbol":"03690"},{"name":"SHZ","symbol":"SHZ.HK","underlyingSymbol":"02313"},{"name":"SNP","symbol":"SNP.HK","underlyingSymbol":"01099"},{"name":"INB","symbol":"INB.HK","underlyingSymbol":"01801"},{"name":"CRL","symbol":"CRL.HK","underlyingSymbol":"01109"},{"name":"ALH","symbol":"ALH.HK","underlyingSymbol":"00241"},{"name":"AAC","symbol":"AAC.HK","underlyingSymbol":"02018"},{"name":"WWC","symbol":"WWC.HK","underlyingSymbol":"00151"},{"name":"CTB","symbol":"CTB.HK","underlyingSymbol":"00998"},{"name":"NWD","symbol":"NWD.HK","underlyingSymbol":"00017"},{"name":"HSB","symbol":"HSB.HK","underlyingSymbol":"00011"},{"name":"LEN","symbol":"LEN.HK","underlyingSymbol":"00992"},{"name":"COS","symbol":"COS.HK","underlyingSymbol":"01919"},{"name":"HDO","symbol":"HDO.HK","underlyingSymbol":"06862"},{"name":"BOC","symbol":"BOC.HK","underlyingSymbol":"02388"},{"name":"CSA","symbol":"CSA.HK","underlyingSymbol":"02822"},{"name":"XAB","symbol":"XAB.HK","underlyingSymbol":"01288"},{"name":"CKH","symbol":"CKH.HK","underlyingSymbol":"00001"},{"name":"MIU","symbol":"MIU.HK","underlyingSymbol":"01810"},{"name":"AIR","symbol":"AIR.HK","underlyingSymbol":"00753"},{"name":"CKP","symbol":"CKP.HK","underlyingSymbol":"01113"},{"name":"CHU","symbol":"CHU.HK","underlyingSymbol":"00762"},{"name":"GLI","symbol":"GLI.HK","underlyingSymbol":"01772"},{"name":"LNI","symbol":"LNI.HK","underlyingSymbol":"02331"},{"name":"LAU","symbol":"LAU.HK","underlyingSymbol":"02015"},{"name":"BYD","symbol":"BYD.HK","underlyingSymbol":"01211"},{"name":"ZSH","symbol":"ZSH.HK","underlyingSymbol":"00881"},{"name":"CGN","symbol":"CGN.HK","underlyingSymbol":"01816"},{"name":"MOL","symbol":"MOL.HK","underlyingSymbol":"03993"},{"name":"CPA","symbol":"CPA.HK","underlyingSymbol":"00293"},{"name":"KLE","symbol":"KLE.HK","underlyingSymbol":"00135"},{"name":"CPI","symbol":"CPI.HK","underlyingSymbol":"02601"},{"name":"CTC","symbol":"CTC.HK","underlyingSymbol":"00728"},{"name":"MTR","symbol":"MTR.HK","underlyingSymbol":"00066"},{"name":"PEC","symbol":"PEC.HK","underlyingSymbol":"00857"},{"name":"PEN","symbol":"PEN.HK","underlyingSymbol":"09868"},{"name":"MEN","symbol":"MEN.HK","underlyingSymbol":"02319"},{"name":"TCH","symbol":"TCH.HK","underlyingSymbol":"00700"},{"name":"SUN","symbol":"SUN.HK","underlyingSymbol":"01918"},{"name":"PHT","symbol":"PHT.HK","underlyingSymbol":"01833"},{"name":"CTS","symbol":"CTS.HK","underlyingSymbol":"06030"},{"name":"BCM","symbol":"BCM.HK","underlyingSymbol":"03328"},{"name":"A50","symbol":"A50.HK","underlyingSymbol":"02823"},{"name":"RFP","symbol":"RFP.HK","underlyingSymbol":"02777"},{"name":"COL","symbol":"COL.HK","underlyingSymbol":"00688"},{"name":"CDA","symbol":"CDA.HK","underlyingSymbol":"01359"},{"name":"BYE","symbol":"BYE.HK","underlyingSymbol":"00285"},{"name":"JDH","symbol":"JDH.HK","underlyingSymbol":"06618"},{"name":"CCE","symbol":"CCE.HK","underlyingSymbol":"01898"},{"name":"CRC","symbol":"CRC.HK","underlyingSymbol":"01186"},{"name":"HCF","symbol":"HCF.HK","underlyingSymbol":"02828"},{"name":"HKG","symbol":"HKG.HK","underlyingSymbol":"00003"},{"name":"XBC","symbol":"XBC.HK","underlyingSymbol":"03988"},{"name":"XPB","symbol":"XPB.HK","underlyingSymbol":"01658"},{"name":"WEB","symbol":"WEB.HK","underlyingSymbol":"09898"},{"name":"GAH","symbol":"GAH.HK","underlyingSymbol":"00175"},{"name":"CPC","symbol":"CPC.HK","underlyingSymbol":"00386"},{"name":"EVG","symbol":"EVG.HK","underlyingSymbol":"03333"},{"name":"PIC","symbol":"PIC.HK","underlyingSymbol":"02328"},{"name":"SAN","symbol":"SAN.HK","underlyingSymbol":"01928"},{"name":"BUD","symbol":"BUD.HK","underlyingSymbol":"01876"},{"name":"HKB","symbol":"HKB.HK","underlyingSymbol":"00005"},{"name":"MGM","symbol":"MGM.HK","underlyingSymbol":"02282"},{"name":"CHT","symbol":"CHT.HK","underlyingSymbol":"00941"},{"name":"PIN","symbol":"PIN.HK","underlyingSymbol":"01339"},{"name":"XIC","symbol":"XIC.HK","underlyingSymbol":"01398"},{"name":"GAC","symbol":"GAC.HK","underlyingSymbol":"02238"},{"name":"KDS","symbol":"KDS.HK","underlyingSymbol":"00268"},{"name":"COG","symbol":"COG.HK","underlyingSymbol":"02007"},{"name":"SBO","symbol":"SBO.HK","underlyingSymbol":"01177"},{"name":"WHL","symbol":"WHL.HK","underlyingSymbol":"00004"},{"name":"CSE","symbol":"CSE.HK","underlyingSymbol":"01088"},{"name":"SET","symbol":"SET.HK","underlyingSymbol":"00020"},{"name":"SWA","symbol":"SWA.HK","underlyingSymbol":"00019"},{"name":"ZJM","symbol":"ZJM.HK","underlyingSymbol":"02899"},{"name":"MSB","symbol":"MSB.HK","underlyingSymbol":"01988"},{"name":"GLX","symbol":"GLX.HK","underlyingSymbol":"00027"},{"name":"DFM","symbol":"DFM.HK","underlyingSymbol":"00489"},{"name":"CIT","symbol":"CIT.HK","underlyingSymbol":"00267"},{"name":"CNC","symbol":"CNC.HK","underlyingSymbol":"00883"},{"name":"BIU","symbol":"BIU.HK","underlyingSymbol":"09888"},{"name":"CCC","symbol":"CCC.HK","underlyingSymbol":"01800"},{"name":"HGN","symbol":"HGN.HK","underlyingSymbol":"01044"},{"name":"NTE","symbol":"NTE.HK","underlyingSymbol":"09999"},{"name":"SNO","symbol":"SNO.HK","underlyingSymbol":"02382"},{"name":"TRF","symbol":"TRF.HK","underlyingSymbol":"02800"},{"name":"HAI","symbol":"HAI.HK","underlyingSymbol":"06837"},{"name":"WHG","symbol":"WHG.HK","underlyingSymbol":"00288"},{"name":"HLD","symbol":"HLD.HK","underlyingSymbol":"00012"},{"name":"CSP","symbol":"CSP.HK","underlyingSymbol":"01093"},{"name":"KSO","symbol":"KSO.HK","underlyingSymbol":"03888"},{"name":"YZC","symbol":"YZC.HK","underlyingSymbol":"01171"},{"name":"SHK","symbol":"SHK.HK","underlyingSymbol":"00016"},{"name":"JXC","symbol":"JXC.HK","underlyingSymbol":"00358"},{"name":"ALB","symbol":"ALB.HK","underlyingSymbol":"09988"},{"name":"BLI","symbol":"BLI.HK","underlyingSymbol":"09626"},{"name":"CLP","symbol":"CLP.HK","underlyingSymbol":"00002"},{"name":"ZAO","symbol":"ZAO.HK","underlyingSymbol":"06060"},{"name":"JDC","symbol":"JDC.HK","underlyingSymbol":"09618"},{"name":"NFU","symbol":"NFU.HK","underlyingSymbol":"09633"},{"name":"AIA","symbol":"AIA.HK","underlyingSymbol":"01299"},{"name":"KST","symbol":"KST.HK","underlyingSymbol":"01024"},{"name":"NCL","symbol":"NCL.HK","underlyingSymbol":"01336"},{"name":"TIC","symbol":"TIC.HK","underlyingSymbol":"00669"},{"name":"WXB","symbol":"WXB.HK","underlyingSymbol":"02269"},{"name":"AMC","symbol":"AMC.HK","underlyingSymbol":"03188"}],"message":"success","sign":"NRvOxhF7cpEM9PS+Hofd6/BduEddep0sUlnYq9o9fPUwcZmAj3spI/D2wXu8L/eZSxvWhSfjnB3BL8y7mrpvqY3m9BGeZhf24ZoA0lbY8YXyQ5JjXa0VHWieUmCItoR9E195Nsr2sWCoawJhz7+yaMFioWEe8VThtGrYMiTYnUE=","success":true,"timestamp":1719401951582}
期权指标计算
说明
计算所选期权的各类指标
参数
参数 | 类型 | 是否必填 | 描述 |
---|---|---|---|
client | object | yes | SDK Htttp client |
symbol | string | yes | 股票代码 |
right | string | yes | 看多或看空(CALL/PUT) |
strike | string | yes | 行权价 |
expiry | long | yes | 到期时间(美国NewYork时间当天0点所对应的毫秒值) |
underlyingSymbol | string | no | 底层资产标的,默认为symbol的值 |
返回
名称 | 类型 | 说明 |
---|---|---|
delta | double | 希腊字母delta |
gamma | double | 希腊字母gamma |
theta | double | 希腊字母theta |
vega | double | 希腊字母vega |
insideValue | double | 内在价值 |
timeValue | double | 时间价值 |
leverage | double | 杠杆率 |
openInterest | int | 未平仓量 |
historyVolatility | double | 历史波动率,百分比数值 |
premiumRate | double | 溢价率,百分比数值 |
profitRate | double | 买入盈利率,百分比数值 |
volatility | double | 隐含波动率,百分比数值 |
示例
OptionFundamentals optionFundamentals = OptionCalcUtils.getOptionFundamentals(client,"BABA", "CALL", "205.0", "2019-11-01");
System.out.println(JSONObject.toJSONString(optionFundamentals));
返回示例
{
"delta": 0.8573062699731591,
"gamma": 0.05151538284065261,
"historyVolatility": 24.38, //百分比形式,表示为 24.38%
"insideValue": 4.550000000000011,
"leverage": 30.695960907449216,
"openInterest": 35417.0,
"premiumRate": 0.18619306788885054, //百分比形式,表示为 0.186%
"profitRate": 47.138051059662665, //百分比形式,表示为 47.138%
"rho": 1.1107261502375654,
"theta": -0.17927469728943862,
"timeValue": 0.32499999999998863,
"vega": 0.034473845504081974,
"volatility": 28.62548828125 //百分比形式,表示为 28.62%
}