Serialized Form
-
Package xyz.felh.okx.v5.entity
-
Package xyz.felh.okx.v5.entity.ws
-
Package xyz.felh.okx.v5.entity.ws.pri
-
Class xyz.felh.okx.v5.entity.ws.pri.Account
class Account extends Object implements Serializable-
Serialized Fields
-
adjEq
BigDecimal adjEq
美金层面有效保证金 适用于跨币种保证金模式/组合保证金模式 -
borrowFroz
BigDecimal borrowFroz
账户美金层面潜在借币占用保证金 仅适用于跨币种保证金模式/组合保证金模式。在其他账户模式下为""。 -
details
List<Account.Detail> details
各币种资产详细信息 -
imr
BigDecimal imr
美金层面占用保证金 适用于跨币种保证金模式/组合保证金模式 -
isoEq
BigDecimal isoEq
美金层面逐仓仓位权益 适用于单币种保证金模式/跨币种保证金模式/组合保证金模式 -
mgnRatio
BigDecimal mgnRatio
美金层面保证金率 适用于跨币种保证金模式/组合保证金模式 -
mmr
BigDecimal mmr
美金层面维持保证金 适用于跨币种保证金模式/组合保证金模式 -
notionalUsd
BigDecimal notionalUsd
以美金价值为单位的持仓数量,即仓位美金价值 适用于跨币种保证金模式/组合保证金模式 -
ordFroz
BigDecimal ordFroz
美金层面全仓挂单占用保证金 仅适用于跨币种保证金模式 -
totalEq
BigDecimal totalEq
美金层面权益 -
upl
BigDecimal upl
账户层面全仓未实现盈亏(美元单位) 适用于跨币种保证金模式/组合保证金模式 -
uTime
Long uTime
获取账户信息的最新时间,Unix时间戳的毫秒数格式,如 1597026383085
-
-
-
Class xyz.felh.okx.v5.entity.ws.pri.AccountGreeks
class AccountGreeks extends Object implements Serializable-
Serialized Fields
-
ccy
String ccy
币种 -
deltaBS
BigDecimal deltaBS
美金本位账户资产delta -
deltaPA
BigDecimal deltaPA
币本位账户资产delta -
gammaBS
BigDecimal gammaBS
美金本位账户资产gamma,仅适用于期权 -
gammaPA
BigDecimal gammaPA
币本位账户资产gamma,仅适用于期权 -
thetaBS
BigDecimal thetaBS
美金本位账户资产theta,仅适用于期权 -
thetaPA
BigDecimal thetaPA
币本位账户资产theta,仅适用于期权 -
ts
Long ts
获取greeks的时间,Unix时间戳的毫秒数格式,如 1597026383085 -
vegaBS
BigDecimal vegaBS
美金本位账户资产vega,仅适用于期权 -
vegaPA
BigDecimal vegaPA
币本位账户资产vega,仅适用于期权
-
-
-
Class xyz.felh.okx.v5.entity.ws.pri.BalanceAndPosition
class BalanceAndPosition extends Object implements Serializable-
Serialized Fields
-
balData
List<BalanceAndPosition.BalanceData> balData
余额数据 -
eventType
EventType eventType
事件类型 -
posData
List<BalanceAndPosition.PositionData> posData
持仓数据 -
pTime
Long pTime
推送时间,Unix时间戳的毫秒数格式,如 1597026383085 -
trades
List<BalanceAndPosition.Trade> trades
成交数据
-
-
-
Class xyz.felh.okx.v5.entity.ws.pri.BalanceAndPosition.BalanceData
class BalanceData extends Object implements Serializable-
Serialized Fields
-
cashBal
BigDecimal cashBal
币种余额 -
ccy
String ccy
币种 -
uTime
Long uTime
币种余额信息的更新时间,Unix时间戳的毫秒数格式,如 1597026383085
-
-
-
Class xyz.felh.okx.v5.entity.ws.pri.BalanceAndPosition.PositionData
class PositionData extends Object implements Serializable-
Serialized Fields
-
avgPx
BigDecimal avgPx
开仓平均价 -
ccy
String ccy
占用保证金的币种 -
instId
String instId
交易产品ID,如 BTC-USD-180213 -
instType
InstrumentType instType
交易产品类型 -
mgnMode
MgnMode mgnMode
保证金模式 -
pos
BigDecimal pos
持仓数量,逐仓自主划转模式下,转入保证金后会产生pos为0的仓位 -
posCcy
String posCcy
持仓数量币种 只适用于币币杠杆仓位。当是交割、永续、期权持仓时,该字段返回“” -
posId
String posId
持仓ID -
posSide
PositionsSide posSide
持仓方向 -
tradeId
String tradeId
最新成交ID -
uTime
Long uTime
仓位信息的更新时间,Unix时间戳的毫秒数格式,如 1597026383085
-
-
-
Class xyz.felh.okx.v5.entity.ws.pri.BalanceAndPosition.Trade
class Trade extends Object implements Serializable -
Class xyz.felh.okx.v5.entity.ws.pri.LiquidationWarning
class LiquidationWarning extends Object implements Serializable-
Serialized Fields
-
ccy
String ccy
占用保证金的币种 -
cTime
Long cTime
持仓创建时间,Unix时间戳的毫秒数格式,如 1597026383085 -
instId
String instId
产品ID,如 BTC-USD-180216 -
instType
InstrumentType instType
产品类型 -
lever
BigDecimal lever
杠杆倍数,不适用于期权卖方 -
markPx
BigDecimal markPx
标记价格 -
mgnMode
MgnMode mgnMode
保证金模式 -
mgnRatio
BigDecimal mgnRatio
保证金率 -
pos
BigDecimal pos
持仓数量 -
posCcy
String posCcy
持仓数量币种,仅适用于币币杠杆 -
posId
String posId
持仓ID -
posSide
PositionsSide posSide
持仓方向 -
pTime
Long pTime
持仓信息的推送时间,Unix时间戳的毫秒数格式,如 1597026383085 -
uTime
Long uTime
最近一次持仓更新时间,Unix时间戳的毫秒数格式,如 1597026383085
-
-
-
Class xyz.felh.okx.v5.entity.ws.pri.Positions
class Positions extends Object implements Serializable-
Serialized Fields
-
adl
Integer adl
信号区,分为5档,从1到5,数字越小代表adl强度越弱 -
availPos
BigDecimal availPos
可平仓数量,适用于 币币杠杆,交割/永续(开平仓模式),期权 对于杠杆仓位,平仓时,杠杆还清负债后,余下的部分会视为币币交易,如果想要减少币币交易的数量,可通过"获取最大可用数量"接口获取只减仓的可用数量。 -
avgPx
BigDecimal avgPx
开仓平均价 -
bePx
BigDecimal bePx
盈亏平衡价 -
bizRefId
String bizRefId
外部业务id,e.g. 体验券id -
bizRefType
String bizRefType
外部业务类型 -
ccy
String ccy
占用保证金的币种 -
closeOrderAlgo
List<Positions.CloseOrderAlgo> closeOrderAlgo
平仓策略委托订单。调用策略委托下单,且closeFraction=1 时,该数组才会有值。 -
cTime
Long cTime
持仓创建时间,Unix时间戳的毫秒数格式,如 1597026383085 -
deltaBS
BigDecimal deltaBS
美金本位持仓仓位delta,仅适用于期权 -
deltaPA
BigDecimal deltaPA
币本位持仓仓位delta,仅适用于期权 -
fee
BigDecimal fee
累计手续费金额,正数代表平台返佣 ,负数代表平台扣除 -
fundingFee
BigDecimal fundingFee
累计资金费用 -
gammaBS
BigDecimal gammaBS
美金本位持仓仓位gamma,仅适用于期权 -
gammaPA
BigDecimal gammaPA
币本位持仓仓位gamma,仅适用于期权 -
idxPx
BigDecimal idxPx
最新指数价格 -
imr
BigDecimal imr
初始保证金,仅适用于全仓 -
instId
String instId
产品ID,如 BTC-USD-180216 -
instType
InstrumentType instType
产品类型 -
interest
BigDecimal interest
利息,已经生成未扣利息 -
last
BigDecimal last
最新成交价 -
lever
BigDecimal lever
杠杆倍数,不适用于期权卖方 -
liab
BigDecimal liab
负债额,仅适用于币币杠杆 -
liabCcy
String liabCcy
负债币种,仅适用于币币杠杆 -
liqPenalty
BigDecimal liqPenalty
累计爆仓罚金,有值时为负数。 -
liqPx
BigDecimal liqPx
预估强平价 不适用于期权 -
margin
BigDecimal margin
保证金余额,仅适用于逐仓,可增减 -
markPx
BigDecimal markPx
最新标记价格 -
mgnMode
MgnMode mgnMode
保证金模式 -
mgnRatio
BigDecimal mgnRatio
保证金率 -
mmr
BigDecimal mmr
维持保证金 -
notionalUsd
BigDecimal notionalUsd
以美金价值为单位的持仓数量 -
optVal
BigDecimal optVal
期权价值,仅适用于期权 -
pendingCloseOrdLiabVal
BigDecimal pendingCloseOrdLiabVal
逐仓杠杆负债对应平仓挂单的数量 -
pnl
BigDecimal pnl
平仓订单累计收益额 -
pos
BigDecimal pos
持仓数量,逐仓自主划转模式下,转入保证金后会产生pos为0的仓位 -
posCcy
String posCcy
持仓数量币种,仅适用于币币杠杆 -
posId
String posId
持仓ID -
posSide
PositionsSide posSide
持仓方向 -
pTime
Long pTime
持仓信息的推送时间,Unix时间戳的毫秒数格式,如 1597026383085 -
realizedPnl
BigDecimal realizedPnl
已实现收益 -
spotInUseAmt
BigDecimal spotInUseAmt
现货对冲占用数量 适用于组合保证金模式 -
spotInUseCcy
String spotInUseCcy
现货对冲占用币种,如 BTC 适用于组合保证金模式 -
thetaBS
BigDecimal thetaBS
美金本位持仓仓位theta,仅适用于期权 -
thetaPA
BigDecimal thetaPA
币本位持仓仓位theta,仅适用于期权 -
tradeId
String tradeId
最新成交ID -
upl
BigDecimal upl
未实现收益(以标记价格计算) -
uplLastPx
BigDecimal uplLastPx
以最新成交价格计算的未实现收益,主要做展示使用,实际值还是 upl -
uplRatio
BigDecimal uplRatio
未实现收益率(以标记价格计算 -
uplRatioLastPx
BigDecimal uplRatioLastPx
以最新成交价格计算的未实现收益率 -
usdPx
BigDecimal usdPx
美金价格 -
uTime
Long uTime
最近一次持仓更新时间,Unix时间戳的毫秒数格式,如 1597026383085 -
vegaBS
BigDecimal vegaBS
美金本位持仓仓位vega,仅适用于期权 -
vegaPA
BigDecimal vegaPA
币本位持仓仓位vega,仅适用于期权
-
-
-
Class xyz.felh.okx.v5.entity.ws.pri.Positions.CloseOrderAlgo
class CloseOrderAlgo extends Object implements Serializable-
Serialized Fields
-
algoId
String algoId
策略委托单ID -
closeFraction
BigDecimal closeFraction
策略委托触发时,平仓的百分比。1 代表100% -
slTriggerPx
BigDecimal slTriggerPx
止损触发价 -
slTriggerPxType
TriggerPxType slTriggerPxType
止损触发价类型 -
tpTriggerPx
BigDecimal tpTriggerPx
止盈委托价 -
tpTriggerPxType
TriggerPxType tpTriggerPxType
止盈触发价类型
-
-
-
-
Package xyz.felh.okx.v5.entity.ws.pub
-
Class xyz.felh.okx.v5.entity.ws.pub.Instruments
class Instruments extends Object implements Serializable-
Serialized Fields
-
instId
String instId
产品ID,如 LTC-USD-SWAP -
instType
InstrumentType instType
产品类型
-
-
-
Class xyz.felh.okx.v5.entity.ws.pub.OpenInterest
class OpenInterest extends Object implements Serializable-
Serialized Fields
-
instId
String instId
产品ID,如 LTC-USD-SWAP -
instType
InstrumentType instType
产品类型 -
openInterest
BigDecimal openInterest
持仓量,按张为单位,open interest -
openInterestCcy
BigDecimal openInterestCcy
持仓量,按币为单位 -
timestamp
Long timestamp
数据更新的时间,Unix时间戳的毫秒数格式,如 1597026383085
-
-
-