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 🙏

© 2026 – Pkg Stats / Ryan Hefner

quidax-node

v3.1.2

Published

A fully-typed, robust Node.js SDK for the [Quidax v3.0 API](https://docs.quidax.io/v3.0/reference). This SDK seamlessly integrates with both the Quidax Exchange APIs and the Quidax Ramp/Custodial APIs.

Readme

Quidax Node.js SDK

A fully-typed, robust Node.js SDK for the Quidax v3.0 API. This SDK seamlessly integrates with both the Quidax Exchange APIs and the Quidax Ramp/Custodial APIs.

Installation

npm install quidax-node

Initialization

Initialize the Quidax client with your Secret Key:

import { Quidax } from 'quidax-node';

const quidax = new Quidax({
  secretKey: 's_your_quidax_secret_key' // Keep this secure!
});

Advanced Configuration

You can optionally pass custom Base URLs or adjust the timeout limit (default is 30,000ms).

const quidax = new Quidax({
  secretKey: 's_your_quidax_secret_key',
  exchangeBaseURL: 'https://openapi.quidax.io/exchange-open-api/api/v1',
  rampBaseURL: 'https://ramp-be.quidax.io/api/v1',
  timeout: 10000 
});

Usage Examples

The SDK is organized into intuitive, feature-based modules.

1. User Accounts

Manage parent and sub-accounts.

// Fetch parent account details
const parentAccount = await quidax.users.getParentAccount();

// Create a sub-account
const subAccount = await quidax.users.create({
    email: '[email protected]',
    first_name: 'John',
    last_name: 'Doe'
});

2. Wallets & Addresses

Manage cryptocurrency wallets and generate payment addresses.

// Fetch all wallets for a specific user
const wallets = await quidax.wallets.getAll('user_id');

// Generate a payment address for a specific currency
const address = await quidax.wallets.createPaymentAddress('user_id', 'btc');

3. Markets & Tickers

Get real-time market data.

// Get order book for a specific market pair (e.g. BTC to NGN)
const orderBook = await quidax.markets.getOrderBook('btcngn');

// Get a specific market ticker
const ticker = await quidax.markets.getTicker('btcngn');

4. Withdrawals & Deposits

Track deposits and process withdrawals.

// Fetch all deposits for a user
const deposits = await quidax.deposits.getAll('user_id');

// Process a crypto withdrawal
const withdrawal = await quidax.withdrawals.create('user_id', {
    currency: 'btc',
    amount: '0.5',
    fund_uid: 'fund_id_here'
});

5. Instant Swaps

Process crypto-to-crypto instant swaps.

// Generate a swap quotation
const quotation = await quidax.swap.getQuotation('user_id', {
    source_currency: 'btc',
    destination_currency: 'usdt',
    amount: '1.5',
    type: 'source'
});

// Confirm the quotation
const swap = await quidax.swap.confirm('user_id', 'quotation_id_here');

6. Ramp & Custodial

Interact with the fiat on-ramp and off-ramp services.

// Get available payment methods
const methods = await quidax.ramp.getPaymentMethods();

// Get a Buy Quote (Fiat to Crypto)
const quote = await quidax.ramp.getBuyQuote({
  fiat: 'ngn',
  crypto: 'usdt',
  amount: '50000'
});

Error Handling

This SDK features a gracefully integrated error handling system. Instead of fighting with raw HTTP exceptions or nested Axios errors, the SDK automatically parses the payload returned by Quidax and throws a strongly-typed QuidaxError.

import { Quidax, QuidaxError } from 'quidax-node';

async function processPayment() {
  try {
    const address = await quidax.wallets.createPaymentAddress('invalid_user', 'btc');
  } catch (error) {
    if (error instanceof QuidaxError) {
      console.error(`HTTP Status: ${error.statusCode}`); // e.g., 400 or 401
      console.error(`Quidax Status: ${error.status}`);   // e.g., "error" or "failed"
      console.error(`Message: ${error.message}`);        // e.g., "Validation failed"
      
      // If Quidax sends specific field validation errors, they will be here:
      console.error(`Validation Details:`, error.data);  
    } else {
      // Handle generic errors (e.g., network failure, timeouts)
      console.error('An unexpected error occurred:', error);
    }
  }
}

TypeScript Support

This project is written entirely in TypeScript and compiled using tsup.

  • It natively supports both CommonJS (require) and ESModules (import).
  • It ships with comprehensive .d.ts type definitions out of the box, meaning you get full autocomplete for standard types like Wallet, PaymentAddress, Trade, Order, etc.

License

MIT