ZipToken

API Documentation

Complete REST API reference for the ZipToken platform. Trading and funding are available to accredited investors and institutional participants only.

Base URL:https://api.ziptoken.io

Authentication

All API requests require a Bearer token in the Authorization header. Create API keys in the Institutional > Trading API section.

bash
curl https://api.ziptoken.io/api/kyc/status \
  -H "Authorization: Bearer YOUR_API_KEY"

KYC

Identity verification and compliance endpoints.

POST/api/kyc/inquiry

Create a new KYC verification inquiry.

Request Body

NameType
tier*'basic' | 'enhanced' | 'institutional'

Response

json
{
  "data": {
    "status": "pending",
    "tier": "basic",
    "sanctionsCleared": false,
    "pepScreened": false,
    "adverseMediaCleared": false,
    "countryCode": null,
    "expiresAt": null,
    "limits": null
  }
}
bash
curl -X POST https://api.ziptoken.io/api/kyc/inquiry \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"tier": "basic"}'
GET/api/kyc/status

Get current KYC verification status.

Response

json
{
  "data": {
    "status": "approved",
    "tier": "enhanced",
    "sanctionsCleared": true,
    "pepScreened": true,
    "adverseMediaCleared": true,
    "countryCode": "US",
    "expiresAt": 1735689600,
    "limits": {
      "maxPosition": 100000,
      "maxDaily": 50000,
      "maxTotal": 500000
    }
  }
}
bash
curl https://api.ziptoken.io/api/kyc/status \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/kyc/limits

Get position and trading limits for the current KYC tier.

Response

json
{
  "data": {
    "maxPosition": 100000,
    "maxDaily": 50000,
    "maxTotal": 500000
  }
}
bash
curl https://api.ziptoken.io/api/kyc/limits \
  -H "Authorization: Bearer YOUR_API_KEY"

Trading

Programmatic order placement and management.

POST/api/trading/keys

Create a new API key for programmatic access.

Request Body

NameType
label*string
permissions*string[]
rateLimitnumber
expiresInDaysnumber

Response

json
{
  "data": {
    "id": "key_abc123",
    "label": "Trading Bot",
    "prefix": "zt_live_abc",
    "permissions": ["read:markets", "create:orders"],
    "rateLimit": 120,
    "createdAt": 1700000000,
    "lastUsed": null,
    "expiresAt": null,
    "secret": "zt_live_abc...full_secret"
  }
}
bash
curl -X POST https://api.ziptoken.io/api/trading/keys \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"label": "Trading Bot", "permissions": ["read:markets", "create:orders"]}'
GET/api/trading/keys

List all API keys for the account.

Response

json
{
  "data": [
    {
      "id": "key_abc123",
      "label": "Trading Bot",
      "prefix": "zt_live_abc",
      "permissions": ["read:markets", "create:orders"],
      "rateLimit": 120,
      "createdAt": 1700000000,
      "lastUsed": 1700100000,
      "expiresAt": null
    }
  ]
}
bash
curl https://api.ziptoken.io/api/trading/keys \
  -H "Authorization: Bearer YOUR_API_KEY"
DELETE/api/trading/keys/:keyId

Revoke an API key. This action is irreversible.

Path Parameters

NameType
keyId*string

Response

json
{
  "data": { "success": true }
}
bash
curl -X DELETE https://api.ziptoken.io/api/trading/keys/key_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/api/trading/orders

Place a single order on an index-settled contract.

Request Body

NameType
marketId*string
outcomeIndex*number
side*'BUY' | 'SELL'
amount*string
price*number
expirynumber

Response

json
{
  "data": {
    "id": "order_xyz",
    "maker": "0xuser...addr",
    "marketId": "mkt_10025_price",
    "outcomeIndex": 0,
    "side": "BUY",
    "amount": "100.00",
    "price": 0.65,
    "status": "OPEN",
    "filledAmount": "0",
    "expiry": 0,
    "createdAt": 1700000000
  }
}
bash
curl -X POST https://api.ziptoken.io/api/trading/orders \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"marketId": "mkt_10025_price", "outcomeIndex": 0, "side": "BUY", "amount": "100.00", "price": 0.65}'
POST/api/trading/orders/batch

Place multiple orders in a single atomic request.

Request Body

NameType
orders*Order[]

Response

json
{
  "data": [
    { "id": "order_1", "status": "OPEN", ... },
    { "id": "order_2", "status": "OPEN", ... }
  ]
}
bash
curl -X POST https://api.ziptoken.io/api/trading/orders/batch \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"orders": [
    {"marketId": "mkt_10025_price", "outcomeIndex": 0, "side": "BUY", "amount": "50", "price": 0.60},
    {"marketId": "mkt_10036_price", "outcomeIndex": 1, "side": "BUY", "amount": "50", "price": 0.40}
  ]}'
DELETE/api/trading/orders/:orderId

Cancel a single open order.

Path Parameters

NameType
orderId*string

Response

json
{
  "data": { "success": true }
}
bash
curl -X DELETE https://api.ziptoken.io/api/trading/orders/order_xyz \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/api/trading/orders/cancel-all

Cancel all open orders, optionally filtered by market.

Request Body

NameType
marketIdstring

Response

json
{
  "data": { "cancelledCount": 5 }
}
bash
curl -X POST https://api.ziptoken.io/api/trading/orders/cancel-all \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"marketId": "mkt_10025_price"}'

Audit

Tamper-evident, hash-chained audit trail with integrity verification.

GET/api/audit/logs

Retrieve audit log entries with optional filters.

Query Parameters

NameType
userIdstring
actionstring
severity'info' | 'warning' | 'critical'
limitnumber
offsetnumber

Response

json
{
  "data": [
    {
      "id": "audit_001",
      "action": "order.placed",
      "userId": "user_abc",
      "severity": "info",
      "resource": "order_xyz",
      "details": { "marketId": "mkt_10025_price", "amount": "100.00" },
      "success": true,
      "timestamp": 1700000000,
      "hash": "sha256...",
      "previousHash": "sha256..."
    }
  ]
}
bash
curl "https://api.ziptoken.io/api/audit/logs?severity=critical&limit=50" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/audit/stats

Get aggregated audit statistics.

Query Parameters

NameType
startTimenumber
endTimenumber

Response

json
{
  "data": {
    "totalEvents": 12450,
    "byAction": { "order.placed": 8200, "order.cancelled": 1100, ... },
    "bySeverity": { "info": 11000, "warning": 1200, "critical": 250 },
    "timeRange": { "start": 1699000000, "end": 1700000000 }
  }
}
bash
curl "https://api.ziptoken.io/api/audit/stats?startTime=1699000000" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/audit/verify

Verify the integrity of the audit hash chain.

Response

json
{
  "data": {
    "valid": true,
    "totalEntries": 12450,
    "checkedAt": 1700000000
  }
}
bash
curl https://api.ziptoken.io/api/audit/verify \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/audit/export

Export audit logs for regulatory reporting.

Query Parameters

NameType
startTimenumber
endTimenumber

Response

json
{
  "data": [ ...AuditEntry[] ]
}
bash
curl "https://api.ziptoken.io/api/audit/export?startTime=1699000000&endTime=1700000000" \
  -H "Authorization: Bearer YOUR_API_KEY"

Liquidity

Position limits, margin health, and fee estimation.

GET/api/liquidity/tiers

List all liquidity tiers.

Response

json
{
  "data": [
    {
      "tier": "standard",
      "maxPositionSize": 10000,
      "maxDailyVolume": 50000,
      "maxOpenPositions": 20,
      "marginRequirement": 0.1,
      "tradingFee": 0.01
    }
  ]
}
bash
curl https://api.ziptoken.io/api/liquidity/tiers \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/liquidity/tiers/:tier

Get a specific liquidity tier.

Path Parameters

NameType
tier*string

Response

json
{
  "data": {
    "tier": "institutional",
    "maxPositionSize": 1000000,
    "maxDailyVolume": 5000000,
    "maxOpenPositions": 500,
    "marginRequirement": 0.05,
    "tradingFee": 0.005
  }
}
bash
curl https://api.ziptoken.io/api/liquidity/tiers/institutional \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/liquidity/requirements/:metricType

Get liquidity requirements for a metric type.

Path Parameters

NameType
metricType*string

Response

json
{
  "data": {
    "minLiquidity": 5000,
    "minProviders": 3,
    "spreadMax": 0.05
  }
}
bash
curl https://api.ziptoken.io/api/liquidity/requirements/zhvi \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/api/liquidity/validate-position

Check if a position size is valid for a market.

Request Body

NameType
positionSize*number
marketId*string

Response

json
{
  "data": {
    "valid": true,
    "reason": null
  }
}
bash
curl -X POST https://api.ziptoken.io/api/liquidity/validate-position \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"positionSize": 5000, "marketId": "mkt_10025_price"}'
GET/api/liquidity/margin-health

Get current margin health for the account.

Response

json
{
  "data": {
    "collateralBalance": "100000.00",
    "totalExposure": "45000.00",
    "marginHealth": 0.85,
    "frozen": false,
    "healthStatus": "healthy"
  }
}
bash
curl https://api.ziptoken.io/api/liquidity/margin-health \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/liquidity/fee-estimate

Estimate trading fees for a given amount and tier.

Query Parameters

NameType
amount*number
tier*string

Response

json
{
  "data": {
    "fee": 1.00,
    "netAmount": 99.00,
    "amount": 100,
    "tier": "standard",
    "feePercent": "1.00%"
  }
}
bash
curl "https://api.ziptoken.io/api/liquidity/fee-estimate?amount=100&tier=standard" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/liquidity/alerts

Get liquidity and margin alerts.

Query Parameters

NameType
limitnumber

Response

json
{
  "data": [
    {
      "id": "alert_001",
      "type": "margin_warning",
      "message": "Margin health dropped below 50%",
      "timestamp": 1700000000
    }
  ]
}
bash
curl "https://api.ziptoken.io/api/liquidity/alerts?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Public Data API (Agents)

Read-only data plane for AI agents, scripts, and other programmatic consumers: live index values, index markets, resolutions, geo search, and reference quotes. No wallet or KYC required -- a separate, optionally-authenticated surface from the Trading API above.

Every route below accepts an optional x-api-key header (PublicApiKeyAuth in the OpenAPI spec). Omitting it still works -- requests fall back to the unauthenticated tier (a global per-IP rate limit); passing a key just raises your limit.

Keys are issued today via an admin-guarded endpoint (see "Create a public API key" below), gated by an x-admin-secret header held by the ZipToken team -- email api@ziptoken.io for one. Self-serve key creation is planned but has not shipped yet.

Index values are derived from Zillow ZHVI data under license. Every response that carries a value includes attribution: "Data from Zillow" -- keep that string attached wherever you relay the number downstream; it is a license requirement, not decoration.

This page is hand-maintained for readability. The live, always-current reference (with a Swagger UI you can call directly from the browser) is served at /api/docs, with the raw spec at /api/docs/openapi.json.

GET/api/index/:nodeId

Live index value for one geo node, derived from first-print ZHVI observations (up to 24 months of history).

Path Parameters

NameType
nodeId*string

Response

json
{
  "success": true,
  "data": {
    "nodeId": "state:TX",
    "value": 312400,
    "yoy": 4.9,
    "asOfMonth": "2026-05",
    "series": [
      { "month": "2026-04", "value": 309800 },
      { "month": "2026-05", "value": 312400 }
    ],
    "source": "zhvi_first_print",
    "attribution": "Data from Zillow"
  }
}
bash
curl https://api.ziptoken.io/api/index/state:TX \
  -H "x-api-key: YOUR_KEY"   # optional
GET/api/index

Bulk-get index values for up to 50 node ids in one call. Unknown ids are reported separately rather than failing the whole request.

Query Parameters

NameType
ids*string

Response

json
{
  "success": true,
  "data": [
    {
      "nodeId": "state:NY",
      "value": 481200,
      "yoy": 3.1,
      "asOfMonth": "2026-05",
      "series": [ { "month": "2026-04", "value": 479600 }, { "month": "2026-05", "value": 481200 } ],
      "source": "zhvi_first_print",
      "attribution": "Data from Zillow"
    },
    {
      "nodeId": "zip:11215",
      "value": 968500,
      "yoy": 2.4,
      "asOfMonth": "2026-05",
      "series": [ { "month": "2026-04", "value": 964900 }, { "month": "2026-05", "value": 968500 } ],
      "source": "zhvi_first_print",
      "attribution": "Data from Zillow"
    }
  ],
  "unknownIds": ["county:99999"]
}
bash
curl "https://api.ziptoken.io/api/index?ids=state:NY,zip:11215,county:99999"
GET/api/markets

List markets with filters, paginated.

Query Parameters

NameType
zipstring
level'state' | 'county' | 'city' | 'neighborhood' | 'zip'
statestring
status'ACTIVE' | 'PAUSED' | 'RESOLVED' | 'CANCELLED' | 'FINALIZED'
pagenumber
limitnumber

Response

json
{
  "success": true,
  "data": [
    {
      "id": "clx7f3k9p0000qzrm4h2b8v1n",
      "frontendId": "mkt-006",
      "onChainMarketId": "mkt-006",
      "conditionId": "0x9f2c1a...",
      "zipCode": "33101",
      "marketType": "BINARY",
      "status": "ACTIVE",
      "geoNodeId": "county:12086",
      "questionId": "county:12086",
      "outcomeCount": 2,
      "resolutionTimestamp": "2026-12-31T00:00:00.000Z",
      "description": "Miami-Dade County (FL) ZHVI level at or above $500,000 by Dec 2026",
      "threshold": "500000",
      "metricType": "median_sale_price",
      "createdAt": "2026-02-01T00:00:00.000Z",
      "updatedAt": "2026-07-10T00:00:00.000Z",
      "outcomes": [
        { "index": 0, "label": "YES", "positionId": "pos_mkt006_yes", "price": 0.34 },
        { "index": 1, "label": "NO", "positionId": "pos_mkt006_no", "price": 0.66 }
      ],
      "resolution": null
    }
  ],
  "pagination": { "page": 1, "limit": 3, "total": 11, "hasMore": true }
}
bash
curl "https://api.ziptoken.io/api/markets?level=county&state=FL&limit=3"
GET/api/markets/:id

Get a single market by database id or frontend id (e.g. mkt-002).

Path Parameters

NameType
id*string

Response

json
{
  "success": true,
  "data": {
    "id": "clx7f3k9p0002qzrm2c4d9v3n",
    "frontendId": "mkt-002",
    "onChainMarketId": "mkt-002",
    "conditionId": "0x4a7bd9f1e2c3...",
    "zipCode": "10001",
    "marketType": "BINARY",
    "status": "FINALIZED",
    "geoNodeId": "zip:10001",
    "questionId": "zip:10001",
    "outcomeCount": 2,
    "resolutionTimestamp": "2026-06-30T00:00:00.000Z",
    "description": "Will the ZHVI level for zip 10001 be at or above $1,300,000 in June 2026?",
    "threshold": "1300000",
    "metricType": "median_sale_price",
    "createdAt": "2026-01-10T00:00:00.000Z",
    "updatedAt": "2026-07-03T06:00:00.000Z",
    "outcomes": [
      { "index": 0, "label": "YES", "positionId": "pos_mkt002_yes", "price": 1 },
      { "index": 1, "label": "NO", "positionId": "pos_mkt002_no", "price": 0 }
    ],
    "resolution": {
      "outcome": "YES",
      "settledValue": 1341800,
      "resolvedAt": "2026-07-01T06:00:00.000Z",
      "disputeWindowEndsAt": "2026-07-03T06:00:00.000Z",
      "finalizedAt": "2026-07-03T06:00:00.000Z"
    }
  }
}
bash
curl https://api.ziptoken.io/api/markets/mkt-002
GET/api/markets/:id/resolution

Structured resolution status for a market: the settlement terms, the Zillow first-print observation it settled on, and dispute-window state. Fields stay null (not an error) until each stage happens.

Path Parameters

NameType
id*string

Response

json
{
  "success": true,
  "data": {
    "marketId": "mkt-002",
    "frontendId": "mkt-002",
    "status": "FINALIZED",
    "geoNodeId": "zip:10001",
    "metric": "zhvi_level",
    "comparator": "gte",
    "threshold": 1300000,
    "measurementMonth": "2026-06",
    "outcome": "YES",
    "settledValue": 1341800,
    "comparisonValue": null,
    "resolvedAt": "2026-07-01T06:00:00.000Z",
    "disputeWindowEndsAt": "2026-07-03T06:00:00.000Z",
    "finalizedAt": "2026-07-03T06:00:00.000Z",
    "observation": {
      "value": 1341800,
      "dataMonth": "2026-06",
      "releaseId": "zhvi-2026-06-first",
      "ingestedAt": "2026-07-01T04:12:00.000Z"
    }
  }
}
bash
curl https://api.ziptoken.io/api/markets/mkt-002/resolution
GET/api/geo/:id

Get one geo node plus its ancestor chain, ordered coarsest-first (state, county, city, ...).

Path Parameters

NameType
id*string

Response

json
{
  "success": true,
  "data": {
    "id": "zip:11215",
    "level": "zip",
    "name": "11215",
    "stateCode": "NY",
    "fips": null,
    "aliases": [],
    "parentIds": ["state:NY", "county:36047", "city:ny-new-york-city", "nbhd:nyc-park-slope"],
    "housingUnits": 21400,
    "active": true,
    "childCount": 0,
    "ancestors": [
      { "id": "state:NY", "level": "state", "name": "New York" },
      { "id": "county:36047", "level": "county", "name": "Kings County" },
      { "id": "city:ny-new-york-city", "level": "city", "name": "New York City" },
      { "id": "nbhd:nyc-park-slope", "level": "neighborhood", "name": "Park Slope" }
    ]
  }
}
bash
curl https://api.ziptoken.io/api/geo/zip:11215
GET/api/quotes

Reference (model) price for a downside-protection contract, sized to a notional. Two contract kinds: the DEFAULT quote experience is kind=layered — graduated, deductible-based protection where attachBps is the deductible (the index decline you absorb) and exhaustBps is where the full limit pays; settlement pays coverage × min(1, max(0, (decline − deductible) / (exhaustion − deductible))). Omitting kind keeps the legacy binary-trigger behavior (strikeBps) unchanged — full backward compatibility. kind=layered with exhaustBps ≤ attachBps returns 422 INVALID_LAYER (a zero-width layer is the binary contract); layered is home-value/rent (index=zhvi|zori) only in v1. Prices are reference-model, not firm executable quotes; value fields may be withheld for callers without active data access.

Query Parameters

NameType
node*string
expiry*string
notional*number
kind'binary' | 'layered'
attachBpsnumber
exhaustBpsnumber
strikeBpsnumber
index'zhvi' | 'zori' | 'vacancy' | 'weather'

Response

json
{
  "success": true,
  "data": {
    "node": "county:37119",
    "nodeName": "Mecklenburg County",
    "index": "zhvi",
    "expiry": "2027-12",
    "seriesMarketId": "lay-county-37119-a5x15-2027-12",
    "asOfMonth": "2026-05",
    "payoutKind": "layered",
    "attachBps": 500,
    "exhaustBps": 1500,
    "attachPct": 5,
    "exhaustPct": 15,
    "horizonMonths": 19,
    "fairValue": 0.041,
    "anyClaimProb": 0.118,
    "fullLimitProb": 0.014,
    "spreadBps": 200,
    "price": 0.061,
    "contracts": 1000000,
    "premiumUsd": 61000,
    "maxPayoutUsd": 1000000,
    "sellerCollateralUsd": 939000,
    "deductibleUsd": 500000,
    "impliedExposureUsd": 10000000,
    "usedDefaultVol": false,
    "priceBasis": "reference-model",
    "note": "Reference price for graduated (layered) downside protection, derived from the node's own ZHVI history. ..."
  }
}
bash
# Layered (deductible-based) — 5% deductible, full limit at 15%, $1M coverage
curl "https://api.ziptoken.io/api/quotes?node=county:37119&kind=layered&attachBps=500&exhaustBps=1500&expiry=2027-12&notional=1000000"

# Legacy binary trigger — omit kind (default) and pass strikeBps
curl "https://api.ziptoken.io/api/quotes?node=county:37119&strikeBps=800&expiry=2027-12&notional=1000000"
POST/api/dev/api-keys

Admin-only key issuance -- not self-serve yet. Guarded by an x-admin-secret header matching the ops-held API_KEY_ADMIN_SECRET; requests without it 401. Included for completeness -- most agent integrations will not call this directly, email api@ziptoken.io for a key instead.

Request Body

NameType
label*string
scopesstring[]
rateLimitnumber
expiresInDaysnumber

Response

json
{
  "success": true,
  "data": {
    "key": "zt_pub_9f8e2a1c4b7d6e5f...",
    "id": "ak_3f9c2b1a",
    "label": "acme-agent",
    "scopes": null,
    "rateLimit": null,
    "expiresAt": null
  }
}
bash
curl -X POST https://api.ziptoken.io/api/dev/api-keys \
  -H "Content-Type: application/json" \
  -H "x-admin-secret: ADMIN_SECRET" \
  -d '{"label": "acme-agent"}'

ZipToken is a technology platform. ZipToken is not an insurance company, insurance producer, or broker, and does not currently offer, sell, or solicit insurance. Quotes shown are non-binding reference estimates generated from published index data for demand-assessment purposes only. Any future coverage products are expected to be underwritten and issued by licensed insurance or reinsurance partners. Nothing on this site is an offer of insurance, an insurance contract, or financial advice. Full legal & disclosures

© 2026 ZipToken — research preview. Balances and money surfaces are SIMULATED.Index data: Zillow ZHVI/ZORI · Apartment List · NOAA/NCEI