pionex
v1.0.2
Published
Pionex API Client
Downloads
9
Readme
Pionex API Client
Website: https://pionex.com
This module supports both public and private methods using websocket and restful API endpoints. This client is maintained using the official documentation: https://pionex-doc.gitbook.io/apidocs/restful/general/basic
Quick start
Execute npm i pionex
Create your app.js
import { PionexClient } from 'pionex'
let pionex = new PionexClient()
pionex.on('trade', async (data) => {
console.log('Orderbook:', data)
})
pionex.on('order', async (data) => {
console.log('You just opened this order:', data)
})
pionex.connect('<YOUR_API_KEY_HERE>', '<YOUR_API_SECRET_HERE>').then(async () => {
await pionex.subscribeTrade('BTC_USDT')
console.log('Subscribed to the BTC/USDT\'s orderbook.')
console.log('Your balances are:',
await pionex.getBalances())
console.log('Symbol informations on BTCUSDT and SOLUSDT:',
await pionex.getSymbols('BTC_USDT', 'SOL_USDT'))
})
Run your script using node app