Java client for buda.com REST API
import cl.daplay.jsurbtc.JSurbtc;
JSurbtc surbtc = new JSurbtc(apiKey, apiSecret);
// create order
Order order = surbtc.createOrder(MarketID.BTC_CLP, OrderType.BID, OrderPriceType.LIMIT, BigDecimal.ONE, BigDecimal.ONE);
// cancel order
surbtc.cancelOrder(order.getId());
// get all orders
List<Order> orders = surbtc.getOrders(MarketID.BTC_CLP);
import cl.daplay.jsurbtc.JSurbtc;
// this allows to call public APIs only
JSurbtc surbtc = new JSurbtc();
// GET /markets
List<Market> markets = surbtc.getMarkets();
<dependency>
<groupId>cl.daplay</groupId>
<artifactId>jsurbtc</artifactId>
<version>4.3.0</version>
</dependency>
compile group: 'cl.daplay', name: 'jsurbtc', version: '4.3.0'
To run integration tests (those ended in _IT.java), you'll need to add the following settings to your $HOME/.gradle/gradle.properties
jsurbtc.key
jsurbtc.secret
jsurbtc.proxy.host
OPTIONALjsurbtc.proxy.port
OPTIONAL
- Remove cl.daplay.jsurbtc.jackson dependency
- Extract public API
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 410 Gone
- 429 Too Many Requests
- 422 Unprocessable entity
- 500 Internal Server Error
- 503 Service Unavailable