bity 0.3.0

  • Example
  • Installing
  • Versions
  • 69

Bity library #

pub package

A library for communicating with the Bity API. Some calls are missing.

Examples #

Get an estimate #

  var client = Client('');
  print(await client.estimate(inputCurrency: "BTC", inputAmount: 1, outputCurrency: "CHF"));

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.

  var client = Client('');
  var uuid = await client.createCryptoToFiatOrder(inputCurrency: "ETH", outputCurrency: "CHF", outputAmount: 1000, outputIban: "some iban"));

View order #

  var client = Client('');
  print(await client.getOrder("some uuid"));

Installing #

Add it to your pubspec.yaml:

  bity: any

Licence overview #

All files in this repository fall under the license specified in COPYING. The project is licensed as AGPL with a lesser clause. 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 #


  • Order placement needs an Owner
  • Order queries need a session identifier


  • Updated API endpoints
  • Fix bug in which amount was not submitted as a String


  • Workaround Bity's inability to handle URL encoding


  • Fix createCryptoToFiatOrder call


  • Add getOrders call


  • Add IBAN validation


  • Add Output class


  • Add Order class


  • Tidy up code base


  • Initial release


import 'package:bity/bity.dart';

void main() async {
  var client = Client('');
  var estimate = await client
      .getEstimate(inputCurrency: "BTC", inputAmount: 1, outputCurrency: "CHF")
      .timeout(const Duration(seconds: 2));
  print('1 BTC costs $estimate CHF');

  var owner = Owner(
    "Some street",
    "Some city",
    "Some zip",
    "Some name",
  await client.createCryptoToFiatOrder(
    inputCurrency: "BTC",
    outputAmount: 10.0,
    outputCurrency: "CHF",
    outputIban: "AT611904300234573201",
    owner: owner,
  var orders = await client.getOrders();
  print('Orders: $orders');

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  bity: ^0.3.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:bity/bity.dart';
Version Uploaded Documentation Archive
0.3.0 Jun 7, 2019 Go to the documentation of bity 0.3.0 Download bity 0.3.0 archive
0.2.5 Apr 8, 2019 Go to the documentation of bity 0.2.5 Download bity 0.2.5 archive
0.2.4 Mar 22, 2019 Go to the documentation of bity 0.2.4 Download bity 0.2.4 archive
0.2.3 Mar 21, 2019 Go to the documentation of bity 0.2.3 Download bity 0.2.3 archive
0.2.2 Mar 19, 2019 Go to the documentation of bity 0.2.2 Download bity 0.2.2 archive
0.2.1 Mar 19, 2019 Go to the documentation of bity 0.2.1 Download bity 0.2.1 archive
0.2.0 Mar 19, 2019 Go to the documentation of bity 0.2.0 Download bity 0.2.0 archive
0.1.1 Mar 18, 2019 Go to the documentation of bity 0.1.1 Download bity 0.1.1 archive
0.1.0 Mar 14, 2019 Go to the documentation of bity 0.1.0 Download bity 0.1.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18


Detected platforms: Flutter, other

Primary library: package:bity/bity.dart with components: io.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.12.0+1 0.12.0+2
iban ^0.1.0 0.1.0
Transitive dependencies
async 2.2.0
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
mod97 0.1.0
path 1.6.2
pedantic 1.7.0
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
mock_web_server ^4.0.0
test ^1.3.4