Appearance
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 (Coming soon on npm) โ
bash
npm install csmc-sdk
# or
yarn add csmc-sdk
๐ ๏ธ Quick Start โ
ts
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 โ
ts
await sdk.authorization.refreshToken();
๐ฐ Price Recommendations โ
ts
sdk.methods.priceRecommendations({
game_id: 730,
markets: ['bitskins'],
});
๐ Steam Analytics โ
ts
sdk.methods.steamAnalytics({
game_id: 730,
});
๐ Market Order Analytics โ
ts
sdk.methods.marketOrderAnalytics({
game_id: 730,
market_name: 'bitskins',
});
๐ Aggregated Min Prices โ
ts
sdk.methods.aggregatedMinPrices({
game_id: 730,
markets: ["waxpeer", "white-market"]
});
๐ Aggregated Max Orders โ
ts
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:
ts
import type { PriceRecommendationArgs } from 'csmc-sdk';
const args: PriceRecommendationArgs = {
game_id: 730,
markets: ['waxpeer'],
};