bitkub_client 0.2.0 copy "bitkub_client: ^0.2.0" to clipboard
bitkub_client: ^0.2.0 copied to clipboard

outdated

A Dart client for Bitkub public API.

Bitkub Client for Dart

Header

A well-documented client library for accessing Bitkub public APIs, works for Dart and Flutter.

Software License Actions Doc

Todos (In orders) #

  • Non-secure endpoints
  • WebSocket APIs as streams
  • Full examples
  • Migrate to Null-safety
  • Secure endpoints using authentication

Documentation #

Documentation of Bitkub Client for Dart can be found here Official Documentation of Bikub public API can be found here

Usage #

Getting tickers

 //Initialize the client
 var client = BitkubClient();
 //Get the tickers
 var tickers = await client.getTickers(symbol: BkSymbols.THB_BTC);
 //...
 print(tickers.tickerList.first.lastPrice);

Getting ask,bid orders

 //Initialize the client
 var client = BitkubClient();
 //Get the orders
 var orders = await client.getOpenOrders(BkSymbols.THB_BTC);
 //...
 print(orders.asks.first.quoteRate);

Connecting to trade stream

//Initialize the socket client
var socketClient = BitkubSocketClient();
//Get the stream of trade
var tradeStream = socketClient.connectToTradeStream([BkSymbols.THB_BTC]);
//Listen to matchedOrder change
tradeStream.listen((matchedOrder) {
	//...
    print(matchedOrder);
});

Contribution #

Feel free to contribute and shot the pull requests!

License #

Mit

2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A Dart client for Bitkub public API.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, meta, web_socket_channel

More

Packages that depend on bitkub_client