AArtery
On this page

Adapter Contract

Every provider in Artery implements the same IPredictionMarketProvider interface (@artery/types). Capabilities (data / trade / stream / delegation) are declared per-provider and surfaced via GET /providers.

Wire format

All Endpoints return the native passthrough shape:

json{
  "native": {
    /* raw upstream JSON, unmodified */
  },
  "meta": {
    "provider": "polymarket",
    "fetchedAt": "2026-05-05T07:30:00.000Z",
    "source": "live"
  }
}
Tip

An upcoming release will add an optional normalized field on responses where semantics align across providers (e.g. binary YES/NO markets). The native shape is preserved indefinitely.

Capability matrix

Providerdatatradestreamdelegation
Polymarket (CLOB + Gamma)✅ (planned)EIP-712 + Safe Module
KalshiRSA private-key upload (KMS-encrypted)
Hyperliquid Perp + HIP-3EIP-712 approveAgent
Hyperliquid HIP-4EIP-712 approveAgent (USDH)
Hyperliquid DEX (HyperEVM)❌ (RPC limitation)Permit2 typed data

Two-implementation pattern

Each adapter has two implementations sharing one interface:

  • Live — calls upstream API directly via @artery/transport
  • IndexedDB — A future release will read from our own RPC node + indexer
tsconst polymarketAdapter = createPolymarketAdapter({
  source:
    ART_SOURCE === 'indexed'
      ? new IndexedPolymarketSource(redis, postgres) // indexed source (roadmap)
      : new LivePolymarketSource(transport), // live source
});

A single contract test suite (apps/api/test/contract/) runs against both implementations, guaranteeing equivalence at switchover.

Edit this page on GitHubLast updated
Adapter Contract · Artery API Docs