Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Added Zaif methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
Takanori Takase committed Apr 1, 2018
1 parent 03f2c88 commit 788f5a1
Show file tree
Hide file tree
Showing 10 changed files with 985 additions and 144 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.after_sunrise.cryptocurrency.cryptotrader.service.zaif;

import com.google.gson.annotations.SerializedName;
import lombok.*;

import java.math.BigDecimal;
import java.time.Instant;
import java.util.Map;

/**
* @author takanori.takase
* @version 0.0.1
*/
@Getter
@Builder
@ToString
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class ZaifBalance {

@SerializedName("funds")
private Map<String, BigDecimal> funds;

@SerializedName("deposits")
private Map<String, BigDecimal> deposits;

@SerializedName("rights")
private Map<String, BigDecimal> rights;

@SerializedName("open_orders")
private Integer orders;

@SerializedName("server_time")
private Instant timestamp;

@Getter
@Builder
@ToString
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public static class Container {

private static final Integer SUCCESS = 1;

@SerializedName("success")
private Integer status;

@SerializedName("return")
private ZaifBalance balance;

public Boolean isSuccess() {
return SUCCESS.equals(status) && balance != null;
}

}

}

0 comments on commit 788f5a1

Please sign in to comment.