Skip to content

Commit 2ab6e6f

Browse files
authored
Merge pull request #5001 from bigscoop/bitmex
[bitmex] Extend implementation
2 parents 39bfb6e + 26949a5 commit 2ab6e6f

File tree

115 files changed

+3635
-4433
lines changed

Some content is hidden

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

115 files changed

+3635
-4433
lines changed

xchange-bitmex/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# private properties for idea rest client
2+
http-client.private.env.json
3+
4+
# private properties for integration tests
5+
integration-test.env.properties
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"default": {
3+
"api_key": "change_me",
4+
"api_secret": "change_me",
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
apiKey=change_me
2+
secretKey=change_me

xchange-bitmex/http-client.env.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"default": {
3+
"api_v1": "https://www.bitmex.com/api/v1"
4+
},
5+
"testnet": {
6+
"api_v1": "https://testnet.bitmex.com/api/v1"
7+
}
8+
}

xchange-bitmex/lombok.config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lombok.equalsAndHashCode.callSuper = call
2+
lombok.tostring.callsuper = call

xchange-bitmex/pom.xml

+31-4
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,47 @@
2121
<url>http://knowm.org/open-source/xchange/</url>
2222
</organization>
2323

24-
<!-- Parent provides default configuration for dependencies -->
2524
<dependencies>
2625

2726
<dependency>
28-
<groupId>com.google.guava</groupId>
29-
<artifactId>guava</artifactId>
27+
<groupId>com.fasterxml.jackson.datatype</groupId>
28+
<artifactId>jackson-datatype-jsr310</artifactId>
29+
</dependency>
30+
31+
<dependency>
32+
<groupId>org.junit.jupiter</groupId>
33+
<artifactId>junit-jupiter-engine</artifactId>
34+
<scope>test</scope>
3035
</dependency>
3136

32-
<!-- Project dependencies (version automatically set through parent) -->
3337
<dependency>
3438
<groupId>org.knowm.xchange</groupId>
3539
<artifactId>xchange-core</artifactId>
3640
<version>${project.version}</version>
3741
</dependency>
3842

43+
<dependency>
44+
<groupId>org.wiremock</groupId>
45+
<artifactId>wiremock</artifactId>
46+
<scope>test</scope>
47+
</dependency>
48+
3949
</dependencies>
50+
51+
<build>
52+
53+
<pluginManagement>
54+
<plugins>
55+
<plugin>
56+
<groupId>org.apache.maven.plugins</groupId>
57+
<artifactId>maven-failsafe-plugin</artifactId>
58+
<configuration>
59+
<systemPropertiesFile>integration-test.env.properties</systemPropertiesFile>
60+
</configuration>
61+
</plugin>
62+
</plugins>
63+
</pluginManagement>
64+
65+
</build>
66+
4067
</project>

xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.Date;
1010
import javax.annotation.Nullable;
1111
import org.knowm.xchange.bitmex.dto.account.BitmexTickerList;
12+
import org.knowm.xchange.bitmex.dto.marketdata.BitmexAsset;
1213
import org.knowm.xchange.bitmex.dto.marketdata.BitmexFundingList;
1314
import org.knowm.xchange.bitmex.dto.marketdata.BitmexKlineList;
1415
import org.knowm.xchange.bitmex.dto.marketdata.BitmexPublicOrderList;
@@ -41,7 +42,7 @@ BitmexKlineList getBucketedTrades(
4142
@GET
4243
@Path("orderBook/L2")
4344
BitmexPublicOrderList getDepth(
44-
@QueryParam("symbol") String currencyPair, @QueryParam("depth") Double depth)
45+
@QueryParam("symbol") String currencyPair, @QueryParam("depth") Integer depth)
4546
throws IOException, BitmexException;
4647

4748
@GET
@@ -77,4 +78,9 @@ BitmexFundingList getFundingHistory(
7778
@Nullable @QueryParam("startTime") Date startTime,
7879
@Nullable @QueryParam("endTime") Date endTime)
7980
throws IOException, BitmexException;
81+
82+
@GET
83+
@Path("wallet/assets")
84+
HttpResponseAwareList<BitmexAsset> getAssets()
85+
throws IOException, BitmexException;
8086
}

0 commit comments

Comments
 (0)