Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haarts/bity_client
A Dart client for communicating with the Bity.com API
https://github.com/haarts/bity_client
Last synced: 9 days ago
JSON representation
A Dart client for communicating with the Bity.com API
- Host: GitHub
- URL: https://github.com/haarts/bity_client
- Owner: haarts
- License: mit
- Created: 2019-03-14T11:31:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-30T10:39:42.000Z (over 4 years ago)
- Last Synced: 2024-03-20T13:21:00.021Z (8 months ago)
- Language: Dart
- Size: 70.3 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING
Awesome Lists containing this project
README
# Bity library
[![pub package](https://img.shields.io/pub/v/bity.svg)](https://pub.dartlang.org/packages/bity)
[![CircleCI](https://circleci.com/gh/inapay/bity_client.svg?style=svg)](https://circleci.com/gh/inapay/bity_client)A library for communicating with the [Bity API]. Some calls are missing.
## Examples
### Get an estimate
```dart
var client = Client('https://exchange.api.bity.com/');
print(await client.estimate(inputCurrency: "BTC", inputAmount: 1, outputCurrency: "CHF"));
client.close();
```### Create a crypto to fiat order
In this example you want to buy 1000 CHF for Ether. How much Ether that
is going to cost can be found by looking at the generated order.```dart
var client = Client('https://exchange.api.bity.com/');
var uuid = await client.createCryptoToFiatOrder(inputCurrency: "ETH", outputCurrency: "CHF", outputAmount: 1000, outputIban: "some iban", "owner": {"name": "some name", "address": "some street", "zip": "some zip", "city": "some city", "country": "some country CODE!"}, "reference": "a reference"));
print(uuid);
client.close();
```### View order
```dart
var client = Client('https://exchange.api.bity.com/');
print(await client.getOrder("some uuid"));
client.close();
```## Installing
Add it to your `pubspec.yaml`:
```
dependencies:
bity: any
```## Licence overview
All files in this repository fall under the license specified in
[COPYING](COPYING). The project is licensed as [AGPL with a lesser clause](https://www.gnu.org/licenses/agpl-3.0.en.html).
It may be used within a proprietary project, but the core library and any
changes to it must be published online. Source code for this library must
always remain free for everybody to access.## Thanks
[Bity API]: https://doc.bity.com/exchange/v2.html