getPrice static method

Future getPrice(
  1. List<String> tokenAddresses,
  2. List<String> currencies
)

Get token price,

tokenAddresses is a token address list, for native token, pass "native"

currencies is currency array, like "usd", "cny"

Implementation

static Future<dynamic> getPrice(
    List<String> tokenAddresses, List<String> currencies) async {
  const method = "enhancedGetPrice";
  final params = [tokenAddresses, currencies];
  return await SolanaService.rpc(method, params);
}