Pecunia Node.js API
Notice: This module and API is in early development and may change in the future.
Getting Started
Install the Pecunia NPM Package with:
npm i pecunia-api
Also, require the module in your Node.js application with:
const pecunia =
Using the API
Authentication
To authenticate with Pecunia, visit the Pecunia API Page and generate an API key. The key will be sent via email, once you've obtained it, throw it into a credentials object like the following:
// Pecunia Credentials Object, enter your Api_Key in the "key" pairconst creds = key: "xxxxx"
Supported Coins
An endpoint that gets an object containing the total Pecunia Listed coins, and an array of them.
pecunia
All Nodes
An endpoint that gets an array containing all nodes ran under the API key's account.
// Credentials object first, hosting platform secondpecunia
Single Node
An endpoint that gets a node specified by it's "nodeId".
// Credentials object first, hosting platform second, nodeId third for the specific node you want to viewpecunia
Example Node.js files can be found in the /examples
directory within the repository.