external

package
v0.0.0-...-8f31e64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoinGecko

type CoinGecko struct {
	// contains filtered or unexported fields
}

CoinGecko is a quick and dirty solution to fetch BTC prices without importing a supporting package.

It is configured to use IPv4 for HTTP requests to avoid rate limiting.

func NewCoinGecko

func NewCoinGecko() *CoinGecko

func (*CoinGecko) QuotePrice

func (s *CoinGecko) QuotePrice(curCode string, amount *librefund.Money) (*librefund.Money, error)

GetPrice returns the estimated value for the amount in the given currency.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL