bity 0.4.0
bity: ^0.4.0 copied to clipboard

Minimalistic library for communicating with the Bity API v2.

example/main.dart

import 'package:bity/bity.dart';

// allow:
Future<void> main() async {
  var client = Client('https://exchange.api.bity.com/');
  var estimate = await client
      .getEstimate(inputCurrency: 'BTC', inputAmount: 1, outputCurrency: 'EUR')
      .timeout(const Duration(seconds: 2));
  print('1 BTC costs $estimate EUR');

  var owner = Owner(
    'Some street',
    'Some city',
    'Some zip',
    'AT',
    'Some name',
  );
  await client.createCryptoToFiatOrder(
    inputCurrency: 'BTC',
    outputAmount: 10,
    outputCurrency: 'EUR',
    outputIban: 'AT611904300234573201',
    owner: owner,
    reference: 'inapay',
  );
  var orders = await client.getOrders();
  print('Orders: $orders');
  client.close();
}
0
likes
80
pub points
0%
popularity

Publisher

Unknown

Minimalistic library for communicating with the Bity API v2.

Repository (GitHub)
View/report issues

Documentation

API reference

License

AGPL 3.0 (LICENSE)

Dependencies

http, iban

More

Packages that depend on bity