bitpanda_price_ticker 0.1.1 bitpanda_price_ticker: ^0.1.1 copied to clipboard
Dart client to consume Bitpanda's price ticker API. BTC, ETH, PAN (and many more) prices.
bitpanda_price_ticker
#
A Dart client to wrap Bitpanda's price ticker API.
You can read more about Bitpanda's public APIs in the docs, or see the API this library gives access to in action, directly in your browser
This is not an official Bitpanda plugin.
Important links #
Usage #
import 'package:bitpanda_price_ticker/bitpanda_price_ticker.dart';
import 'package:http/http.dart';
Future<void> main() {
final map = await fetchAsMap(client: Client());
final supportedCryptos = map.keys.toList()..sort());
print('Supported cryptocurrencies: $supportedCryptos');
// Values are strings as the API returns them.
// Strings are convenient for displaying results, but don't
// forget to convert them to numbers if you need to
// perform some calculation.
final btc2usd = double.parse(map['BTC']['USD']);
print('2 BTC is worth ${2 * btc2usd} USD');
}
Contribute #
If you'd like to contribute to this package, see the Contributions guidelines.