Skip to content
parchmentdocs
Open app

Stats

Protocol monitoring: mint cap, payout queue, side exposure, fee split, fill price age, and short-hold PnL by day; daily activity: per-market volume, liquidations and fills, collateral deposits vs withdrawals, with since-launch totals

Daily activity

get/stats/activity

Query parameters

  • daysstring

    Days of history, today included: canonical decimal (digits only, no sign, whitespace or leading zero), 1 to 18446744073709551615, else 400 bad_request; an empty value is omitted. The service defaults to 90 and serves at most 366.

    Pattern^(0|[1-9][0-9]*)$
    Example30

Responses

  • Daily trading activity, indexed from on-chain events: per market and UTC day the volume (notional opened plus notional closed or liquidated, at the positions' open notional, the markets/stats volume24h definition), the liquidated notional and count and the two-step order fills; and the USDC deposited into and withdrawn from trading accounts per day. Each series carries allTime, its since-launch total, so a client can draw the all-time running total under any window (allTime less the days after each day). Every series runs fromDay to toDay, one row per day, zeros on a quiet day. Days are UTC day numbers (ms / 86400000); USDC amounts are base units (6 decimals). Every integer is an n-suffixed decimal string. complete is false while the service is still folding history indexed before these stats existed. 404 from a service revision that does not serve it yet.

    application/json

    • dataStatsActivityrequired

      Daily per-market volume, liquidations and fills and collateral deposits vs withdrawals, one row per UTC day (ms / 86_400_000) with since-launch totals.

      • collateralCollateralActivityrequired
      • completebooleanrequired

        The rows cover every indexed event (false while the service folds older history).

      • fromDaystringrequired

        First and last day of every days series.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example20794n
      • marketsMarketActivity[]required
      • nowMsstringrequired

        Milliseconds.

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

Example request

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

Example response (200)

application/json
{
  "data": {
    "collateral": {
      "allTime": {
        "depositCount": "24n",
        "deposits": "1850000000000n",
        "withdrawalCount": "24n",
        "withdrawals": "1850000000000n"
      },
      "days": [
        {
          "day": "20794n",
          "depositCount": "24n",
          "deposits": "1850000000000n",
          "withdrawalCount": "24n",
          "withdrawals": "1850000000000n"
        }
      ]
    },
    "complete": true,
    "fromDay": "20794n",
    "markets": [
      {
        "allTime": {
          "closedNotional": "1850000000000n",
          "fills": "24n",
          "liquidatedNotional": "1850000000000n",
          "liquidations": "24n",
          "openedNotional": "1850000000000n",
          "volume": "1850000000000n"
        },
        "days": [
          {
            "closedNotional": "1850000000000n",
            "day": "20794n",
            "fills": "24n",
            "liquidatedNotional": "1850000000000n",
            "liquidations": "24n",
            "openedNotional": "1850000000000n",
            "volume": "1850000000000n"
          }
        ],
        "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
        "symbol": "WTI"
      }
    ],
    "nowMs": "1796677200000n",
    "toDay": "20794n"
  }
}

Protocol monitoring

get/stats/monitoring

Query parameters

  • daysstring

    Days of history, today included: canonical decimal (digits only, no sign, whitespace or leading zero), 1 to 18446744073709551615, else 400 bad_request; an empty value is omitted. The service defaults to 90 and serves at most 366.

    Pattern^(0|[1-9][0-9]*)$
    Example30

Responses

  • Protocol monitoring, indexed from on-chain events and objects: the daily loss-mint cap (finalized epochs: room, carry, gross provisional mints, scale, excess; per day: minted vs flagged losses, flagged meaning the contract's wash or self-liquidation flag), the payout queue (entries, net owed, oldest entry, end-of-day history with the oldest unpaid claim age; the loss-side fee (2% at launch) is carved whether or not the queue is empty), per-market side exposure against the OI and exposure caps and the payout-floor depth capacity, and the fee split (retained fees, sweeps, staker deposits, withdrawals, vest penalties and forfeits; daily and since launch; coverage and staker share now; staker deposits stream to stakers in full, with no referral reserve carved from them). Fill timing per market, per day and over the window, over two-step fills: priceAge is the fill Clock less the storage price timestamp (count, p50, p95, max); lazerToStorage is the storage price timestamp less the signed Lazer update's, and requestToLazer the signed Lazer update timestamp less the order's request time, both signed ms (count, missing, p50, p95, min, max). The Lazer timestamp is the one the fill transaction submitted; missing counts fills without it (history indexed before it was recorded, an update that did not decode) or, for requestToLazer, whose request is not indexed. Short holds: settled under thresholdMs = 60000 from open (positions, distinct wallets as the accounts' on-chain owners, realized profit and loss per day, per market and over the window). Days are UTC day numbers (ms / 86400000). Every integer is an n-suffixed decimal string, signed gaps included ("-80n"). complete is false while the service is still folding history indexed before these stats existed.

    application/json

    • dataMonitoringrequired

      The daily loss-mint cap, the payout queue, side exposure against the caps, the fee split, the timing of two-step fills (storage price age, Lazer-to-storage and request-to-Lazer gaps) and short-hold PnL, current values or window totals plus one row per UTC day (ms / 86_400_000).

      • completebooleanrequired

        The daily series cover every indexed event (false while the service folds older history).

      • exposureMarketExposure[]required
      • feesFeeStatsrequired
      • fillLagMarketFillLag[]required
      • fromDaystringrequired

        First and last day of every days series.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example20794n
      • mintCapMintCapStatsrequired
      • nowMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • queueQueueStatsrequired
      • shortHoldsShortHoldStatsrequired
      • toDaystringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example20794n

Example request

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

Example response (200)

application/json
{
  "data": {
    "complete": true,
    "exposure": [
      {
        "days": [
          {
            "day": "20794n",
            "longLocked": "1850000000000n",
            "longOi": "1850000000000n",
            "shortLocked": "1850000000000n",
            "shortOi": "1850000000000n"
          }
        ],
        "effectiveDepth": "1850000000000n",
        "long": {
          "depthBound": true,
          "depthCapacity": "1850000000000n",
          "depthUtilBps": "3200n",
          "exposureCap": "1850000000000n",
          "exposureUtilBps": "3200n",
          "lockedExposure": "1850000000000n",
          "oi": "1850000000000n",
          "oiCap": "1850000000000n",
          "oiUtilBps": "3200n"
        },
        "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
        "short": {
          "depthBound": true,
          "depthCapacity": "1850000000000n",
          "depthUtilBps": "3200n",
          "exposureCap": "1850000000000n",
          "exposureUtilBps": "3200n",
          "lockedExposure": "1850000000000n",
          "oi": "1850000000000n",
          "oiCap": "1850000000000n",
          "oiUtilBps": "3200n"
        },
        "symbol": "WTI"
      }
    ],
    "fees": {
      "coverageBps": "12500n",
      "days": [
        {
          "day": "20794n",
          "flows": {
            "closeToll": "800000n",
            "forfeitsClaimed": "1500000000000n",
            "forfeitsSwept": "1500000000000n",
            "growthWithdrawn": "1850000000000n",
            "lossFee": "800000n",
            "retained": "1850000000000n",
            "retainedStakers": "1850000000000n",
            "retainedTreasury": "1850000000000n",
            "stakerDeposit": "100000000n",
            "sweep": "1850000000000n",
            "sweepGrowth": "1850000000000n",
            "sweepStakers": "1850000000000n",
            "sweepTreasury": "1850000000000n",
            "treasuryWithdrawn": "1850000000000n",
            "vestPenalty": "300000000000n",
            "winFee": "800000n"
          }
        }
      ],
      "growthBalance": "1850000000000n",
      "lpCash": "1850000000000n",
      "reserve": "1850000000000n",
      "stakerBalance": "1850000000000n",
      "stakerShareBps": "2000n",
      "totals": {
        "closeToll": "800000n",
        "forfeitsClaimed": "1500000000000n",
        "forfeitsSwept": "1500000000000n",
        "growthWithdrawn": "1850000000000n",
        "lossFee": "800000n",
        "retained": "1850000000000n",
        "retainedStakers": "1850000000000n",
        "retainedTreasury": "1850000000000n",
        "stakerDeposit": "100000000n",
        "sweep": "1850000000000n",
        "sweepGrowth": "1850000000000n",
        "sweepStakers": "1850000000000n",
        "sweepTreasury": "1850000000000n",
        "treasuryWithdrawn": "1850000000000n",
        "vestPenalty": "300000000000n",
        "winFee": "800000n"
      },
      "treasuryBalance": "1850000000000n"
    },
    "fillLag": [
      {
        "days": [
          {
            "day": "20794n",
            "lags": {
              "lazerToStorage": {
                "count": "24n",
                "maxMs": "5200n",
                "minMs": "310n",
                "missing": "24n",
                "p50Ms": "850n",
                "p95Ms": "2400n"
              },
              "priceAge": {
                "count": "24n",
                "maxMs": "5200n",
                "p50Ms": "850n",
                "p95Ms": "2400n"
              },
              "requestToLazer": {
                "count": "24n",
                "maxMs": "5200n",
                "minMs": "310n",
                "missing": "24n",
                "p50Ms": "850n",
                "p95Ms": "2400n"
              }
            }
          }
        ],
        "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
        "symbol": "WTI",
        "window": {
          "lazerToStorage": {
            "count": "24n",
            "maxMs": "5200n",
            "minMs": "310n",
            "missing": "24n",
            "p50Ms": "850n",
            "p95Ms": "2400n"
          },
          "priceAge": {
            "count": "24n",
            "maxMs": "5200n",
            "p50Ms": "850n",
            "p95Ms": "2400n"
          },
          "requestToLazer": {
            "count": "24n",
            "maxMs": "5200n",
            "minMs": "310n",
            "missing": "24n",
            "p50Ms": "850n",
            "p95Ms": "2400n"
          }
        }
      }
    ],
    "fromDay": "20794n",
    "mintCap": {
      "days": [
        {
          "day": "20794n",
          "flaggedCount": "24n",
          "flaggedLoss": "1850000000000n",
          "minted": "1500000000000n",
          "mintedCount": "24n",
          "mintedLoss": "1850000000000n",
          "scaleBurned": "1500000000000n"
        }
      ],
      "epochs": [
        {
          "carryIn": "1500000000000n",
          "carryOut": "1500000000000n",
          "epoch": "912n",
          "excess": "1500000000000n",
          "gainDown": "1850000000000n",
          "gainUp": "1850000000000n",
          "provisional": "1500000000000n",
          "room": "1500000000000n",
          "scalePpm": "1000n",
          "used": "1500000000000n"
        }
      ],
      "flaggedShareBps": "2000n",
      "lastEpoch": {
        "carryIn": "1500000000000n",
        "carryOut": "1500000000000n",
        "epoch": "912n",
        "excess": "1500000000000n",
        "gainDown": "1850000000000n",
        "gainUp": "1850000000000n",
        "provisional": "1500000000000n",
        "room": "1500000000000n",
        "scalePpm": "1000n",
        "used": "1500000000000n"
      },
      "tailProgress": "1850000000000n"
    },
    "nowMs": "1796677200000n",
    "queue": {
      "days": [
        {
          "completedCount": "24n",
          "day": "20794n",
          "enqueuedCount": "24n",
          "enqueuedNet": "100000000n",
          "entries": "24n",
          "oldestAgeMs": "1200n",
          "owedNet": "100000000n",
          "paidNet": "100000000n",
          "payments": "24n"
        }
      ],
      "entries": "24n",
      "nodes": "24n",
      "oldestAgeMs": "1200n",
      "oldestEnqueuedMs": "1796677200000n",
      "owedNet": "100000000n",
      "totalOwed": "1850000000000n"
    },
    "shortHolds": {
      "days": [
        {
          "day": "20794n",
          "holds": {
            "loss": "100000000n",
            "positions": "24n",
            "profit": "42500000n",
            "wallets": "24n"
          }
        }
      ],
      "markets": [
        {
          "days": [
            {
              "day": "20794n",
              "holds": {
                "loss": "100000000n",
                "positions": "24n",
                "profit": "42500000n",
                "wallets": "24n"
              }
            }
          ],
          "marketId": "0x6e6238eb4f69bfcc3e884a7d20904eb0995ca2e42c95dc8560d5a417486ab645",
          "symbol": "WTI",
          "window": {
            "loss": "100000000n",
            "positions": "24n",
            "profit": "42500000n",
            "wallets": "24n"
          }
        }
      ],
      "thresholdMs": "120000n",
      "window": {
        "loss": "100000000n",
        "positions": "24n",
        "profit": "42500000n",
        "wallets": "24n"
      }
    },
    "toDay": "20794n"
  }
}