Skip to content

Commit e27cf99

Browse files
update README
update KEvent to 2.0.1
1 parent 7735ae8 commit e27cf99

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# KTrader-Broker-API
2-
[![Maven Central](https://img.shields.io/maven-central/v/org.rationalityfrontline.ktrader/ktrader-broker-api.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.rationalityfrontline.ktrader%22%20AND%20a:%22ktrader-broker-api%22) [![Apache License 2.0](https://img.shields.io/github/license/ktrader-tech/ktrader-broker-api)](https://github.com/ktrader-tech/ktrader-broker-api/blob/master/LICENSE)
2+
[![Maven Central](https://img.shields.io/maven-central/v/org.rationalityfrontline.ktrader/ktrader-broker-api.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.rationalityfrontline.ktrader%22%20AND%20a:%22ktrader-broker-api%22)
3+
[![Apache License 2.0](https://img.shields.io/github/license/ktrader-tech/ktrader-broker-api)](https://github.com/ktrader-tech/ktrader-broker-api/blob/master/LICENSE)
34

4-
[KTrader](https://github.com/ktrader-tech/ktrader) 量化交易平台的 Broker 统一接口
5+
[KTrader](https://github.com/ktrader-tech/ktrader) 量化交易平台的 Broker 统一接口。
6+
> 该项目不依赖于 KTrader 的任何其它项目,可以独立使用。
7+
8+
## 目标
9+
以统一的方式调用各种交易 API,屏蔽不同 API 的具体调用细节,减少心智负担,降低开发成本,提高开发效率。
10+
> 目前主要针对中国国内市场(CTP & XTP)
11+
12+
## 使用说明
13+
该接口在设计上支持2种不同的使用方式:类库,插件。作为类库,直接添加依赖并使用即可。作为插件,会生成一个 ZIP 格式的压缩包插件,然后可以在运行时动态加载或卸载该插件,关于插件化技术请参考 [PF4J](https://github.com/pf4j/pf4j)
14+
15+
要实现该接口,需要继承并实现 [BrokerApi](https://github.com/ktrader-tech/ktrader-broker-api/blob/master/lib/src/main/kotlin/org/rationalityfrontline/ktrader/broker/api/BrokerApi.kt) 抽象类,并通过其成员属性 kEvent
16+
将各种推送事件(如 Tick,订单回报,成交回报等)发出。如果需要支持插件的使用方式,那么还需要继承并实现 [Broker](https://github.com/ktrader-tech/ktrader-broker-api/blob/master/lib/src/main/kotlin/org/rationalityfrontline/ktrader/broker/api/Broker.kt) 抽象类。
17+
> [KEvent](https://github.com/RationalityFrontline/kevent) 是一个基于 [Kotlin 协程](https://github.com/Kotlin/kotlinx.coroutines) 实现的强大的事件订阅发布类库。关于可推送的事件类型及事件数据,参见 [BrokerEvent.kt](https://github.com/ktrader-tech/ktrader-broker-api/blob/master/lib/src/main/kotlin/org/rationalityfrontline/ktrader/broker/api/BrokerEvent.kt)
18+
19+
## 已有的接口实现
20+
* [KTrader-Broker-CTP](https://github.com/ktrader-tech/ktrader-broker-ctp) CTP 实现(中国期货 & 期权)
521

622
## License
723

lib/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repositories {
1919

2020
dependencies {
2121
compileOnly("org.rationalityfrontline.workaround:pf4j:3.7.0")
22-
api("org.rationalityfrontline:kevent:2.0.0")
22+
api("org.rationalityfrontline:kevent:2.0.1")
2323
}
2424

2525
sourceSets.main {

0 commit comments

Comments
 (0)