Skip to content
This repository was archived by the owner on Jun 8, 2020. It is now read-only.

Commit 8ac7f03

Browse files
authored
Merge pull request #340 from badgerwithagun/generic-user-channel
Generic user channels (balance, open orders, user trades) + support for Binance, Bitfinex, Coinbase Pro
2 parents 5396f37 + 6d001f1 commit 8ac7f03

File tree

42 files changed

+1934
-378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1934
-378
lines changed

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,25 +91,27 @@ More information about reactive streams can be found at [RxJava wiki](https://gi
9191

9292
Listening for live updates of
9393

94-
Exchange | order books | trades | tickers | notes |
95-
-------- | ----------- | ------ | ------- |-------|
96-
**Binance** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
97-
**Bitfinex** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
98-
**Bitflyer** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
99-
**BitMEX** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | We are short of maintainers able to review pull requests and provide support for Bitmex, so there is a backlog of pull requests and support is likely broken. Can you help? |
100-
**Bitstamp** | :heavy_check_mark: | :heavy_check_mark: | :x: | |
101-
**CEX.IO** | :heavy_check_mark: | :x: | :x: | New support, not widely tested |
102-
**Coinbase Pro** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
103-
**Coinmate** | :heavy_check_mark: | :heavy_check_mark: | :x: | |
104-
**OKCoin** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
105-
**OKEx** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
106-
**Poloniex** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
107-
**Gemini** | :heavy_check_mark: | :heavy_check_mark: | :x: | |
108-
**Wex** | :heavy_check_mark: | :heavy_check_mark: | :x: | |
94+
| Exchange | order books | trades (public) | tickers | balances | trades (user) | open orders | notes |
95+
| ---------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ----- |
96+
| **Binance** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
97+
| **Bitfinex** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
98+
| **Bitflyer** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :question: | :question: | :question: | |
99+
| **BitMEX** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :question: | :question: | :question: | We are short of maintainers able to review pull requests and provide support for Bitmex, so there is a backlog of pull requests and support is likely broken. Can you help? |
100+
| **Bitstamp** | :heavy_check_mark: | :heavy_check_mark: | :x: | :question: | :question: | :question: | |
101+
| **CEX.IO** | :heavy_check_mark: | :x: | :x: | :question: | :question: | :question: | New support, not widely tested |
102+
| **Coinbase Pro** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |
103+
| **Coinmate** | :heavy_check_mark: | :heavy_check_mark: | :x: | :question: | :question: | :question: | |
104+
| **OKCoin** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :question: | :question: | :question: | |
105+
| **OKEx** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :question: | :question: | :question: | |
106+
| **Poloniex** | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :question: | :question: | :question: | |
107+
| **Gemini** | :heavy_check_mark: | :heavy_check_mark: | :x: | :question: | :question: | :question: | |
108+
| **Wex** | :heavy_check_mark: | :heavy_check_mark: | :x: | :question: | :question: | :question: | |
109+
109110

110111
- :heavy_check_mark: - implemented
111112
- :construction: - missing but can be implemented
112113
- :x: - not supported by the exchange
114+
- :question: - exchange support level not known (please fill in)
113115

114116
If you missing a specific exchange implementation, feel free to propose a pull request or open an issue with some sweet BTC bounty.
115117

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@
9696
<artifactId>jackson-databind</artifactId>
9797
<version>2.9.9</version>
9898
</dependency>
99+
100+
<!-- This is introduced by XChange anyway, depending on the implementation used -->
101+
<dependency>
102+
<groupId>com.google.guava</groupId>
103+
<artifactId>guava</artifactId>
104+
<version>27.0.1-jre</version>
105+
</dependency>
99106
</dependencies>
100107
</dependencyManagement>
101108

@@ -146,6 +153,7 @@
146153
<version>3.12.2</version>
147154
<scope>test</scope>
148155
</dependency>
156+
149157
</dependencies>
150158

151159
<build>

service-netty/src/main/java/info/bitrich/xchangestream/service/netty/JsonNettyStreamingService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.slf4j.LoggerFactory;
99

1010
import java.io.IOException;
11+
import java.time.Duration;
1112

1213
public abstract class JsonNettyStreamingService extends NettyStreamingService<JsonNode> {
1314
private static final Logger LOG = LoggerFactory.getLogger(JsonNettyStreamingService.class);
@@ -21,6 +22,10 @@ public JsonNettyStreamingService(String apiUrl, int maxFramePayloadLength) {
2122
super(apiUrl, maxFramePayloadLength);
2223
}
2324

25+
public JsonNettyStreamingService(String apiUrl, int maxFramePayloadLength, Duration connectionTimeout, Duration retryDuration, int idleTimeoutSeconds) {
26+
super(apiUrl, maxFramePayloadLength, connectionTimeout, retryDuration, idleTimeoutSeconds);
27+
}
28+
2429
public boolean processArrayMassageSeparately() {
2530
return true;
2631
}

0 commit comments

Comments
 (0)