Vertex Docs
  • Getting Started
    • 📋Overview
    • 📜Table of Contents
    • 🚀Mission
    • ⚔️Vertex Edge
      • 1️⃣Vertex on Arbitrum
      • 2️⃣Blitz on Blast
        • Blitz Documentation
      • 3️⃣Vertex on Mantle
        • 🎆Trading Rewards
        • 📊Perpetual & Spot Market Specifications
        • 🖥️Open-Source Contracts
        • 🔌API
      • 4️⃣Vertex on Sei
        • 💰Trading Rewards
        • 📊Perpetual & Spot Market Specifications
        • 🖥️On-Chain Contracts
        • 🔌API
      • 5️⃣Vertex on Base
        • 💰Trading Rewards
        • 📊Perpetual & Spot Market Specifications
        • 💻Onchain Contracts
        • 🔌API
        • ✍️Create a Coinbase Smart Wallet
      • 6️⃣Vertex on Sonic
        • 💰Trading Rewards
        • 📊Perpetual & Spot Market Specifications
        • ⛓️On-Chain Contracts
        • 🔌API
      • 7️⃣Vertex on Abstract
        • 📊Market Specifications
        • ⛓️On-Chain Contracts
        • 🔌API
      • 8️⃣Bro.Trade on Berachain
        • ⛓️On-Chain Contracts
        • 🔌API
      • 9️⃣Vertex on Avalanche
        • 💰Trading Rewards
        • 📊Market Specifications
        • ⛓️On-Chain Contracts
        • 🔌API
  • Basics
    • 📽️Products
    • ⚡Technical Architecture
    • 🧵Universal Cross Margin
    • ✂️Isolated Margin
    • ℹ️Subaccounts & Health
    • ⏰Liquidations & Insurance Fund
    • 💵PnL Settlements
    • 📊Pricing (Oracles)
    • 💰Fees
    • 📈Funding Rates
    • 📅Market Specifications
    • ⚡One-Click Trading
    • 🔫Trigger Orders
    • 🗂️GMCI 30 & MEME Indices
    • 💰Trade & Earn
      • 🤝Maker Program
      • 🔁Cross-Chain VRTX Rewards
      • ❓Trading Rewards - FAQs
    • 🧑‍🤝‍🧑Referral Program
    • ⚒️Resources & Links
    • ❔FAQs
  • VRTX Token
    • 🎓VRTX Tokenomics
    • 📊Token Supply Distribution
  • More
    • 🌐Glossary
    • 🔬Contracts & Code Audits
    • 🦋Bug Bounties
    • 💽Data & Research
    • 🪟Maintenance Windows
    • 🏁Terms of Use
    • ✍️Statement of Risk
    • 🌍Restricted Territories
    • 📸Brand Assets
  • Tutorials
    • 🏁Quick Start
    • 🖱️One-Click Trading
    • ⚙️Trading Basics
    • ♾️Perpetuals
    • 🔮Spot
    • 🧑‍🤝‍🧑Multiple Accounts
    • 🔫TP/SL & Stop-Market
    • 💰Withdrawals
    • ⚡Fast Withdrawals
    • 🌉Cross-Chain Deposits
    • 🔄Lend, Borrow & Repay
    • ❤️Margin Health
    • 💧Pools
    • 💫VRTX Staking
    • ↔️Switching Chains
    • 🪙Trading Rewards
    • ✂️Shortcuts
  • Developer Resources
    • API
      • 🔌Endpoints
      • Gateway
        • Executes
          • Place Order
          • Place Isolated Order
          • Cancel Orders
          • Cancel Product Orders
          • Cancel And Place
          • Withdraw Collateral
          • Transfer Quote
          • Liquidate Subaccount
          • Mint LP
          • Burn LP
          • Link Signer
        • Queries
          • Status
          • Contracts
          • Nonces
          • Order
          • Orders
          • Subaccount Info
          • Isolated Positions
          • Market Liquidity
          • Symbols
          • All Products
          • Edge All Products
          • Market Prices
          • Max Order Size
          • Max Withdrawable
          • Max LP Mintable
          • Fee Rates
          • Health Groups
          • Linked Signer
          • Insurance
          • Min Deposit Rates
        • Signing
          • Examples
          • Q&A
      • Subscriptions
        • Authentication
        • Streams
        • Events
        • Rate limits
      • Archive (indexer)
        • Orders
        • Matches
        • Events
        • Summary
        • Candlesticks
        • Edge Candlesticks
        • Funding Rate
        • Interest & funding payments
        • Oracle Price
        • Perp Prices
        • Product Snapshots
        • Market Snapshots
        • Edge Market Snapshots
        • Maker Statistics
        • Merkle Proofs
        • Rewards
        • Referral Code
        • Liquidation Feed
        • Linked Signer Rate Limit
        • Subaccounts
        • Signatures
        • USDC Price
      • Trigger
        • Executes
          • Place Order
          • Cancel Orders
          • Cancel Product Orders
        • Queries
          • List Trigger Orders
      • V2
        • Assets
        • Pairs
        • APR
        • Orderbook
        • Tickers
        • Contracts
        • Trades
        • VRTX Token
      • Rate limits
      • Errors
      • Symbols
      • Depositing
      • Withdrawing (on-chain)
      • Integrate via Smart Contracts
      • Definitions / Formulas
    • Vertex Typescript SDK
      • Getting Started
      • How To
        • Create a Vertex client
        • Useful Common Functions
        • Query Markets & Products
        • Deposit Funds
        • Withdraw Funds
        • Manage Orders
      • User Guide
        • Client
          • Market
            • Place Order
            • Cancel Orders
            • Cancel Product Orders
            • Mint LP
            • Burn LP
            • Get All Markets
            • Get Latest Market Price
            • Get Market Liquidity
            • Get Open Subaccount orders
            • Get Historical Orders
            • Get Max Order Size
            • Get Max Mint LP
            • Get Candlesticks
            • Get Funding Rate
            • Get Product Snapshots
          • Spot
            • Approve Allowance
            • Deposit
            • Withdraw
            • Get Max Withdrawable
            • Get Token Contract for Product
            • Get Token Wallet Balance
            • Get Token Allowance
          • Perp
            • Get prices
          • Subaccount
            • Link Signer
            • Get Subaccount Linked Signer with Rate limits
            • Get Subaccount Summary
            • Get Subaccount Fee Rates
            • Get Subaccount Token Rewards
        • Engine Client
          • Executes
          • Queries
        • Indexer Client
          • Base Queries
          • Paginated Queries
        • Websocket
          • Executes
          • Queries
          • Subscriptions
        • Utilities
          • Contracts
          • Utils
      • API Reference
    • Vertex Python SDK
    • Vertex Rust SDK
    • Contracts
    • API/SDK Terms of Use
Powered by GitBook
On this page
  • Rate limits
  • Request
  • Request Parameters
  • Response
  • Response Fields
Export as PDF
  1. Developer Resources
  2. API
  3. Archive (indexer)

Edge Market Snapshots

Query historical market snapshots across all chains

PreviousMarket SnapshotsNextMaker Statistics

Last updated 2 months ago

Rate limits

Dynamic based on interval.count.

  • Weight = interval.count / 20 + max(interval.count.min(20), 2) * 2

  • Scales mainly with interval count.

    • Example: interval.count=500 → weight=65, interval.count=100 → weight=45.

  • Minimum weight per request is 4.

See more details in

Request

Query market snapshots ordered by timestamp desc.

POST [ARCHIVE_ENDPOINT]

Body

{
    "edge_market_snapshots": {
        "interval": {
          "count": 2,
          "granularity": 3600,
          "max_time": 1691083697,
        },
        "product_ids": [1, 2]
    }
}

Request Parameters

Parameter
Type
Required
Description

interval

object

Yes

Object to specify desired time period for data

interval.count

number

Yes

Number of snapshots to return, limit 100. Also limited to interval.count * # product_ids < 2000

interval.granularity

number

Yes

Granularity value in seconds

interval.max_time

number / string

No

When providing max_time (unix epoch in seconds), only return snapshots with timestamp <= max_time. If no value is entered, max_time defaults to the current time.

product_ids

number[]

No

list of product ids to fetch snapshots for, defaults to all products

Response

Note:

  • Returns a mapping of chain_id -> snapshots

