Getting Started
Installation
bash
npm install 100x-sdkQuick Start
Read-only (no credentials)
typescript
import { HundredX } from '100x-sdk';
const sdk = new HundredX({ brokerId: 1 });
// Public market data — no auth needed
const markets = await sdk.info.getMarkets();
const rate = await sdk.info.getFundingRate('ETH-USD');Full access (trading + deposits)
typescript
import { HundredX } from '100x-sdk';
// Create an authenticated SDK — registers automatically
const sdk = await HundredX.create({
privateKey: process.env.PRIVATE_KEY!,
brokerId: 1,
});
// Place an order
const order = await sdk.exchange.placeOrder({
marketId: 1,
isBuy: true,
amount: '1.0',
price: '2500.00',
orderType: 'LIMIT',
});
console.log('Order placed:', order);SDK Structure
sdk.exchange → Write operations (place/cancel orders, deposit/withdraw)
sdk.info → Read operations (orders, positions, markets, funding rates)
sdk.ws → WebSocket subscriptions (orderbook, trades, prices)Requirements
- Node.js >= 16.0.0
- An ETH private key for authentication
Next Steps
- Configuration — All config options
- Authentication — How auth works
- Exchange API — Place and cancel orders