Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptonita

Cryptonita is a site and an API for get last hour price of crypto currencies.

You can integrate into your application or into worksheets like Excel or Google Sheet.

PostgreSQL Setup

To setup database table for cached prices:

CREATE TABLE public.price (
    coin character varying(50) NOT NULL,
    currency character varying(4) NOT NULL,
    lastdate date NOT NULL,
    hour smallint NOT NULL,
    price numeric(18,8)
);

Usage

npm install 

set POSTGRES_URL=postgres://[your-postgres-url]
set COINGECKO_API=https://api.coingecko.com/api/v3
node index.js

curl -s 'http://localhost:5000/price/usd?plain=1&coin=bitcoin'

With no 'plain' or 'plain=0' output a JSON:

{
    "bitcoin": {
        "usd": 42000
    }
}

Notes

This API is based on Coingecko public API cached on free PostgreSQL Database instant at ElephantSQL.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages