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

@satuchain/radar-sdk

v1.0.0

Published

Official JavaScript/TypeScript SDK for SatuDex Radar API — token prices, pairs, candles, trades

Readme

@satuchain/radar-sdk

Official JavaScript/TypeScript SDK for the SatuDex Radar API — real-time token prices, DEX pairs, OHLCV candles, and trades on SATUCHAIN and BNB Chain.

npm version License: MIT

Requirements

  • An API key from radar.satudex.com/account
  • Hold ≥ 10,000 STU on BNB Chain to generate a key
  • Node.js ≥ 18 (or any modern browser / edge runtime)

Installation

npm install @satuchain/radar-sdk

Quick Start

import { RadarClient } from "@satuchain/radar-sdk";

const radar = new RadarClient("sk-satu-your-api-key");

// List trending tokens on BNB Chain
const { data: tokens } = await radar.getTokens({ sort: "trending", chainId: 56 });
for (const t of tokens) {
  const icon = radar.iconUrl(t.token.image); // full URL to token logo
  console.log(t.token.symbol, t.price, icon);
}

// Get a single token with all pairs
const { data: token } = await radar.getToken("0xTOKEN_ADDRESS");
console.log(token.attributes.symbol);
console.log(token.relationships.topPair?.price);
console.log(radar.iconUrl(token.attributes.image)); // token logo URL

// OHLCV candles (1m / 5m / 1h / 4h / 1d)
const { data: candles } = await radar.getCandles("0xPAIR_ADDRESS", { tf: "1h", limit: 100 });
for (const c of candles) {
  console.log(new Date(c.time * 1000), c.open, c.high, c.low, c.close, c.volume);
}

// Recent trades
const { data: trades } = await radar.getTrades("0xPAIR_ADDRESS", { limit: 50 });
for (const trade of trades) {
  console.log(trade.side, trade.price, trade.volumeQuote);
}

// Token price
const { data: price } = await radar.getPrice("0xTOKEN_ADDRESS");
console.log(price.priceUsd);

Token Icons

Every token detail and list item includes an image field containing a relative path. Use radar.iconUrl() to get the full URL:

const { data: token } = await radar.getToken("0xADDRESS");
const iconUrl = radar.iconUrl(token.attributes.image);
// → "https://radar.satudex.com/uploads/tokens/satu/0x.../logo.png"

// Download the icon (no API key needed for /uploads/)
const img = await fetch(iconUrl);

For list items:

const { data: tokens } = await radar.getTokens({ chainId: 56 });
for (const t of tokens) {
  const iconUrl = radar.iconUrl(t.token.image);
  // use iconUrl in <img src={iconUrl} />
}

API Reference

new RadarClient(options)

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | required | Your API key (sk-satu-...) | | baseUrl | string | https://radar.satudex.com/api/v1 | API base URL | | timeout | number | 10000 | Request timeout in ms |

Methods

| Method | Description | |--------|-------------| | getTokens(opts?) | List tokens — sort, filter by chain/DEX/query | | getToken(address, opts?) | Single token detail + all pairs | | getPairs(opts?) | List all trading pairs (paginated) | | getTrades(pairAddress, opts?) | Recent trades for a pair | | getCandles(pairAddress, opts?) | OHLCV candles (1m/5m/1h/4h/1d) | | getPrice(tokenAddress, opts?) | Current USD price for a token | | iconUrl(relativePath) | Convert relative image path → full URL |

Sort Keys (getTokens)

| Key | Description | |-----|-------------| | trending | By boost score (default) | | gainers | Biggest 24h price gainers | | losers | Biggest 24h price losers | | volume | Highest 24h volume | | newest | Recently added | | top | Highest liquidity |

Chain IDs

| Chain | ID | |-------|----| | SATU Testnet | 17081945 | | BNB Chain | 56 |

DEX IDs (BNB Chain)

pancakeswap · biswap · apeswap · sushiswap · four.meme · uniswap

Error Handling

import { RadarClient, RadarAuthError, RadarRateLimitError } from "@satuchain/radar-sdk";

const radar = new RadarClient("sk-satu-...");

try {
  const { data } = await radar.getTokens();
} catch (err) {
  if (err instanceof RadarAuthError) {
    console.error("Invalid API key:", err.message);
  } else if (err instanceof RadarRateLimitError) {
    console.error(`Rate limited. Retry after ${err.retryAfter}s`);
  } else {
    console.error(err.message);
  }
}

| Error Class | HTTP | Description | |-------------|------|-------------| | RadarAuthError | 401 | Invalid/missing API key | | RadarForbiddenError | 403 | Insufficient STU balance | | RadarRateLimitError | 429 | Rate limit exceeded (.retryAfter in seconds) | | RadarUpstreamError | 5xx | Server error | | RadarError | — | Base error class |

Rate Limits

| Tier | Min. Hold | Limit | |------|-----------|-------| | Basic | 10,000 STU | 300 req/min | | Pro | 1,000,000 STU | 3,000 req/min |

Check remaining quota via radar.rateLimit after any request.

CommonJS

const { RadarClient } = require("@satuchain/radar-sdk");

Links

License

MIT © SATU TEAM