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

@pricempire/api

v1.2.0

Published

Official Node.js client for the Pricempire API

Readme

@pricempire/api — CS2 Skin Prices API Client for Node.js

npm version npm downloads license

The official Node.js / TypeScript client for the Pricempire API — real-time CS2 skin prices, Steam market data, price history, inventory valuation, and trading analytics aggregated from 40+ marketplaces (Buff163, Steam, Skinport, CSFloat, DMarket, and more).

Supports CS2 (Counter-Strike 2), Rust, TF2, and Dota 2 items.

Features

  • Real-time item prices from 40+ marketplaces in a single request
  • Historical price data (up to 180 days) for every tracked item
  • Steam inventory valuation with float values, stickers, and paint seeds
  • Cross-marketplace price comparison for arbitrage and trading
  • Market trends: trending and declining items, curated market insights
  • Portfolio tracking with transactions, P&L, and trading signals
  • Price alerts (above/below target price)
  • Marketplace ID mapping (Buff163, BuffMarket, YouPin/UUPin)
  • Full TypeScript types, promise-based API, works with ESM and CommonJS

Installation

npm install @pricempire/api
# or
pnpm add @pricempire/api
# or
yarn add @pricempire/api

Getting an API Key

Get your API key from the Pricempire API dashboard. Different subscription tiers unlock different endpoint groups:

| Client | Base path | Required tier | |--------|-----------|---------------| | client.free | /v4/free | Any valid API key | | client.v4 (paid) | /v4/paid | API subscription | | client.trader | /v4/trader | Trader subscription | | client.v3 (legacy) | /v3 | API subscription |

Price history (getPricesHistory) and the price feed (getPriceFeed) require an Enterprise subscription.

Quick Start

import { PricempireClient } from '@pricempire/api';

const client = new PricempireClient({
    apiKey: 'YOUR_API_KEY', // UUID v4 from pricempire.com/api
});

// Real-time prices from Buff163 and Steam
const prices = await client.v4.getPrices({
    currency: 'USD',
    sources: ['buff163', 'steam'],
    app_id: 730, // CS2
});

console.log(prices[0]);
// {
//   market_hash_name: 'AK-47 | Redline (Field-Tested)',
//   image: '/panorama/images/econ/...',
//   liquidity: 98,
//   count: 67690,
//   rank: 9698,
//   prices: [
//     { price: 3800, count: 169, updated_at: '...', provider_key: 'buff163' },
//     { price: 4100, count: 420, updated_at: '...', provider_key: 'steam' },
//   ]
// }

All prices are returned in cents (integer) unless documented otherwise.

Custom API root

const client = new PricempireClient({
    apiKey: 'YOUR_API_KEY',
    baseURL: 'https://api.pricempire.com', // default; version paths are appended automatically
});

API Reference

Paid API — client.v4

getPrices(options?)

Get all items with their current prices.

const prices = await client.v4.getPrices({
    currency: 'USD',              // any supported currency code
    sources: ['buff163', 'steam'],
    app_id: 730,                  // 730 CS2, 252490 Rust, 440 TF2, 570 Dota 2
    avg: true,                    // include avg_7 / avg_30 / avg_60 / avg_90
    median: true,                 // include median_7 / ... / median_90
    inflation_threshold: 30,      // flag inflated prices (percent)
    metas: ['liquidity', 'rank'], // extra metadata fields
    type: ['skin', 'sticker'],    // filter by item type
});

getPricesHistory(options) — Enterprise only

Historical prices, max 180-day range.

const history = await client.v4.getPricesHistory({
    app_id: 730,
    provider_key: 'buff163',
    currency: 'USD',
    from_date: '2026-01-01',
    to_date: '2026-06-30',
    market_hash_names: ['AK-47 | Redline (Field-Tested)'], // optional filter
});

// history.data => { 'AK-47 | Redline (Field-Tested)': { '1758644397': 2500, ... } }

getItems(options?)

Full item database with images, textures, collections, crates, rarity, and floats.

const items = await client.v4.getItems({ language: 'en' });

getItemMetas()

Trade volumes, ranks, market cap, and liquidity for every item.

const metas = await client.v4.getItemMetas();

getItemImages(app_id?)

Item image paths for the Pricempire CDN.

const images = await client.v4.getItemImages(730);
const url = `${images.cdn_url}${images.images['AK-47 | Redline (Field-Tested)'].cdn}`;

