DEV Community

manuel
manuel

Posted on • Originally published at defer.cc on

Retrieve the current price for an crypto currency

You can use this to retrieve the current price for an crypto currency. I used this in another project and thought it will make sense to publish this as an own package.

How to use it #

import "https://github.com/mnlwldr/coinbase"
Enter fullscreen mode Exit fullscreen mode

Usage #

response, err := Get("SHIB-EUR")
fmt.Printf("%.7f\n", response.Amount)
Enter fullscreen mode Exit fullscreen mode

Output #

0.0000253
Enter fullscreen mode Exit fullscreen mode

Go Reference

Top comments (0)