Skip to content

REST API Java wrapper for coineal.com cryptocurrency exchange

License

Notifications You must be signed in to change notification settings

mpawlucz/coineal-java-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coineal Java API

coineal-java-api is a lightweight Java library for interacting with the Coineal API

Features

  • getBalance
  • createOrder
  • getOpenOrders
  • cancelOrder

Installation

  1. Install library into your Maven's local repository by running mvn install
  2. Add the following Maven dependency to your project's pom.xml:
<dependency>
    <groupId>com.github.mpawlucz.coineal</groupId>
    <artifactId>coineal-java-api</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

Example

getBalance

CoinealApi api = new CoinealApi(ApiKey.builder()
    .key("<YOUR-API-KEY>")
    .secret("<YOUR-API-SECRET>")
    .build()
);
BalanceResponse balance = api.getBalance();
BigDecimal summaryBtc = balance.getData().getSummaryBtc();

createOrder

final TradeResponse trade = api.trade(TradeRequest.builder()
    .base("ETH")
    .quote("BTC")
    .volume(new BigDecimal("0.01"))
    .price(new BigDecimal("0.01"))
    .isBuy(true)
    .build()
);
if (!trade.isSuccess()){
    throw new RuntimeException("Create order failed: " + trade.getMsg());
}
System.out.println(trade.getData().getOrderId());

About

REST API Java wrapper for coineal.com cryptocurrency exchange

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages