Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KoronGIT/realworld-commoditiesprice
https://github.com/KoronGIT/realworld-commoditiesprice
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/KoronGIT/realworld-commoditiesprice
- Owner: KoronGIT
- Created: 2024-07-12T20:43:27.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T21:19:08.000Z (6 months ago)
- Last Synced: 2024-07-13T22:48:41.940Z (6 months ago)
- Language: TypeScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Realworld Commodities Price for Rebar Framework
Retrieves and stores the current and historical market prices of various commodities.
# Features
- Current market information (price, volume, dayhigh, price etc.)
- Historical daily market information (high, low, volume, changePercent etc.)
- Setting which commodities are retrieved
- Set polling interval
- Set whether only current or also historical data should be retrieved# API
```ts
import { useRebar } from '@Server/index.js';const Rebar = useRebar();
const commoditieAPI = await Rebar.useApi().getAsync("realworld-commoditiesprice-api");await getCommoditiesList() //List of commodities enabled in config.ts
await getCurrent(name: string) //Current market information of a specific commodity (price, volume, dayhigh, price etc.)
await getCurrentPrice(name: string) //Current price of a specific commodity
await getHistorical(name: string) //Historical daily market information of a specific commodity(high, low, volume, changePercent etc.)
```# Installation
From the main directory of your `Rebar` framework.
```sh
git clone https://github.com/KoronGIT/realworld-commoditiesprice.git src/plugins/realworld-commoditiesprice
```