getInventory(options)

Steam inventory with per-item float values, stickers, and pricing.

const inventory = await client.v4.getInventory({
    steam_id: '76561198040698635',
    app_id: 730,
    force: false, // force refresh (allowed once per minute)
});

getComparison(options)

Cross-marketplace price comparison for arbitrage.

const comparison = await client.v4.getComparison({
    from_provider: 'steam',
    to_provider: 'buff163',
    app_id: 730,
    min_roi: 5,
    sort: 'roi:desc',
    page: 1,
});

getPriceFeed(options) — Enterprise only

Recent price update events (same format as the WebSocket feed). Use to catch up after a disconnect.

const feed = await client.v4.getPriceFeed({
    sources: ['buff163', 'skinport', 'csfloat'],
    since: Date.now() - 60_000, // max 5 minutes back
});

getMarketplaceIds(app_id?)

Buff163 / BuffMarket / YouPin item ID mapping.

const ids = await client.v4.getMarketplaceIds(730);

Free API — client.free

Available with any valid API key.

// Validate your key and check subscription status
const status = await client.free.getStatus();

// API + provider health
const serviceStatus = await client.free.getServiceStatus();

// Current usage and rate limits
const limits = await client.free.getLimits();

// Item search (max 20 results, min 3 characters)
const results = await client.free.search('AWP Asiimov');

// Supported currencies and exchange rates
const currencies = await client.free.getCurrencies();

Trader API — client.trader

Advanced trading features for Trader-tier subscribers.

Prices

// Prices limited to buff163 / skins-family providers
const prices = await client.trader.getPrices({
    sources: ['buff163'],
    currency: 'USD',
});

Price alerts

const alerts = await client.trader.getPriceAlerts();

const alert = await client.trader.createPriceAlert({
    asset_id: 12345,
    type: 'below',
    target_price: 30.0,
});

await client.trader.updatePriceAlert(alert.id, { target_price: 28.0 });
await client.trader.deletePriceAlert(alert.id);

Market trends

const trending = await client.trader.getTrending({ period: '7d', limit: 50 });
const declining = await client.trader.getDeclining({ period: '30d' });

Market insights

Curated item groups (e.g. "All Knives", "Covert Rifles") with aggregated price data.

const insights = await client.trader.getInsights({ sort: 'avg_change_7d', order: 'DESC' });
const knives = await client.trader.getInsight('all-knives');
const chart = await client.trader.getInsightChart('all-knives', { provider: 'buff163' });

Portfolios and transactions

const portfolio = await client.trader.createPortfolio({
    name: 'Long-term Holds',
    description: 'Knives and cases',
});

await client.trader.addTransaction(portfolio.slug, {
    asset_id: 12345,
    type: 'buy',
    quantity: 2,
    price: 32.5,
});

const details = await client.trader.getPortfolio(portfolio.slug);
const signals = await client.trader.getPortfolioSignals(portfolio.slug);
const backup = await client.trader.exportPortfolio(portfolio.slug);

Also available: getPortfolios(), updatePortfolio(id, ...), deletePortfolio(id), updateTransaction(slug, id, ...), deleteTransaction(slug, id).

Legacy V3 API — client.v3

Maintained for backward compatibility; prefer the V4 clients for new integrations.

const items = await client.v3.getAllItems({ currency: 'USD', sources: ['buff'] });
const inventory = await client.v3.getInventory({
    steamId: '76561198040698635',
    sources: ['buff'],
    currency: 'USD',
});

Also available: getBasicData(), getAdvancedData(), getPriceHistories(), getStructuredItems(), getItemIds(), getSelfInventory().

Error Handling

The client throws regular Error objects with actionable messages:

try {
    const prices = await client.v4.getPrices();
} catch (error) {
    // 'Invalid API key. For more information see: https://developers.pricempire.com/'
    // 'Access denied. Your subscription tier does not allow this endpoint.'
    // 'Rate limit exceeded'
    console.error(error.message);
}

Rate Limits

Rate limits depend on your subscription tier. Responses include standard headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1640995200

Check your current usage programmatically with client.free.getLimits().

TypeScript

The package ships full type definitions. All request options and key response shapes are exported:

import type {
    V4Options,
    ItemPriceResponse,
    V4PriceHistoryOptions,
    TraderPricesOptions,
    CreatePortfolioOptions,
} from '@pricempire/api';

Links

License

MIT © Pricempire