https://github.com/y-pakorn/bitkub_client
A Dart/Flutter client for Bitkub public API.
https://github.com/y-pakorn/bitkub_client
api api-client bitkub client crypto dart flutter package
Last synced: about 1 month ago
JSON representation
A Dart/Flutter client for Bitkub public API.
- Host: GitHub
- URL: https://github.com/y-pakorn/bitkub_client
- Owner: y-pakorn
- License: mit
- Created: 2021-02-04T17:51:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-10T21:42:31.000Z (over 4 years ago)
- Last Synced: 2025-01-19T11:42:47.059Z (over 1 year ago)
- Topics: api, api-client, bitkub, client, crypto, dart, flutter, package
- Language: Dart
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Bitkub Client for Dart

A well-documented client library for accessing Bitkub public APIs, works for Dart and Flutter.
## Documentation
Documentation of Bitkub Client for Dart can be found [here](https://pub.dev/documentation/bitkub_client/latest/)
Official Documentation of Bikub public API can be found [here](https://github.com/bitkub/bitkub-official-api-docs)
## Usage
Getting tickers
```dart
//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
```dart
//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
```dart
//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);
});
```
Accessing the full name of symbols
```dart
var fullName = BkSymbols.THB_ETH.fullName;
print(fullName);
//Ethereum
```
## Milestone
- [x] Non-secure endpoints
- [x] WebSocket APIs as streams
- [x] Full examples
- [ ] Migrate to Null-safety
- [ ] Secure endpoints using authentication
## Contribution
Before creating a new issues please read the official Bitkub API first for Breaking Changes.
Feel free to contribute and shot the pull requests!
## License
Mit