cpay-exchange-node-api-sdk
v1.0.8
Published
Cpay Exchange REST API
Downloads
571
Readme
cpay-exchange-node-sdk
npm i cpay-exchange-node-api-sdk
import CpayExchangeSDK from 'cpay-exchange-node-api-sdk';
const ex = new CpayExchangeSDK({ apiKey: 'apiKey', redisUri?: 'string' })
Available Methods:
- Get list of exchanges
let options = {
search?: string;
sort?: string;
order?: string;
page?: number;
limit?: number;
}
const exList = await ex.getExchangesList(options);
- Get pairs by exchange
let options = {
search?: string;
sort?: string;
order?: string;
page?: number;
limit?: number;
}
const pairList = await ex.getExchangePairs(options);
- Convert currencies
let options = {
from: string;
to: string;
}
const convert = await ex.convertPairs(options);
- Get pair history by exchange
let options = {
symbol: string;
from: string;
to: string;
interval: string;
}
interval - Available values : hourly, daily, weekly, monthly;
from, to - Example : 2021-03-01 14:12:10
const history = await ex.getExhangePairHistory(options);