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

autonity-cax

v1.0.1

Published

The autonity-cax Library is a Node.js module for interacting with the Cax cryptocurrency exchange API. It provides a convenient way to manage API keys, access your cryptocurrency balances, execute trades, and more. Below you will find a comprehensive guid

Downloads

5

Readme

autonity-cax

The autonity-cax Library is a Node.js module for interacting with the Cax cryptocurrency exchange API. It provides a convenient way to manage API keys, access your cryptocurrency balances, execute trades, and more. Below you will find a comprehensive guide on how to install, configure, and use the autonity-cax library in your Node.js applications.

Installation

To install the autonity-cax Library, use the following command:

npm i autonity-cax

Usage

Before using the autonity-cax library, you must have a private key for an Ethereum wallet and optionally an existing Cax API key. If you do not have an API key, the library can generate one for you using your Ethereum private key.

Here is an example of how to use the autonity-cax library:

const Cax = require('autonity-cax');

// Initialize a new Cax instance with your Ethereum private key
const client = new Cax(YOUR_ETH_PRIVATE_KEY);

// Generate an API key if you don't have one
client.generateApiKey().then(apiKey => {
  console.log("Generated API Key:", apiKey);
});

// Retrieve balances for all symbols
client.getBalances().then(balances => {
  console.log("Balances:", balances);
});

// Retrieve trade history
client.getTradeHistory('ATN-USD').then(tradeHistory => {
  console.log("Trade History for ATN-USD:", tradeHistory);
});

API Reference

The autonity-cax library provides the following methods to interact with the exchange:

constructor(privateKey, apiKey)

Creates a new instance of the Cax client.

convertToISO8601(dateString)

Converts a date string to ISO 8601 format.

updateApiKey(apiKey)

Updates the client instance with a new API key.

generateApiKey()

Generates a new API key from the Cax API using a signed nonce.

getBalances(symbol)

Retrieves balances for a specified currency symbol or all symbols if none is provided.

getDeposits(startTime, endTime, symbol)

Fetches deposit records within a specified time range and for a given symbol.

getDepositInfo(txId)

Fetches detailed information for a specific deposit using its transaction ID.

getRefunds(startTime, endTime, symbol)

Retrieves refund records within a specified time range for a given symbol.

getRefundInfo(txId)

Fetches detailed information about a specific refund transaction.

getWithdraws(status, startTime, endTime, symbol)

Retrieves withdrawals matching the given criteria.

requestWithdraw(payload)

Submits a withdrawal request with the specified details.

getWithdrawInfo(txId)

Fetches detailed information about a specific withdrawal transaction.

getOrderbooks()

Retrieves the current order book data from the API.

getOrderbookInfo(pair)

Retrieves order book data for a specific trading pair.

getOrderbookDepth(pair)

Fetches the depth of the order book for a specific trading pair.

getOrderbookQuote(pair)

Fetches the latest quote for a specific trading pair.

getTradeHistory(pair, date)

Retrieves trade history for a given trading pair, with optional date filtering.

getExchangeStatus()

Fetches the current operational status of the exchange.

getSymbols()

Retrieves the list of all trading pairs available on the exchange.

getSymbolsInfo(name)

Fetches detailed information for a specific trading pair.

getOrders(status, startTime, endTime, pair)

Retrieves orders based on the provided criteria.

submitLimitOrder(payload)

Submits a new limit order with the provided details.

getOrderInfo(orderId)

Fetches detailed information about a specific order.

cancelOrder(orderId)

Cancels an existing order using its ID.

getTrades(startTime, endTime, pair, orderId)

Retrieves trade data based on provided filters.

getTradeInfo(tradeId)

Fetches detailed information for a specific trade.

References

For more detailed information about the Cax API and additional documentation on its endpoints and features, visit the official Cax API documentation:

Make sure to replace YOUR_ETH_PRIVATE_KEY with your actual Ethereum private key.

Security Note: Always keep your private keys and API keys secure. Do not expose them in your code or check them into version control.