Disclaimer: custom (not-official) implementation
Official API documentation: https://whitebit-exchange.github.io/api-docs/
- Best Practices: We used experience gained working with API clients of the most major exchanges.
- Core Functionality: Enables basic operations like fetching account balances, placing orders, retrieving open and closed orders, establishing WebSocket channels etc.
- Error Handling: Built-in error handling. Use of
WBResponse,WBCloudException,WSResponseandWebSocketExceptionto give the user control over exceptions. - Flexibility: Major configuration settings (HTTP client config, ObjectMapper, etc.) can be modified using
WBConfigandClientConfig. Also, the dependency injection principles has been used to allow user passing custom implementations. - Logging: Logging of HTTP traffic is done using
HttpClientLogger. You can disable excessive logging by configuring your logger OR pass customHttpLoggerintoHttpClientBuilder. - Test Coverage: Most of the code is covered with tests.
To install the library you need to download and build (mvn clean install -DskipTests) this repo in your local env first.
After that, you can include it as a dependency into your project:
<dependency>
<groupId>trade.wayruha.whitebit</groupId>
<artifactId>whitebit-client</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>You can find examples in test/ folder.
The usage is simple:
...
// Initialize the client. Note that API keys are not needed to access public endpoints
final WhiteBitClient config = new WhiteBitClient("your_api_key", "your_api_secret");
final PublicDataService service = new PublicDataService(config);
final List<MarketInfo> markets = service.getMarkets();
System.out.println("Markets available: " + markets);
...
Co-authored with KushnerykPavel.
If you'd like to contribute to the development of this library, please submit issues or PRs.
For questions or issues, feel free to reach out at [email protected].