bity 0.4.0 copy "bity: ^0.4.0" to clipboard
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
20
points
56
downloads

Publisher

unverified uploader

Weekly Downloads

Minimalistic library for communicating with the Bity API v2.

License

unknown (license)

Dependencies

http, iban

More

Packages that depend on bity