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)

Orders

Query historical orders by subaccount or order digests.

PreviousArchive (indexer)NextMatches

Last updated 2 months ago

Rate limits

  • 480 requests/min or 80 requests/10secs per IP address. (weight = 5)

See more details in

Request

Query subaccount matched orders, ordered by submission index desc.

POST [ARCHIVE_ENDPOINT]

Body

{
  "orders": {
    "product_ids": [
      1,
      2,
      3,
      4
    ],
    "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
    "max_time": 1679728762,
    "isolated": false
    "limit": 5
  }
}

Query orders by digests.

POST [ARCHIVE_ENDPOINT]

Body

{
  "orders": {
    "digests": [
      "0xf4f7a8767faf0c7f72251a1f9e5da590f708fd9842bf8fcdeacbaa0237958fff",
      "0x0495a88fb3b1c9bed9b643b8e264a391d04cdd48890d81cd7c4006473f28e361"
    ]
  }
}

Request Parameters

Parameter
Type
Required
Description

subaccount

string

conditional

A bytes32 sent as a hex string; includes the address and the subaccount identifier. must be provided when querying by subaccount.

product_ids

number[]

No

When provided, only return orders for the specified product ids; return orders for all products otherwise.

idx

number / string

No

When provided, only return orders with submission_idx <= idx

max_time

number / string

No

When idx is not provided, max_time (unix epoch in seconds) can be used to only return orders created <= max_time

digests

string[]

conditional

Must be provided when querying by digests. only return orders matching the specified digests. note: cannot specify digests alongside with subaccount , product_ids or max_time

limit

number

No

Max number of orders to return. defaults to 100. max possible of 500. note: when querying by digests limit must be <= total digests provided

isolated

bool

No

When provided --

  • true: only returns orders associated to isolated positions.

  • false: only return matches associated to the cross-subaccount.

defaults to null. In which case it returns everything.

Response

{
    "orders": [
        {
            "digest": "0xf4f7a8767faf0c7f72251a1f9e5da590f708fd9842bf8fcdeacbaa0237958fff",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
            "product_id": 4,
            "submission_idx": "563024",
            "last_fill_submission_idx": "563024",
            "amount": "20000000000000000000",
            "price_x18": "1751900000000000000000",
            "base_filled": "2320000000000000000",
            "quote_filled": "-4064898974794958991797",
            "fee": "812974794958991797",
            "expiration": "4611686020107120163",
            "nonce": "1761323164913106944",
            "isolated": false
        },
        {
            "digest": "0x0495a88fb3b1c9bed9b643b8e264a391d04cdd48890d81cd7c4006473f28e361",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
            "product_id": 3,
            "submission_idx": "563019",
            "last_fill_submission_idx": "563019",
            "amount": "-20000000000000000000",
            "price_x18": "1750800000000000000000",
            "base_filled": "-1159999999999999999",
            "quote_filled": "2030293721599999999999",
            "fee": "609278400000000000",
            "expiration": "4611686020107119905",
            "nonce": "1761322893628669952",
            "isolated": false
        },
        {
            "digest": "0x29078702ad95615f0040eafdccc85cbf92569bf9656be928f9f17c5ccbb52041",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
            "product_id": 4,
            "submission_idx": "563018",
            "last_fill_submission_idx": "563018",
            "amount": "-20000000000000000000",
            "price_x18": "1750700000000000000000",
            "base_filled": "-1160000000000000000",
            "quote_filled": "2030380837600000000000",
            "fee": "406162400000000000",
            "expiration": "4611686020107119880",
            "nonce": "1761322865074896896",
            "isolated": false
        },
    ]
}

Response Fields

Field name
Description

digest

The unique hash of the order.

subaccount

The subaccount that placed the order.

product_id

The id of of the product the order was executed for.

submission_idx

Used to uniquely identify the blockchain transaction that generated the order. For multi-fills orders, this is the submission_idx of the first fill.

last_fill_submission_idx

For multi-fills orders, this is the submission_idx of the last fill. For single fill orders, it has the same value as submission_idx.

amount

The original amount of base to buy or sell.

price_x18

The original order price.

base_filled

The total amount of base (e.g: BTC) filled on this order.

quote_filled

The total amount of quote (e.g: USDC) filled on this order.

fee

The total amount of fee paid on this order.

expiration

The original order expiration.

nonce

The original order nonce.

See to learn more.

API Rate limits
Isolated Margin