https://github.com/juancarlospaco/nim-openexchangerates
OpenExchangeRates API Client for Nim
https://github.com/juancarlospaco/nim-openexchangerates
api-client bitcoin-price currency dollar euro money nim nim-lang openexchangerates
Last synced: about 2 months ago
JSON representation
OpenExchangeRates API Client for Nim
- Host: GitHub
- URL: https://github.com/juancarlospaco/nim-openexchangerates
- Owner: juancarlospaco
- License: mit
- Created: 2018-07-20T00:28:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-06T17:14:57.000Z (almost 6 years ago)
- Last Synced: 2025-01-26T14:48:40.687Z (4 months ago)
- Topics: api-client, bitcoin-price, currency, dollar, euro, money, nim, nim-lang, openexchangerates
- Language: Nim
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# nim-openexchangerates
[OpenExchangeRates](https://openexchangerates.org) API Client for [Nim](https://nim-lang.org).

Worldwide exchange prices + Bitcoin price + Gold price. No dependencies.
This module should work OK with and without SSL `-d:ssl`, API supports both.
# Use
```nim
import openexchangeratesclient = OpenExchangeRates(api_key: "21e7c27676972", . . . )
client.latest()
client.currencies()
. . .
```- Check the source code, is also executable by itself for an example.
# Documentation
`OpenExchangeRates(api_key: string, timeout: int8, round_float: bool, base: string, local_base: string)`
**Description:** Returns JSON with current international exchange prices and Bitcoin price.
[This module is a Nim port of a Python module.](https://github.com/juancarlospaco/openexchangerate#openexchangerate)**Arguments:**
- `api_key` Your API Key, [you can get one API Key for Free](https://openexchangerates.org/account/app-ids), string type.
- `timeout` Timeout on Seconds for network connections, integer 8bits type, optional.
- `round_float` `True` to round floats to 2 decimals, boolean type, optional.
- `base` Base currency, **Only for Pay accounts!**, string type, optional.
- `local_base` Local Base currency, for Free accounts, to calculate values locally (offline), string type, optional.**Returns:** `JsonNode`.
**Dependencies:** None.
| State | OS | Description |
| ------------------ |:-----------:| -----------:|
| :white_check_mark: | **Linux** | Works Ok |
| :white_check_mark: | **Os X** | Works Ok |
| :white_check_mark: | **Windows** | Works Ok |### Contributors:
- **Please Star this Repo on Github !**, it helps to show up faster on searchs.
- [Help](https://help.github.com/articles/using-pull-requests) and more [Help](https://help.github.com/articles/fork-a-repo) and Interactive Quick [Git Tutorial](https://try.github.io).
- English is the primary default spoken language, unless explicitly stated otherwise *(eg. Dont send Translation Pull Request)*
- Pull Requests for working passing unittests welcomed.### Licence:
- MIT.
### Ethics and Humanism Policy:
- Religions is not allowed. Contributing means you agree with the COC.