Skip to content

Commit

Permalink
Merge pull request #5001 from bigscoop/bitmex
Browse files Browse the repository at this point in the history
[bitmex] Extend implementation
  • Loading branch information
timmolter authored Feb 17, 2025
2 parents 39bfb6e + 26949a5 commit 2ab6e6f
Show file tree
Hide file tree
Showing 115 changed files with 3,635 additions and 4,433 deletions.
5 changes: 5 additions & 0 deletions xchange-bitmex/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# private properties for idea rest client
http-client.private.env.json

# private properties for integration tests
integration-test.env.properties
6 changes: 6 additions & 0 deletions xchange-bitmex/example.http-client.private.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": {
"api_key": "change_me",
"api_secret": "change_me",
}
}
2 changes: 2 additions & 0 deletions xchange-bitmex/example.integration-test.env.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apiKey=change_me
secretKey=change_me
8 changes: 8 additions & 0 deletions xchange-bitmex/http-client.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"default": {
"api_v1": "https://www.bitmex.com/api/v1"
},
"testnet": {
"api_v1": "https://testnet.bitmex.com/api/v1"
}
}
2 changes: 2 additions & 0 deletions xchange-bitmex/lombok.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lombok.equalsAndHashCode.callSuper = call
lombok.tostring.callsuper = call
35 changes: 31 additions & 4 deletions xchange-bitmex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,47 @@
<url>http://knowm.org/open-source/xchange/</url>
</organization>

<!-- Parent provides default configuration for dependencies -->
<dependencies>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>

<!-- Project dependencies (version automatically set through parent) -->
<dependency>
<groupId>org.knowm.xchange</groupId>
<artifactId>xchange-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertiesFile>integration-test.env.properties</systemPropertiesFile>
</configuration>
</plugin>
</plugins>
</pluginManagement>

</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.Date;
import javax.annotation.Nullable;
import org.knowm.xchange.bitmex.dto.account.BitmexTickerList;
import org.knowm.xchange.bitmex.dto.marketdata.BitmexAsset;
import org.knowm.xchange.bitmex.dto.marketdata.BitmexFundingList;
import org.knowm.xchange.bitmex.dto.marketdata.BitmexKlineList;
import org.knowm.xchange.bitmex.dto.marketdata.BitmexPublicOrderList;
Expand Down Expand Up @@ -41,7 +42,7 @@ BitmexKlineList getBucketedTrades(
@GET
@Path("orderBook/L2")
BitmexPublicOrderList getDepth(
@QueryParam("symbol") String currencyPair, @QueryParam("depth") Double depth)
@QueryParam("symbol") String currencyPair, @QueryParam("depth") Integer depth)
throws IOException, BitmexException;

@GET
Expand Down Expand Up @@ -77,4 +78,9 @@ BitmexFundingList getFundingHistory(
@Nullable @QueryParam("startTime") Date startTime,
@Nullable @QueryParam("endTime") Date endTime)
throws IOException, BitmexException;

@GET
@Path("wallet/assets")
HttpResponseAwareList<BitmexAsset> getAssets()
throws IOException, BitmexException;
}
Loading

0 comments on commit 2ab6e6f

Please sign in to comment.