Skip to content
parchmentdocs
Open app

Markets

Markets and the synthetic order book

List markets

get/markets

Responses

  • Markets. price.status is price_unavailable when the storage price has not been read. delisted is true for a market removed from the Registry (still listed, no longer polled). Equity markets carry hoursMode, sessionState (open|closed|draining; draining while the session force close settles open positions), sessionEndsAtMs (every open position is force-closed then) and nextSessionOpenMs.

    application/json

    • dataMarketListrequired
      • marketsMarket[]required
        • cancelDelayMsstring | null

          How long after a request it can be cancelled when the order has no stored cancel_after_ms; null while the market has no order params.

          Pattern^-?(0|[1-9][0-9]*)n$
          Example30000n
        • closesPausedboolean | null
        • delistedbooleanrequired

          No longer in the Registry's market_ids; its oracle storage is no longer polled.

        • enabledboolean | null
        • exchangeIdstring | null

          The exchange this market is bound to.

          Pattern^0x[0-9a-f]{64}$
          Example0x2e53756af142bc2768c9bae0d2acae16558e68ab11dc71987dbfc96e4dd40819
        • hoursModenull | string
        • impactnull | ImpactParams
        • kindstring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example0n
        • lastOracleSequencestring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example5310442n
        • lastOracleSlotstring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example342118905n
        • lastOracleTsMsstring | null

          Milliseconds.

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1796677200000n
        • liquidationPausedbooleanrequired

          Only the oracle kill switch stops liquidations.

        • longLockedExposurestringrequired
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • longOistringrequired
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • marketIdstringrequired
          Pattern^0x[0-9a-f]{64}$
          Example0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645
        • maxLongExposurestring | null

          Per-side caps on locked winning exposure.

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • maxLongOistring | null

          Per-side open-interest notional caps (micro-USDC).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • maxShortExposurestring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • maxShortOistring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • nextSessionOpenMsstring | null

          Milliseconds.

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1796677200000n
        • oneStepSpreadBpsstringrequired

          One-step spread in bps (the launch default 5 without order params).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example5n
        • opensPausedboolean | null
        • oraclenull | OracleParams
        • oracleKilledboolean | null
        • paramsStalebooleanrequired
        • pricePricerequired

          A market's storage price (the mid two-step orders fill at), with the spread a one-step exit is charged. There is no bid or ask. Its schema is open: MarketPrice composes it with allOf next to marketId.

        • risknull | RiskParams
        • sessionEndsAtMsstring | null

          Equity markets only: end of the current session (UX only).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1796677200000n
        • sessionStatenull | string
        • shortLockedExposurestringrequired
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • shortOistringrequired
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • statusstring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1n
        • symbolstring | null
          ExampleWTI
        • takerFeeBpsstring | null

          Basis points (1/10000).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example8n
        • timingnull | TimingParams
        • winFeeBpsstring | null

          Basis points (1/10000).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example2000n

Example request

curl 'https://api.parchment.trade/markets'
const res = await fetch("https://api.parchment.trade/markets");
const { data } = await res.json();

Example response (200)

application/json
{
  "data": {
    "markets": [
      {
        "cancelDelayMs": "30000n",
        "closesPaused": true,
        "delisted": true,
        "enabled": true,
        "exchangeId": "0x2e53756af142bc2768c9bae0d2acae16558e68ab11dc71987dbfc96e4dd40819",
        "hoursMode": "equity",
        "impact": {
          "cDen": "1000n",
          "cNum": "1n",
          "closeFeePpm": "500n",
          "deadbandDiv": "4n",
          "deadbandPpm": "1000n",
          "effectiveDepth": "1850000000000n",
          "pDen": "100n",
          "pNum": "1n",
          "referenceNotional": "1850000000000n"
        },
        "kind": "0n",
        "lastOracleSequence": "5310442n",
        "lastOracleSlot": "342118905n",
        "lastOracleTsMs": "1796677200000n",
        "liquidationPaused": true,
        "longLockedExposure": "1850000000000n",
        "longOi": "1850000000000n",
        "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
        "maxLongExposure": "1850000000000n",
        "maxLongOi": "1850000000000n",
        "maxShortExposure": "1850000000000n",
        "maxShortOi": "1850000000000n",
        "nextSessionOpenMs": "1796677200000n",
        "oneStepSpreadBps": "5n",
        "opensPaused": true,
        "oracle": {
          "feedInfoId": "0x1e4732d671ee54e0d32caadbe57b0414f8187380d4a32d09da9250347666cee5",
          "lazerFeedId": "1398n",
          "maxAgeMs": "6000n",
          "maxConfAgeMs": "6000n",
          "maxFutureMs": "60000n",
          "maxTwapDevBps": "2000n",
          "minSpreadBps": "5n",
          "sourceId": "2n",
          "storageId": "0x36d5377cee4c4a61087f999a9c137472ab8daa75ce225ec82d9e5f4ac1fb12bd"
        },
        "oracleKilled": true,
        "paramsStale": true,
        "price": {
          "ageMs": "1200n",
          "confWad": "30000000000000000n",
          "indicative": true,
          "maxAgeMs": "6000n",
          "priceWad": "74250000000000000000n",
          "reason": "string",
          "spreadSource": "floor",
          "spreadWad": "40000000000000000n",
          "stale": true,
          "status": "live",
          "storageId": "0x36d5377cee4c4a61087f999a9c137472ab8daa75ce225ec82d9e5f4ac1fb12bd",
          "timestampMs": "1796677200000n",
          "twapWad": "74250000000000000000n"
        },
        "risk": {
          "bustBufferWad": "10000000000000000n",
          "liqBountyBps": "2000n",
          "maxAccountNotional": "1000000000n",
          "maxBlockNotional": "1000000000n",
          "maxLeverage": "50n",
          "maxPositionNotional": "1000000000n",
          "maxTxNotional": "1000000000n",
          "minLeverage": "1n",
          "minMargin": "100000000n",
          "minNotional": "1000000000n"
        },
        "sessionEndsAtMs": "1796677200000n",
        "sessionState": "open",
        "shortLockedExposure": "1850000000000n",
        "shortOi": "1850000000000n",
        "status": "1n",
        "symbol": "WTI",
        "takerFeeBps": "8n",
        "timing": {
          "minHoldMs": "120000n"
        },
        "winFeeBps": "2000n"
      }
    ]
  }
}

Market stats

get/markets/stats

Responses

  • Per-market 24h volume (opened + closed notional), opens/closes and open interest.

    application/json

    • dataMarketStatsResponserequired

      Every market over [since_ms, until_ms].

      • marketsMarketStats[]required
      • sinceMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • untilMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n

Example request

curl 'https://api.parchment.trade/markets/stats'
const res = await fetch("https://api.parchment.trade/markets/stats");
const { data } = await res.json();

Example response (200)

application/json
{
  "data": {
    "markets": [
      {
        "closedNotional24h": "1850000000000n",
        "closes24h": "24n",
        "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
        "openInterestLong": "1850000000000n",
        "openInterestShort": "1850000000000n",
        "openedNotional24h": "1850000000000n",
        "opens24h": "24n",
        "price24hAgoTsMs": "1796677200000n",
        "price24hAgoWad": "74250000000000000000n",
        "symbol": "WTI",
        "volume24h": "1850000000000n"
      }
    ],
    "sinceMs": "1796677200000n",
    "untilMs": "1796677200000n"
  }
}

Market

get/markets/{id}

Path parameters

  • idstringrequired

    Market object id

    Pattern^(0[xX])?[0-9a-fA-F]{1,64}$
    Example0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645

Responses

  • One market. delisted is true when it was removed from the Registry. Session fields as in the list (hoursMode, sessionState, sessionEndsAtMs, nextSessionOpenMs).

    application/json

    • dataMarketResponserequired
      • marketMarketrequired

        One market.

        The nullable fields are null until the market state is indexed.

        • cancelDelayMsstring | null

          How long after a request it can be cancelled when the order has no stored cancel_after_ms; null while the market has no order params.

          Pattern^-?(0|[1-9][0-9]*)n$
          Example30000n
        • closesPausedboolean | null
        • delistedbooleanrequired

          No longer in the Registry's market_ids; its oracle storage is no longer polled.

        • enabledboolean | null
        • exchangeIdstring | null

          The exchange this market is bound to.

          Pattern^0x[0-9a-f]{64}$
          Example0x2e53756af142bc2768c9bae0d2acae16558e68ab11dc71987dbfc96e4dd40819
        • hoursModenull | string
        • impactnull | ImpactParams
        • kindstring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example0n
        • lastOracleSequencestring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example5310442n
        • lastOracleSlotstring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example342118905n
        • lastOracleTsMsstring | null

          Milliseconds.

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1796677200000n
        • liquidationPausedbooleanrequired

          Only the oracle kill switch stops liquidations.

        • longLockedExposurestringrequired
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • longOistringrequired
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • marketIdstringrequired
          Pattern^0x[0-9a-f]{64}$
          Example0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645
        • maxLongExposurestring | null

          Per-side caps on locked winning exposure.

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • maxLongOistring | null

          Per-side open-interest notional caps (micro-USDC).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • maxShortExposurestring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • maxShortOistring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • nextSessionOpenMsstring | null

          Milliseconds.

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1796677200000n
        • oneStepSpreadBpsstringrequired

          One-step spread in bps (the launch default 5 without order params).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example5n
        • opensPausedboolean | null
        • oraclenull | OracleParams
        • oracleKilledboolean | null
        • paramsStalebooleanrequired
        • pricePricerequired

          A market's storage price (the mid two-step orders fill at), with the spread a one-step exit is charged. There is no bid or ask. Its schema is open: MarketPrice composes it with allOf next to marketId.

        • risknull | RiskParams
        • sessionEndsAtMsstring | null

          Equity markets only: end of the current session (UX only).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example1796677200000n
        • sessionStatenull | string
        • shortLockedExposurestringrequired
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • shortOistringrequired
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1850000000000n
        • statusstring | null
          Pattern^-?(0|[1-9][0-9]*)n$
          Example1n
        • symbolstring | null
          ExampleWTI
        • takerFeeBpsstring | null

          Basis points (1/10000).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example8n
        • timingnull | TimingParams
        • winFeeBpsstring | null

          Basis points (1/10000).

          Pattern^-?(0|[1-9][0-9]*)n$
          Example2000n

Example request

curl 'https://api.parchment.trade/markets/0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645'
const res = await fetch("https://api.parchment.trade/markets/0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645");
const { data } = await res.json();

Example response (200)

application/json
{
  "data": {
    "market": {
      "cancelDelayMs": "30000n",
      "closesPaused": true,
      "delisted": true,
      "enabled": true,
      "exchangeId": "0x2e53756af142bc2768c9bae0d2acae16558e68ab11dc71987dbfc96e4dd40819",
      "hoursMode": "equity",
      "impact": {
        "cDen": "1000n",
        "cNum": "1n",
        "closeFeePpm": "500n",
        "deadbandDiv": "4n",
        "deadbandPpm": "1000n",
        "effectiveDepth": "1850000000000n",
        "pDen": "100n",
        "pNum": "1n",
        "referenceNotional": "1850000000000n"
      },
      "kind": "0n",
      "lastOracleSequence": "5310442n",
      "lastOracleSlot": "342118905n",
      "lastOracleTsMs": "1796677200000n",
      "liquidationPaused": true,
      "longLockedExposure": "1850000000000n",
      "longOi": "1850000000000n",
      "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
      "maxLongExposure": "1850000000000n",
      "maxLongOi": "1850000000000n",
      "maxShortExposure": "1850000000000n",
      "maxShortOi": "1850000000000n",
      "nextSessionOpenMs": "1796677200000n",
      "oneStepSpreadBps": "5n",
      "opensPaused": true,
      "oracle": {
        "feedInfoId": "0x1e4732d671ee54e0d32caadbe57b0414f8187380d4a32d09da9250347666cee5",
        "lazerFeedId": "1398n",
        "maxAgeMs": "6000n",
        "maxConfAgeMs": "6000n",
        "maxFutureMs": "60000n",
        "maxTwapDevBps": "2000n",
        "minSpreadBps": "5n",
        "sourceId": "2n",
        "storageId": "0x36d5377cee4c4a61087f999a9c137472ab8daa75ce225ec82d9e5f4ac1fb12bd"
      },
      "oracleKilled": true,
      "paramsStale": true,
      "price": {
        "ageMs": "1200n",
        "confWad": "30000000000000000n",
        "indicative": true,
        "maxAgeMs": "6000n",
        "priceWad": "74250000000000000000n",
        "reason": "string",
        "spreadSource": "floor",
        "spreadWad": "40000000000000000n",
        "stale": true,
        "status": "live",
        "storageId": "0x36d5377cee4c4a61087f999a9c137472ab8daa75ce225ec82d9e5f4ac1fb12bd",
        "timestampMs": "1796677200000n",
        "twapWad": "74250000000000000000n"
      },
      "risk": {
        "bustBufferWad": "10000000000000000n",
        "liqBountyBps": "2000n",
        "maxAccountNotional": "1000000000n",
        "maxBlockNotional": "1000000000n",
        "maxLeverage": "50n",
        "maxPositionNotional": "1000000000n",
        "maxTxNotional": "1000000000n",
        "minLeverage": "1n",
        "minMargin": "100000000n",
        "minNotional": "1000000000n"
      },
      "sessionEndsAtMs": "1796677200000n",
      "sessionState": "open",
      "shortLockedExposure": "1850000000000n",
      "shortOi": "1850000000000n",
      "status": "1n",
      "symbol": "WTI",
      "takerFeeBps": "8n",
      "timing": {
        "minHoldMs": "120000n"
      },
      "winFeeBps": "2000n"
    }
  }
}

Corporate actions and open pauses

get/markets/{id}/corporate-actions

Path parameters

  • idstringrequired

    Market object id

    Pattern^(0[xX])?[0-9a-fA-F]{1,64}$
    Example0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645

Responses

  • Upcoming and active scheduled-event pauses of new opens on this market (dividends and earnings, oldest window first), and why opens are paused now: pauseReason dividend or earnings (paused for that event), other (any other pause) or null (not paused). An event with paused true blocks new opens even while opensPaused is false (the keeper's event pause). closePositionsMs is when the keeper closes existing positions for the event, null when event close is not live. Commodity markets also carry the keeper's event pause (pauseUntilMs), its leverage cap on new opens (leverageCap, leverageCapReason, leverageCapLabel, leverageCapUntilMs; events with action cap and maxLeverage), dailyBreak and pauseBeforeCloseMinutes. Floats are JSON numbers, times js_bigint ms. 404 from a service revision that does not serve it yet.

    application/json

    • dataCorporateActionsrequired

      A market's upcoming and active scheduled-event pauses of new opens (dividends, earnings).

      • dailyBreakstring | null

        Commodity markets: force_close or pause_opens (positions hold through the daily 17:00-18:00 ET break; weekends, holidays and early halts force-close); null otherwise.

        One offorce_closepause_opensnull
      • eventsEventPause[]required

        Oldest window first.

      • leverageCapinteger (int64) | null (int64)

        The active event leverage cap on new opens (commodity markets); null when none.

        Range0 to …
      • leverageCapLabelstring | null

        The cap's label, e.g. "EIA report".

      • leverageCapReasonstring | null

        The cap's kind (eia, macro, opec, expiry, session) or guard.

        One ofeiamacroopecexpirysessionguardnull
      • leverageCapUntilMsstring | nullrequired

        When the cap lifts.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677320000n
      • marketIdstringrequired
        Pattern^0x[0-9a-f]{64}$
        Example0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645
      • opensPausedboolean | null

        The indexed opens_paused flag; null until indexed.

      • pauseBeforeCloseMinutesinteger (int64) | null (int64)

        Commodity markets: opens pause this many minutes before the daily close.

        Range0 to …
      • pauseReasonstring | null

        Why new opens are paused: the event kind (dividend, earnings, eia, macro, opec, expiry, session) while one of its pauses holds them, guard while a live keeper guard holds them, other for any other admin pause; null when not paused.

        One ofdividendearningseiamacroopecexpirysessionguardothernull
      • pauseUntilMsstring | nullrequired

        When the keeper's event pause lapses; null when the keeper is not pausing.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n

Example request

curl 'https://api.parchment.trade/markets/0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645/corporate-actions'
const res = await fetch("https://api.parchment.trade/markets/0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645/corporate-actions");
const { data } = await res.json();

Example response (200)

application/json
{
  "data": {
    "dailyBreak": "force_close",
    "events": [
      {
        "action": "string",
        "amount": 0,
        "bustDistance": 0,
        "closePositionsMs": "1796677800000n",
        "date": "2026-12-07",
        "dividendFraction": 0,
        "eventMs": "1796677200000n",
        "kind": "dividend",
        "label": "string",
        "maxLeverage": 0,
        "pauseEndMs": "1796743800000n",
        "pauseStartMs": "1796677200000n",
        "paused": true,
        "status": "upcoming",
        "symbol": "WTI",
        "timing": "after_close",
        "validation": "confirmed"
      }
    ],
    "leverageCap": 0,
    "leverageCapLabel": "string",
    "leverageCapReason": "eia",
    "leverageCapUntilMs": "1796677320000n",
    "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
    "opensPaused": true,
    "pauseBeforeCloseMinutes": 0,
    "pauseReason": "dividend",
    "pauseUntilMs": "1796677200000n"
  }
}

Order book

get/markets/{id}/orderbook

Path parameters

  • idstringrequired

    Market object id

    Pattern^(0[xX])?[0-9a-fA-F]{1,64}$
    Example0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645

Responses

  • Synthetic order book: one bid and ask at midWad, each with size null, spreadWad zero, spreadSource null and indicative false. Unavailable prices have empty bids and asks. Includes timestampMs, ageMs and stale. One-step spreads remain on the market and price views. There is no on-chain book.

    application/json

    • dataOrderBookrequired

      Synthetic levels at the storage mid. Two-step fills have zero spread; the separate market/price views retain their one-step spread.

      • ageMsstring | null

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1200n
      • asksBookLevel[]required
      • bidsBookLevel[]required
      • indicativeboolean | null

        The indicative price; null (absent) while the book is empty.

      • kindstringrequired

        The order book kind; the book is built from the storage price.

        One ofsynthetic
      • marketIdstringrequired
        Pattern^0x[0-9a-f]{64}$
        Example0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645
      • midWadstring | null

        Scaled by 1e18 (WAD).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example74250000000000000000n
      • reasonstring | null

        Why the book is empty; null while live.

      • spreadSourcenull | string
      • spreadWadstring | null

        Scaled by 1e18 (WAD).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example40000000000000000n
      • stalebooleanrequired
      • statusstringrequired

        State of a market's storage price.

        One oflivestaleprice_unavailable
      • timestampMsstring | null

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n

Example request

curl 'https://api.parchment.trade/markets/0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645/orderbook'
const res = await fetch("https://api.parchment.trade/markets/0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645/orderbook");
const { data } = await res.json();

Example response (200)

application/json
{
  "data": {
    "ageMs": "1200n",
    "asks": [
      {
        "priceWad": "74250000000000000000n",
        "size": "100000000n"
      }
    ],
    "bids": [
      {
        "priceWad": "74250000000000000000n",
        "size": "100000000n"
      }
    ],
    "indicative": true,
    "kind": "synthetic",
    "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
    "midWad": "74250000000000000000n",
    "reason": "string",
    "spreadSource": "floor",
    "spreadWad": "40000000000000000n",
    "stale": true,
    "status": "live",
    "timestampMs": "1796677200000n"
  }
}