This is unofficial livecoinwatch.com simple API Wrapper for javascript project written in typescript.
Create account and generate token at livecoinwatch.com and then
npm i livecoinwatch-wrapper-api
# using import
import { LiveCoinWatch } from '../../src/liveCoinWatch';
#using require
const {LiveCoinWatch} = require("livecoinwatch-wrapper-api")
const client = new LiveCoinWatch(TOKEN);
#example api call
let response = await client.getCredits();
let response = await client.getCoin('USD', 'CAKE');
let response = await client.getCoinList('USD', { limit: 2});
You need to create testConfig.json
first inside tests
folder before run the test. The file should look like this:
{
"testKey": "LIVECOINWATCH_TOKEN_FOR_TEST"
}
After the file created you could just run:
npm test
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#credits
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#fiatsall
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#overview
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#overviewhistory
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#coinssingle
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#coinssinglehistory
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#coinslist
Extra config value :
config: {
sort?: string;
order?: string;
offset?: number;
limit?: number;
meta?: boolean;
} | null = null
)
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#exchangessingle
Wrapper for endpoint https://livecoinwatch.github.io/lcw-api-docs/#exchangeslist
Extra config value :
config: {
sort?: string;
order?: string;
offset?: number;
limit?: number;
meta?: boolean;
} | null = null
)