Skip to content

shan-developer/nestjs-commodities-crypto

Repository files navigation

Nest Logo

A REST API built with NestJS and Kysely SQL Query Builder.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Donate us Support us Follow us on Twitter

Description

This NestJS application will scrape data from websites and updates price information for Gold, Silver, Crude Oil, Uranium, US Dollar, Bitcoin, Ethereum, Cardano, Polkadot, Chainlink, Vechain, Solana, Avalanche and Algorand (in 15 minutes interval) to a backend PostgresSQL database.

The JSON data in the database table is accessible through REST API which can be ingested by third party application such as KWGT Kustom Widget Maker running on Android OS.

This application can be deployed as Docker container on any supporting platforms. The included "Dockerfile" and "compose.yaml" are used to deploy the application on Synology NAS.

The SQL requires to create the backend tables are included in the "migration.sql" file.

You can add/remove the list of commodities and cryptos through the array lists inside the "src\global.module.ts" file.

API Endpoints

/updateQuotes - scrape and update latest price information for all supported commodities and cryptos
/getpq/[assetType] - get price information for [assetType] from backend Postgres database
/testpq/[assetType] - scrape and update latest price information for [assetType]

Note: Price information for all commodities and cryptos will be updated at every 15 minutes interval.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published