Mining
Installation
- Maven
- Gradle
pom.xml
<dependency>
<groupId>{{groupId}}</groupId>
<artifactId>{{artifactId}}</artifactId>
<version>{{version}}</version>
</dependency>
build.gradle
implementation '{{groupId}}:{{artifactId}}:{{version}}'
Features
Get accounts
- Sync
- Async
try{
AccountListResponse res = client.getAccounts(new AccountListParams(algo, userName)).sync();
}catch(ApiException e){
//...
}
client.getAccounts(new AccountListParams(algo, userName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get algorithms
- Sync
- Async
try{
AlgorithmsResponse res = client.getAlgorithms().sync();
}catch(ApiException e){
//...
}
client.getAlgorithms().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get coins
- Sync
- Async
try{
CoinsResponse res = client.getCoins().sync();
}catch(ApiException e){
//...
}
client.getCoins().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get statistics
- Sync
- Async
try{
StatisticsResponse res = client.getStatistics(new StatisticsParams(algo, userName)).sync();
}catch(ApiException e){
//...
}
client.getStatistics(new StatisticsParams(algo, userName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Resell hasrate
- Sync
- Async
try{
HashrateResaleResponse res = client.resellHashrate(new HashrateResaleParams(userName, algo, startTime, endTime, userName, hashrate)).sync();
}catch(ApiException e){
//...
}
client.resellHashrate(new HashrateResaleParams(userName, algo, startTime, endTime, userName, hashrate)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Cancel hashrate resale configuration
- Sync
- Async
try{
HashrateResaleCancellationResponse res = client.cancelHashrateResaleConfiguration(new HashrateResaleCancellationParams(configId, userName)).sync();
}catch(ApiException e){
//...
}
client.cancelHashrateResaleConfiguration(new HashrateResaleCancellationParams(configId, userName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get earnings list
- Sync
- Async
try{
ProfitResponse res = client.getProfits(new ProfitsParams(sha256, userName), new FramedPaging(startTime, endTime, page, limit)).sync();
}catch(ApiException e){
//...
}
client.getProfits(new ProfitsParams(sha256, userName), new FramedPaging(startTime, endTime, page, limit)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get extra bonus list.
- Sync
- Async
try{
OtherProfitsResponse res = client.getOtherProfits(new ProfitsParams(sha256, userName), new FramedPaging(startTime, endTime, page, limit)).sync();
}catch(ApiException e){
//...
}
client.getOtherProfits(new ProfitsParams(sha256, userName), new FramedPaging(startTime, endTime, page, limit)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get mining account earning
- Default
- Paginated
- Sync
- Async
try{
AccountProfitsResponse res = client.getAccountProfits(new AccountProfitsParams(algo, userName)).sync();
}catch(ApiException e){
//...
}
client.getAccountProfits(new AccountProfitsParams(algo, userName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
AccountProfitsResponse res = client.getAccountProfits(new AccountProfitsParams(algo, userName), new FramedPaging(startTime, endTime, page, limit)).sync();
}catch(ApiException e){
//...
}
client.getAccountProfits(new AccountProfitsParams(algo, userName), new FramedPaging(startTime, endTime, page, limit)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get hashrate resale list
- Default
- Paginated
- Sync
- Async
try{
HashrateResaleListResponse res = client.getHashrateResales().sync();
}catch(ApiException e){
//...
}
client.getHashrateResales().async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
HashrateResaleListResponse res = client.getHashrateResales(new Paging(page, limit)).sync();
}catch(ApiException e){
//...
}
client.getHashrateResales(new Paging(page, limit)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get hashrate resale detail
- Default
- Paginated
- Sync
- Async
try{
HashrateResaleDetailResponse res = client.getHashrateResalesDetails(new HashrateResaleDetailParam(configId, userName)).sync();
}catch(ApiException e){
//...
}
client.getHashrateResalesDetails(new HashrateResaleDetailParam(configId, userName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
- Sync
- Async
try{
HashrateResaleDetailResponse res = client.getHashrateResalesDetails(new HashrateResaleDetailParam(configId, userName), new Paging(page, limit)).sync();
}catch(ApiException e){
//...
}
client.getHashrateResalesDetails(new HashrateResaleDetailParam(configId, userName), new Paging(page, limit)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get miners list
- Sync
- Async
try{
WorkersResponse res = client.getMiners(new MinersParams(algo, userName)).sync();
}catch(ApiException e){
//...
}
client.getMiners(new MinersParams(algo, userName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});
Get miners details list
- Sync
- Async
try{
MinerDetailsResponse res = client.getMinersDetails(new MinerDetailsParams(algo, userName, workerName)).sync();
}catch(ApiException e){
//...
}
client.getMinersDetails(new MinerDetailsParams(algo, userName, workerName)).async((response, exception) -> {
if(exception == null){
//...
}else{
//...
}
});