@csmc/sdk
v1.0.0
Published
SDK for accessing CSMC API endpoints
Downloads
7
Readme
CSMarketCap SDK
Official TypeScript SDK for CSMarketCap — a unified skin analytics API for CS2, Dota 2, Rust, and TF2.
🚀 Features
- 🔐 Token-based authentication with auto-refresh
- 📈 Price recommendations and Steam analytics
- 📊 Aggregated market data (min prices, max orders)
- 🧠 Built-in retry logic for expired tokens
- 🧪 Fully typed with JSDoc and TypeScript support
📦 Installation
npm install @csmc/sdk
# or
yarn add @csmc/sdk🛠️ Quick Start
import { Csmc } from 'csmc-sdk';
const sdk = new Csmc('your-api-key');
await sdk.initialize();
const prices = await sdk.methods.priceRecommendations({
game_id: 730,
markets: ['bitskins'],
});
console.log(prices);📚 API Overview
🔑 Authentication
await sdk.authorization.refreshToken();💰 Price Recommendations
sdk.methods.priceRecommendations({
game_id: 730,
markets: ['bitskins'],
});📊 Steam Analytics
sdk.methods.steamAnalytics({
game_id: 730,
});📈 Market Order Analytics
sdk.methods.marketOrderAnalytics({
game_id: 730,
market_name: 'bitskins',
});📉 Aggregated Min Prices
sdk.methods.aggregatedMinPrices({
game_id: 730,
markets: ["waxpeer", "white-market"]
});📉 Aggregated Min Prices in PriceEmpire format
sdk.methods.aggregatedMinPricesPriceEmpire({
app_id: 730,
sources: ["c5"]
});📈 Aggregated Max Orders
sdk.methods.aggregatedMaxOrders({
game_id: 730,
markets: ['bitskins'],
});🧩 Supported Games
CSGO (730)
DOTA2 (570)
RUST (252490)
TM2 (440)
📄 TypeScript Support
All methods are fully typed and documented with JSDoc. Example:
import type { PriceRecommendationArgs } from 'csmc-sdk';
const args: PriceRecommendationArgs = {
game_id: 730,
markets: ['waxpeer'],
};