https://github.com/n7ghtm4r3/binancemanager
This is a Java Based library useful to work with Binance's API service.
https://github.com/n7ghtm4r3/binancemanager
api binance binance-api bitcoin blockchain crypto cryptocurrencies cryptocurrency ethereum java tecknobit
Last synced: 10 months ago
JSON representation
This is a Java Based library useful to work with Binance's API service.
- Host: GitHub
- URL: https://github.com/n7ghtm4r3/binancemanager
- Owner: N7ghtm4r3
- License: mit
- Created: 2022-02-14T17:10:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T21:48:57.000Z (over 2 years ago)
- Last Synced: 2024-05-01T23:20:19.827Z (about 2 years ago)
- Topics: api, binance, binance-api, bitcoin, blockchain, crypto, cryptocurrencies, cryptocurrency, ethereum, java, tecknobit
- Language: Java
- Homepage:
- Size: 5.53 MB
- Stars: 1
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# BinanceManager
**v2.0.3**
This is a Java Based library useful to work with Binance's API service.
## Implementation
Add the JitPack repository to your build file
### Gradle
- Add it in your root build.gradle at the end of repositories
#### Gradle (Short)
```gradle
repositories {
...
maven { url 'https://jitpack.io' }
}
```
#### Gradle (Kotlin)
```gradle
repositories {
...
maven("https://jitpack.io")
}
```
- Add the dependency
#### Gradle (Short)
```gradle
dependencies {
implementation 'com.github.N7ghtm4r3:BinanceManager:2.0.3'
}
```
#### Gradle (Kotlin)
```gradle
dependencies {
implementation("com.github.N7ghtm4r3:BinanceManager:2.0.3")
}
```
### Maven
- Add it in your root build.gradle at the end of repositories
```xml
jitpack.io
https://jitpack.io
```
- Add the dependency
```xml
com.github.N7ghtm4r3
BinanceManager
2.0.3
```
## 🛠Skills
- Java
## Endpoints managers available
- All endpoints managers are available to be used
## Usage/Examples
### Execution
#### No-Signed Managers
```java
// with automatic research for a working base endpoint
try{
BinanceMarketManager binanceMarketManager = new BinanceMarketManager();
}catch(Exception e){
e.printStackTrace();
}
// choose base endpoint manually
try{
BinanceManager binanceManager = new BinanceManager(BinanceManager.BinanceEndpoint);
}catch(Exception e){
e.printStackTrace();
}
```
#### Signed Managers (requests with apiKey)
```java
// with automatic research for a working base endpoint
try{
BinanceSignedManager binanceManager = new BinanceSignedManager("yourApiKey","yourSecretKey");
}catch(Exception e){
e.printStackTrace();
}
// choose base endpoint manually
try{
BinanceSignedManager binanceManager = new BinanceSignedManager(BinanceManager.BinanceEndpoint,"yourApiKey","yourSecretKey");
}catch(Exception e){
e.printStackTrace();
}
```
To avoid re-entering credentials for each manager, you can instantiate managers like this with the **ARCS**:
```java
// choose the manager (for signed and no-signed managers same procedure), for example: BinanceMarketManager, BinanceWalletManager, etc
BinanceManager firstManager = new BinanceManager(/* params of the constructor chosen */,"apiKey","secretKey");
// and then use it
firstManager.makeSomething();
// you don't need to insert all credentials to make manager work
BinanceManager secondManager=new BinanceManager(); // same credentials used
// and then use it
secondManager.makeSomething();
```
### Responses
Library give to you the opportunity to customize the return object after a request, the possibilities are:
- **JSON:** return response formatted as **JSON** (**org.json.JSONObject** or **org.json.JSONArray**)
- **STRING:** return response formatted as **String**
- **LIBRARY_OBJECT:** return response formatted as custom object offered by the library
```java
// choose the manager for example: BinanceMarketManager, BinanceWalletManager, etc
BinanceManager manager=new BinanceManager(/* params of the constructor chosen */);
// method to return directly a library given by library
manager.someRequest(); // in this case will be returned directly a LIBRARY_OBJECT
// method to customize the format of the return
manager.someRequest(ReturnFormat.JSON); // in this case will be returned response in JSON format
```
### Errors handling
```java
try{
System.out.println(binanceManager.getTimestamp());
}catch(Exception e){
System.out.println(binanceManager.getErrorResponse());
//or
binanceManager.printErrorResponse();
}
/* NOTE: if is not a request error will appear: "Error is not in api request, check out your code"
and you will have to work on your code to manage error*/
```
## Authors
- [@N7ghtm4r3](https://www.github.com/N7ghtm4r3)
## Support
If you need help using the library or encounter any problems or bugs, please contact us via the following links:
- Support via email
- Support via GitHub
Thank you for your help!
## Badges
[](https://play.google.com/store/apps/developer?id=Tecknobit)
[](https://twitter.com/tecknobit)
[](https://binance-docs.github.io/apidocs/spot/en/#general-api-information)
[](https://www.oracle.com/java/)
[](https://jitpack.io/#N7ghtm4r3/BinanceManager)
## Donations
If you want support project and developer
| Crypto | Address| Network |
| ------------- | ------------- | ------------- |
|  | **3H3jyCzcRmnxroHthuXh22GXXSmizin2yp** | Bitcoin |
|  | **0x1b45bc41efeb3ed655b078f95086f25fc83345c4** | Ethereum |
If you want support project and developer with PayPal
Copyright © 2024 Tecknobit