pyth_client_dart 0.0.2 copy "pyth_client_dart: ^0.0.2" to clipboard
pyth_client_dart: ^0.0.2 copied to clipboard

Dart Client for consuming Pyth price data.

Dart Client for consuming Pyth price data.

Features #

Dart Client for consuming Pyth price data.

Usage #

    final pythConnection = PythConnection(
      connection,
      getPythProgramKeyForCluster(cluster.name),
      null
    );

    pythConnection.onPriceChange((product, price){
      if (price.price != null && price.confidence != null){
        print("${product["symbol"]}: ${price.price} \xB1${price.confidence}");
      } else {
        print("${product["symbol"]}: price currently unavailable. status is ${price.status}");
      }
    });
    await  pythConnection.start();
0
likes
120
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

Dart Client for consuming Pyth price data.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

buffer, flutter, solana_web3

More

Packages that depend on pyth_client_dart