npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

quidax-node-api

v1.0.0

Published

The Quidax Node API.

Downloads

24

Readme

Quidax Node Library

The Quidax Node library provides an easy access to the Quidax Developer API by Quidax.

 

Installation

Install node-client with npm

  npm i quidax-node-api

Documentation

See the Quidax API docs.

 

User: The Subaccounts API allows you create and manage subaccounts on your integration. Subaccounts can be used to generate crypto currency address, collect payments and track transaction status.

 

Creates sub user

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.users.create({
    email: '[email protected]',
    first_name: 'test',
    last_name: 'user' ,
    phone_number: '08012345678'
})

Fetch all sub account

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.users.getAllSubAccounts()

Fetch user details

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.users.getAccountDetails('<user_id>')

Edit sub account

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.users.editAccount('<user_id>',{
    email: '[email protected]',
    first_name: 'test',
    last_name: 'user' ,
    phone_number: '08012345678'
})

Markets: Fetch market data.

 

List all the markets

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.markets.listAllMarkets()

List all market tickers

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.markets.listMarketTickers()

Fetch a market ticker.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.markets.fetchMarketTicker('btcngn')

Fetch orderbook items market.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.markets.fetchOrderBookItemsForAMarket('btcngn', 5, 5)

Fetch market ticker depth.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.markets.fetchMarketTickerDepth('btcngn', 5)

Fetch k line data pending trades.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.markets.fetchKLineDataWithPendingTradesForAMarket('btcngn', 5, 10, "<timestamp>")

Wallets: Create wallets for user or sub-users.

 

Fetch all user wallets

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.wallets.fetchAllWallets('<user_id>')

Fetches currency wallet.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.wallets.fetchCurrencyWallet('<user_id>', 'btc')

Fetch payment addresses related to the wallet

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.wallets.fetchPaymentAddresses('<user_id>', 'btc')

Fetch payment address for a wallet.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.wallets.fetchPaymentAddress('<user_id>', 'btc')

Create payment address for a customer

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.wallets.createPaymentAddress('<user_id>', 'btc')

Fetch payment address by id.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.wallets.fetchPaymentAddressById('<user_id>', 'btc', '<address_id>')

Trade: Fetch trades of an asset.

 

Fetch trades of user.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.trade.trades('<user_id>')

Fetch recent trades for a given market pair.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.trade.fetchRecentTradesForMarketPair('btcngn')

Orders: Place trades on the orderbook.

 

Fetch orders of user.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.orders.getAllOrders('me', 'btcngn', 'accepted', 'desc')

Fetch order details.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.orders.getOrderDetails('<account_id>', '<order_id>')

Create a buy or sell order.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const payload = {
    market: "btcngn",
    side: "buy",
    ord_type: "limit",
    price: "1",
    volume: "0.1"
}

const data = quidax.orders.createBuyOrSellOrder(
    '<account_id>',
    payload
)

Cancel order.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.orders.cancelOrder('<account_id>', '<order_id>')

Deposits: This endpoint is used to fetch endpoints

 

Fetch orders of user.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.deposit.fetchAllDeposit('<account_id>', 'btc', 'accepted')

Fetch an order of user.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.deposit.fetchDeposit('<account_id>', '<deposit_id>')

InstantOrder: This endpoint is used to buy and sell crypto for an authenticated user.

 

Fetch all instantOrder of a user, filtered by user_id.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.instantOrder.fetchAllInstantOrders('<account_id>', 'btcngn', 'done', 'desc')

Fetch detail instantOrder of user.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.instantOrder.fetchInstantOrdersDetail('<account_id>', '<instantOrder_id>')

Requotes an instant order.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.instantOrder.requoteInstantOrder('<account_id>', '<instantOrder_id>')

Confirm an instant order.

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.instantOrder.confirmInstantOrder('<account_id>', '<instantOrder_id>')

Create an instant order(buy crypto from fiat).

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.instantOrder.createInstantOrder('<account_id>', {
    "bid": "ngn",
    "ask": "btc",
    "type": "buy",
    "total": "5",
    "unit": "ngn"
})

Create an instant order(sell crypto to fiat).

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.instantOrder.createInstantOrder('<account_id>', {
    "bid": "usdt",
    "ask": "bnb",
    "type": "buy",
    "volume": "0.2",
    "unit": "usdt"
})

Create an instant order(buy a fixed number of the asset, regardless of the price.).

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

const data = quidax.instantOrder.createInstantOrder('<account_id>', {
    "bid": "ngn",
    "ask": "btc",
    "type": "buy",
    "volume": "5",
    "unit": "btc"
}})

Quotes: This endpoint is useed to get current price of an asset.

 

const Quidax = require('quidax-node')

const quidax = new Quidax(secretKey)

// Get an estimate how much btc can be bought with the stipulated price.
const data1 = quidax.quotes.quote({
    market: "btcngn",
    unit: "ngn",
    kind: "bid",
    total: 2
})

// Get an estimate how much it would cost to buy btc with ngn.
const data2 = quidax.quotes.quote({
    market: "btcngn",
    unit: "btc",
    kind: "bid",
    volume: 2
})