{
  "snapshots": {
    "42161": [
      {
        "timestamp": 1689965194,
        "cumulative_users": 2774,
        "daily_active_users": 251,
        "cumulative_trades": {
          "1": 54287,
          "2": 172435
        },
        "cumulative_volumes": {
          "1": "259549132367035103631071564",
          "2": "1134008547778337985156988339"
        },
        "cumulative_trade_sizes": {
          "1": "9209508999999999995173",
          "2": "40246259000000000000000"
        },
        "cumulative_taker_fees": {
          "1": "88916428908427788322799",
          "2": "259205794197801680292645"
        },
        "cumulative_sequencer_fees": {
          "1": "11038200000000000000000",
          "2": "32353000000000000000000"
        },
        "cumulative_maker_fees": {
          "1": "-12421730086012739050725",
          "2": "-36124007075181485948604"
        },
        "cumulative_liquidation_amounts": {
          "1": "848311398835000694508",
          "2": "1013231566414935056343898"
        },
        "open_interests": {
          "2": "2907581091676822842104781"
        },
        "total_deposits": {
          "1": "37722308770940799414"
        },
        "total_borrows": {
          "1": "1441397740941092000"
        },
        "funding_rates": {
          "2": "3611102723387"
        },
        "deposit_rates": {
          "1": "1001376785714"
        },
        "borrow_rates": {
          "1": "32059880416879"
        },
        "cumulative_inflows": {
          "1": "238791614019999999853",
          "2": "0"
        },
        "cumulative_outflows": {
          "1": "-202514202990000000306",
          "2": "0"
        },
        "tvl": "7560079507311601381352742"
      }
    ],
    "5000": [
      {
        "timestamp": 1689965194,
        "cumulative_users": 2774,
        "daily_active_users": 251,
        "cumulative_trades": {
          "1": 54287,
          "2": 172435
        },
        "cumulative_volumes": {
          "1": "259549132367035103631071564",
          "2": "1134008547778337985156988339"
        },
        "cumulative_trade_sizes": {
          "1": "9209508999999999995173",
          "2": "40246259000000000000000"
        },
        "cumulative_taker_fees": {
          "1": "88916428908427788322799",
          "2": "259205794197801680292645"
        },
        "cumulative_sequencer_fees": {
          "1": "11038200000000000000000",
          "2": "32353000000000000000000"
        },
        "cumulative_maker_fees": {
          "1": "-12421730086012739050725",
          "2": "-36124007075181485948604"
        },
        "cumulative_liquidation_amounts": {
          "1": "848311398835000694508",
          "2": "1013231566414935056343898"
        },
        "open_interests": {
          "2": "2907581091676822842104781"
        },
        "total_deposits": {
          "1": "37722308770940799414"
        },
        "total_borrows": {
          "1": "1441397740941092000"
        },
        "funding_rates": {
          "2": "3611102723387"
        },
        "deposit_rates": {
          "1": "1001376785714"
        },
        "borrow_rates": {
          "1": "32059880416879"
        },
        "cumulative_inflows": {
          "1": "238791614019999999853",
          "2": "0"
        },
        "cumulative_outflows": {
          "1": "-202514202990000000306",
          "2": "0"
        },
        "tvl": "7560079507311601381352742"
      }
    ]
  }
}

Response Fields

Snapshots

Note: For product specific fields (i.e. cumulative_volume, open_interests), the value is an object which maps product_ids to their corresponding values.

Field name
Description

timestamp

Timestamp of the snapshot. This may not be perfectly rounded to the granularity since it uses the nearest transaction timestamp less than or equal to max_time

cumulative_users

The cumulative number of subaccounts on Vertex. It is updated daily at 9AM ET for historical counts. For current day counts, it is updated every hour.

daily_active_users

Daily active users count, updated daily at 9AM ET for historical counts. For current day counts, it is updated every hour.

cumulative_trades

A map of product_id -> the cumulative number of trades for the given product_id.

cumulative_volumes

A map of product_id -> cumulative volumes in USDC units.

cumulative_trade_sizes

A map of product_id -> cumulative trade sizes in base token

cumulative_taker_fees

A map of product_id -> cumulative taker fees. Taker fees include sequencer fees.

cumulative_sequencer_fees

A map of product_id -> cumulative sequencer fees.

cumulative_maker_fees

A map of product_id -> cumulative maker rebates.

cumulative_liquidation_amounts

A map of product_id -> cumulative liquidation amounts in USDC units.

open_interests

A map of product_id -> open interests in USDC units.

total_deposits

A map of product_id -> total deposits held by Vertex for a given product at the given time in the base token units.

total_borrows

A map of product_id -> total borrows lent by Vertex for a given product at the given time in the base token units.

funding_rates

A map of product_id -> hourly historical funding rates, value returned as decimal rates (% = rate * 100), derived from funding payment amounts. Requires a minimum granularity of 3600 to see non-zero funding rates. Use a granularity where granularity % 3600 = 0 for best results.

deposit_rates

A map of product_id -> daily deposit rates, values returned as decimal rates (% = rate * 100).

borrow_rates

A map of product_id -> daily borrow rates, values returned as decimal rates (% = rate * 100).

cumulative_inflows

A map of product_id -> cumulative inflows a.k.a deposits in base token units.

cumulative_outflows

A map of product_id -> cumulative outflows a.k.a withdraws in base token units.

tvl

The total value locked in USD.

API Rate limits