Quickstart
Get up and running with CollectIQ in under 5 minutes.
1Install the SDK
bash
npm install @collectiq/sdk2Get Your API Key
Go to Portal → API Keys and create a new key. Copy the secret — it's only shown once.
bash
export COLLECTIQ_API_KEY=ciq_live_...3Initialize the Client
typescript
import { createCollectIQ } from '@collectiq/sdk';
const ciq = createCollectIQ({
baseUrl: 'https://collectiqhq.com/api',
apiKey: process.env.COLLECTIQ_API_KEY,
});4Create a Buyer Request
typescript
const result = await ciq.buyerRequests.create({
product_name: 'Charizard Base Set Holo',
category: 'pokemon',
condition_preference: 'NM',
max_price: 350,
});
if (result.success) {
console.log('Created request:', result.data.id);
}5Run the Match Engine
typescript
const matches = await ciq.matchPacks.run({ dry_run: false });
if (matches.success) {
console.log(`Found ${matches.data.matches_found} matches`);
console.log(`Created ${matches.data.packs_created} match packs`);
}6Send an Offer
typescript
const offer = await ciq.offers.create({
buyer_request_id: '<request-id>',
inventory_item_id: '<item-id>',
amount: 299.99,
});
if (offer.success) {
console.log('Offer sent:', offer.data.id);
}