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

bloxchaser-sdk

v0.1.0

Published

Official JavaScript/TypeScript SDK for Bloxchaser DEX Data API

Readme

bloxchaser-sdk

Official JavaScript/TypeScript SDK for Bloxchaser - Multi-chain DEX swap data API.

Installation

npm install bloxchaser-sdk
# or
pnpm add bloxchaser-sdk
# or
yarn add bloxchaser-sdk

Quick Start

import { Bloxchaser } from 'bloxchaser-sdk';

const client = new Bloxchaser({ apiKey: 'bc_live_your_key' });

// Get recent Solana swaps
const swaps = await client.swaps.get({ chain: 'solana', limit: 100 });
console.log(`Found ${swaps.count} swaps`);

// Get OHLCV for BONK
const ohlcv = await client.swaps.ohlcv(
  'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263',
  { interval: '4h' }
);

for (const candle of ohlcv.candles.slice(0, 5)) {
  console.log(`${candle.datetime}: ${candle.close}`);
}

Features

  • Full TypeScript support with complete type definitions
  • Works everywhere: Node.js 18+ and modern browsers
  • Automatic retry with exponential backoff
  • Rate limit handling with smart throttling
  • Multi-chain support: Solana, Base, Arbitrum, BNB

API Reference

Swaps

// Get recent swaps
const swaps = await client.swaps.get({
  chain: 'solana',     // 'solana' | 'base' | 'arbitrum' | 'bnb'
  dex: 'raydium',      // optional DEX filter
  limit: 100,
  offset: 0,
});

// Swaps by token
const tokenSwaps = await client.swaps.byToken('So111...', { chain: 'solana' });

// Swaps by pool
const poolSwaps = await client.swaps.byPool('7Xawh...', { chain: 'solana' });

// Chain statistics
const stats = await client.swaps.stats('solana');

// All chains summary
const summary = await client.swaps.chains();

// OHLCV candles (Solana)
const ohlcv = await client.swaps.ohlcv('DezXAZ...', {
  quote: 'sol',        // 'sol' | 'usdc' | 'usdt'
  interval: '4h',      // '1m' | '5m' | '15m' | '1h' | '4h' | '1d'
  limit: 100,
});

Tokens (Solana)

// List tokens
const tokens = await client.tokens.list({ limit: 100 });

// Get token info
const token = await client.tokens.get('DezXAZ...');

// Get current price
const price = await client.tokens.price('DezXAZ...');

// Price history
const history = await client.tokens.priceHistory('DezXAZ...', { limit: 60 });

Quotes

// Get swap quote
const quote = await client.quotes.get({
  pool: '7Xawh...',
  amount: 1_000_000_000,  // 1 SOL in lamports
  inputToken: 'So111...',
  chain: 'solana',
});

console.log(`Output: ${quote.output_amount}, Impact: ${quote.price_impact}`);

Health & Usage

// Check API health
const health = await client.health();
console.log(`Status: ${health.status}, Version: ${health.version}`);

// Get your usage stats
const usage = await client.usage();
console.log(`Requests today: ${usage.requests_today}/${usage.monthly_quota}`);

Error Handling

import {
  Bloxchaser,
  AuthenticationError,
  RateLimitError,
  APIError,
} from 'bloxchaser-sdk';

try {
  const client = new Bloxchaser({ apiKey: 'invalid_key' });
  await client.swaps.get();
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.log('Invalid API key');
  } else if (error instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${error.retryAfter}s`);
  } else if (error instanceof APIError) {
    console.log(`API error: [${error.code}] ${error.message}`);
  }
}

Browser Usage

The SDK works in modern browsers. Use a bundler like Vite, webpack, or esbuild:

import { Bloxchaser } from 'bloxchaser-sdk';

// Works in browser!
const client = new Bloxchaser({ apiKey: 'bc_live_your_key' });

Get an API Key

  1. Visit bloxchaser.com/signup
  2. Enter your email
  3. Save your API key (shown only once!)

Links

License

MIT