Skip to main content
Developer Platform

Build on the trade engine

Type-safe SDK, REST API, signed webhooks with replay, embeddable widgets, and starter kits. Everything you need to build collectibles commerce.

$ npm install @collectiq/sdk
169
API endpoints
10
SDK service clients
20+
Webhook event types
3
Starter kits

Type-safe SDK

Full TypeScript client with autocomplete for every endpoint. Capture demand, run the match engine, and execute trades — all from a single import.

.buyerRequestsCapture and manage demand signals
.inventoryCRUD for seller inventory items
.matchPacksRun and inspect match engine results
.secureTradesFull trade lifecycle management
.offersNegotiate offers between parties
.holdsReserve intents with deposits and expiry
.liveSessionsReal-time live commerce sessions
.webhooksSubscribe, manage, and test webhooks
.automationsCreate rules for automatic actions
.tradeGraphDemand, supply, pricing, and routing intelligence
sdk-example.tstypescript
import { createCollectIQ } from '@collectiq/sdk';

const ciq = createCollectIQ({
  apiKey: process.env.COLLECTIQ_API_KEY!,
  baseUrl: 'https://app.collectiqhq.com/api/v1',
});

// Create a buyer request (demand signal)
const request = await ciq.buyerRequests.create({
  cardName: 'Charizard Base Set',
  setName: 'Base Set',
  condition: 'near_mint',
  maxPrice: 350,
});

// Run the match engine
const matches = await ciq.matchPacks.run({
  buyerRequestId: request.id,
});

// Execute a trade
const trade = await ciq.secureTrades.create({
  matchId: matches[0].id,
});
webhooks.tstypescript
import { verifyWebhookSignature } from '@collectiq/sdk/webhooks';

app.post('/webhooks', (req, res) => {
  const event = verifyWebhookSignature(
    req.body,
    req.headers['x-collectiq-signature'],
    process.env.COLLECTIQ_WEBHOOK_SECRET!
  );

  switch (event.type) {
    case 'match.created':
      // A new match was found
      notifyBuyer(event.data.buyerRequestId);
      break;
    case 'trade.status_changed':
      // Trade progressed (shipped, delivered, settled)
      updateOrderStatus(event.data.tradeId, event.data.status);
      break;
    case 'trust.score_updated':
      // Seller trust score changed
      refreshBadge(event.data.sellerId);
      break;
  }

  res.json({ received: true });
});

Signed webhooks with replay

Every webhook delivery is HMAC-signed and tracked. Failed deliveries are automatically retried with exponential backoff. Replay any event from the Reliability Center for debugging.

  • 20+ event types covering the full trade lifecycle
  • HMAC-SHA256 signature verification built into the SDK
  • Delivery tracking with success/failure history
  • One-click replay from the portal Reliability Center
  • Filter by event type, status, and date range
Webhook documentation →

Verifiable trust credentials

Every TrustGraph score is backed by an Ed25519-signed credential following the W3C Verifiable Credentials model. Fetch it, verify the signature, and confirm the score independently — no API key required.

  • Ed25519 signatures — tamper-evident and independently verifiable
  • Public key endpoint for zero-trust verification
  • SHA-256 inputs hash — proves what data was used
  • Revocation registry — expired or flagged credentials are invalidated
  • Embeddable SVG badges link to /verify/trust/[slug]
TrustGraph documentation →
verify-trust.tstypescript
// Verify a trust credential independently
const res = await fetch(
  'https://collectiqhq.com/api/v1/trust/credential/acme-cards'
);
const credential = await res.json();

// Fetch public key
const keyRes = await fetch(
  'https://collectiqhq.com/api/v1/trust/public-key'
);
const { publicKey } = await keyRes.json();

// Verify signature using Ed25519
const isValid = await crypto.subtle.verify(
  'Ed25519', publicKey,
  base64url.decode(credential.proof.jws),
  new TextEncoder().encode(
    JSON.stringify(credential.credentialSubject)
  )
);
// isValid === true → trust score is tamper-evident
ingest-request.tstypescript
// Capture a buyer request via API
const request = await fetch(
  'https://app.collectiqhq.com/api/v1/buyer-requests',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      cardName: 'Mike Trout',
      setName: '2020 Topps Chrome',
      condition: 'psa_9',
      maxPrice: 500,
      source: 'api',
    }),
  }
);
const { id, matchCount } = await request.json();
// matchCount > 0 → instant matches found

Request ingestion API

Capture buyer demand from any surface — your website, mobile app, POS integration, or automated pipeline. Each request is immediately checked against inventory and returns an instant match count.

POST /buyer-requestsCreate a demand signal from any source
POST /ingestion/sessionsCreate intake sessions for batch supply
POST /.../itemsAdd items with real-time normalization
POST /.../pushPush to live inventory + trigger matching

Embeddable widgets & badges

Drop a want-list intake form on any website with one script tag. Embed dynamic TrustGraph badges on eBay listings, forums, and social profiles — every badge links back to your verified trust profile.

embed.htmlhtml
<!-- Embed a want-list intake form on any site -->
<script
  src="https://app.collectiqhq.com/widget.js"
  data-seller="your-slug"
  data-theme="dark"
  async
></script>

<!-- Or embed a trust badge -->
<img
  src="https://collectiqhq.com/api/embed/trust-badge/your-slug"
  alt="CollectIQ Verified"
  height="48"
/>

Starter kits

Clone, configure, deploy. Production-ready templates for common integration patterns.

Trade App Starter

Full-stack Next.js app with SDK integration, auth, and trade UI.

Next.jsTypeScriptTailwind
View on GitHub

Seller Dashboard

React + Vite dashboard for inventory management and trade monitoring.

ReactViteTypeScript
View on GitHub

Webhook Consumer

Production-ready Express server for processing CollectIQ webhook events.

ExpressNode.jsTypeScript
View on GitHub

TradeGraph Intelligence API

Real-time market intelligence for collectibles. Demand clusters, supply health, pricing anomalies, and optimal execution routing — all with full explainability so you can show why every recommendation was made.

/tradegraph/summaryDemand clusters, velocity, trends, missed-demand
/tradegraph/supplyFreshness, stale capital, saturation, sell-through
/tradegraph/pricingPrice bands, anomaly detection, dispersion scoring
/tradegraph/routingBest execution actions with EV and confidence
Full API reference →
tradegraph-example.tstypescript
// Fetch real-time pricing intelligence
const pricing = await ciq.tradeGraph.pricing({
  windowDays: 30,
});

// Anomaly detection
pricing.anomalies.forEach((a) => {
  console.log(a.itemName, a.direction, a.severity);
  // "Charizard Base Set" "above" "high"

Start building today

Get an API key in 30 seconds. The SDK handles auth, retries, and type safety.