🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github.com/mystpen/cryptocurrency-rates

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mystpen/cryptocurrency-rates

v0.0.0-20240427112157-faece05c1820
Source
Go
Version published
Created
Source

Клиент для получения курсов криптовалют

Для запуска:

go run ./cmd/app

Использование:

Для получения курса определенной криптовалюты использовать запрос с ключом name:
Request:

GET /currency?name=bitcoin

Response:

{
    "bitcoin": {
        "id":"bitcoin",
        "symbol":"btc",
        "name":"Bitcoin",
        "image":"https://assets.coingecko.com/coins/images/1/large/bitcoin.png?1696501400",
        "current_price":62779,
        "market_cap":1235020018285,
        "last_updated":"2024-04-27T10:54:14.468Z"
    }
}

Для получения данных с внешнего API реализована гороутина, которая обновляет данные каждые 10 мин.

FAQs

Package last updated on 27 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts