类 MarketCenter
java.lang.Object
org.dromara.northstar.gateway.mktdata.MarketCenter
- 所有已实现的接口:
TickDataAware,IContractManager,IMarketCenter
市场中心
负责作为网关的防腐层,聚合合约管理以及指数TICK合成
- 作者:
- KevinHuangwl
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddDefinitions(List<ContractDefinition> contractDefs) 增加合约定义voidaddGateway(MarketGateway gateway) 增加网关voidaddInstrument(Instrument ins) 注册网关合约getContract(ChannelType channelType, String code) 查询合约getContract(Identifier identifier) 查找合约getContracts(String gatewayId) 获取网关合约getContracts(ChannelType channelType) 获取网关合约getDefinition(CoreEnum.ExchangeEnum exchange, CoreEnum.ProductClassEnum productClass, String identifier) 获取合约定义getGateway(ChannelType channelType) 获取网关获取最近一个TICK数据voidloadContractGroup(ChannelType channelType) 加载合约组void更新行情
-
构造器详细资料
-
MarketCenter
-
-
方法详细资料
-
addDefinitions
增加合约定义- 指定者:
addDefinitions在接口中IMarketCenter
-
addInstrument
注册网关合约- 指定者:
addInstrument在接口中IMarketCenter- 参数:
ins-
-
getDefinition
public Optional<ContractDefinition> getDefinition(CoreEnum.ExchangeEnum exchange, CoreEnum.ProductClassEnum productClass, String identifier) 从接口复制的说明:IContractManager获取合约定义- 指定者:
getDefinition在接口中IContractManager- 参数:
identifier-- 返回:
-
loadContractGroup
加载合约组- 指定者:
loadContractGroup在接口中IMarketCenter
-
getContract
查找合约- 指定者:
getContract在接口中IContractManager- 参数:
identifier-- 返回:
-
getContract
查询合约- 指定者:
getContract在接口中IContractManager- 参数:
channelType-code- 可以是symbol或unifiedSymbol- 返回:
-
getContracts
获取网关合约- 指定者:
getContracts在接口中IContractManager- 参数:
gatewayId-- 返回:
-
getContracts
获取网关合约- 指定者:
getContracts在接口中IContractManager- 参数:
channelType-- 返回:
-
onTick
更新行情- 指定者:
onTick在接口中TickDataAware
-
addGateway
增加网关- 指定者:
addGateway在接口中IMarketCenter- 参数:
gateway-
-
getGateway
从接口复制的说明:IMarketCenter获取网关- 指定者:
getGateway在接口中IMarketCenter- 参数:
channelType-
-
lastTick
从接口复制的说明:IMarketCenter获取最近一个TICK数据- 指定者:
lastTick在接口中IMarketCenter- 参数:
contract-- 返回:
-