Installation
Copy
Ask AI
npm install @arbiter/sdk
Usage
Copy
Ask AI
import { ArbiterClient } from '@arbiter/sdk';
const client = new ArbiterClient({ apiKey: 'YOUR_API_KEY' });
// List markets
const markets = await client.markets.list({ limit: 10 });
// Search markets
const results = await client.markets.search('world cup', { minVolume: 100000 });
// Get market details
const market = await client.markets.get('poly_0x24fb...');
// Get current price
const price = await client.markets.price('poly_0x24fb...');
// Get historical price
const historicalPrice = await client.markets.price('poly_0x24fb...', { atTime: 1774300000 });
// Get orderbook
const book = await client.markets.orderbook('poly_0x24fb...');
// Get trades
const trades = await client.markets.trades('poly_0x24fb...', { limit: 50 });
// Get OHLCV candles
const candles = await client.markets.candles('poly_0x24fb...', {
interval: '1h',
startTs: Math.floor(Date.now() / 1000) - 86400,
});
// List events
const events = await client.events.list({ limit: 10 });
// Get event detail
const event = await client.events.get('2026-fifa-world-cup-winner-595');
Configuration
Copy
Ask AI
const client = new ArbiterClient({
apiKey: 'YOUR_API_KEY',
baseUrl: 'https://api.arbiterapi.com', // default
});