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)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

šŸ‘„ Ideal for solo developers, teams, and cross-company projects

Learn more

šŸ‘‹ Kindness is contagious

Please leave a ā¤ļø or a friendly comment on this post if you found it helpful!

Okay