github.com/0chain/gosdk@v1.17.11/wasmsdk/tokenrate.go (about)

     1  package main
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/0chain/gosdk/core/tokenrate"
     7  )
     8  
     9  // getUSDRate gets the USD rate for the given crypto symbol
    10  func getUSDRate(symbol string) (float64, error) {
    11  	return tokenrate.GetUSD(context.TODO(), symbol)
    12  }