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
  • Events
Export as PDF
  1. Developer Resources
  2. API
  3. Archive (indexer)

Summary

Query historical summary for a given subaccount.

PreviousEventsNextCandlesticks

Last updated 6 months ago

Use this query to get a summary of the latest actions per product on Vertex for a subaccount. Tracked variables (ex. net interest) are extrapolated to the timestamp or set of timestamps provided.

Rate limits

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

See more details in

Request

Query subaccount events/actions ordered by submission index desc.

POST [ARCHIVE_ENDPOINT]

Body

{
  "summary": {
    "subaccount": "0x83ebb666624b69a7f2832201abbe29cb024adacb64656661756c740000000000",
    "timestamp": 1680112395
  }
}

Query subaccount events/actions ordered by submission index desc for multiple timestamps.

POST [ARCHIVE_ENDPOINT]

Body

{
  "summary": {
    "subaccount": "0x83ebb666624b69a7f2832201abbe29cb024adacb64656661756c740000000000",
    "timestamp": [1701658647, 1702263447]
}

Request Parameters

Parameter
Type
Required
Description

subaccount

string

Yes

A bytes32 sent as a hex string; includes the address and the subaccount identifier.

timestamp

number / string / array

No

Timestamp (unix epoch in seconds) can be used to only return events/actions created <= timestamp; can also provide a list of timestamps to retrieve multiple subaccount summaries (one per timestamp).

Response

{
  "events": [
    {
      "subaccount": "0x83ebb666624b69a7f2832201abbe29cb024adacb64656661756c740000000000",
      "product_id": 0,
      "submission_idx": "518256",
      "event_type": "MatchOrders",
      "pre_balance": {
        "spot": {
          "product_id": 0,
          "lp_balance": {
            "amount": "0"
          },
          "balance": {
            "amount": "1567818694844038525989019",
            "last_cumulative_multiplier_x18": "1000000000476886196"
          }
        }
      },
      "post_balance": {
        "spot": {
          "product_id": 0,
          "lp_balance": {
            "amount": "0"
          },
          "balance": {
            "amount": "1428431854272617069991200",
            "last_cumulative_multiplier_x18": "1000000000808292967"
          }
        }
      },
      "product": {
        "spot": {
          "product_id": 0,
          "oracle_price_x18": "1000000000000000000",
          "risk": {
            "long_weight_initial_x18": "1000000000000000000",
            "short_weight_initial_x18": "1000000000000000000",
            "long_weight_maintenance_x18": "1000000000000000000",
            "short_weight_maintenance_x18": "1000000000000000000",
            "large_position_penalty_x18": "0"
          },
          "config": {
            "token": "0x179522635726710dd7d2035a81d856de4aa7836c",
            "interest_inflection_util_x18": "800000000000000000",
            "interest_floor_x18": "10000000000000000",
            "interest_small_cap_x18": "40000000000000000",
            "interest_large_cap_x18": "1000000000000000000"
          },
          "state": {
            "cumulative_deposits_multiplier_x18": "1000000000808292967",
            "cumulative_borrows_multiplier_x18": "1001154153566524438",
            "total_deposits_normalized": "60000214479093135179448220326611",
            "total_borrows_normalized": "169999262859411808802770937"
          },
          "lp_state": {
            "supply": "0",
            "quote": {
              "amount": "0",
              "last_cumulative_multiplier_x18": "0"
            },
            "base": {
              "amount": "0",
              "last_cumulative_multiplier_x18": "0"
            }
          },
          "book_info": {
            "size_increment": "0",
            "price_increment_x18": "0",
            "min_size": "0",
            "collected_fees": "0",
            "lp_spread_x18": "0"
          }
        }
      },
      "net_interest_unrealized": "473391988035391",
      "net_interest_cumulative": "473391988035391",
      "net_funding_unrealized": "0",
      "net_funding_cumulative": "0",
      "net_entry_unrealized": "1281028547512068335139982",
      "net_entry_cumulative": "1281028547512068335139982",
      "net_entry_lp_unrealized": "0",
      "net_entry_lp_cumulative": "0"
    }
  ]
}{
{
  "events": {
    "1701658647": [
      {
        "subaccount": "0x026b4e03bd8594ad51e76819eb7d258a0a61634464656661756c740000000000",
        "product_id": 0,
        "submission_idx": "3603232",
        "event_type": "withdraw_collateral",
        "pre_balance": {
          "spot": {
            "product_id": 0,
            "lp_balance": {
              "amount": "0"
            },
            "balance": {
              "amount": "212551456254336996356",
              "last_cumulative_multiplier_x18": "1002075435567227032"
            }
          }
        },
        "post_balance": {
          "spot": {
            "product_id": 0,
            "lp_balance": {
              "amount": "0"
            },
            "balance": {
              "amount": "254383865047",
              "last_cumulative_multiplier_x18": "1002260095946339057"
            }
          }
        },
        "product": {
          "spot": {
            "product_id": 0,
            "oracle_price_x18": "1000000000000000000",
            "risk": {
              "long_weight_initial_x18": "1000000000000000000",
              "short_weight_initial_x18": "1000000000000000000",
              "long_weight_maintenance_x18": "1000000000000000000",
              "short_weight_maintenance_x18": "1000000000000000000",
              "large_position_penalty_x18": "0"
            },
            "config": {
              "token": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
              "interest_inflection_util_x18": "800000000000000000",
              "interest_floor_x18": "10000000000000000",
              "interest_small_cap_x18": "40000000000000000",
              "interest_large_cap_x18": "1000000000000000000"
            },
            "state": {
              "cumulative_deposits_multiplier_x18": "1002260095946339057",
              "cumulative_borrows_multiplier_x18": "1013817528132357235",
              "total_deposits_normalized": "24779124564350181804421599",
              "total_borrows_normalized": "9020100592505968637140518"
            },
            "lp_state": {
              "supply": "0",
              "quote": {
                "amount": "0",
                "last_cumulative_multiplier_x18": "0"
              },
              "base": {
                "amount": "0",
                "last_cumulative_multiplier_x18": "0"
              }
            },
            "book_info": {
              "size_increment": "0",
              "price_increment_x18": "0",
              "min_size": "0",
              "collected_fees": "0",
              "lp_spread_x18": "0"
            }
          }
        },
        "net_interest_unrealized": "-5475057465",
        "net_interest_cumulative": "-4614717421192842964",
        "net_funding_unrealized": "0",
        "net_funding_cumulative": "0",
        "net_entry_unrealized": "344757238",
        "net_entry_cumulative": "2629533999999999996",
        "net_entry_lp_unrealized": "0",
        "net_entry_lp_cumulative": "0"
      }
    ],
    "1702263447": [
      {
        "subaccount": "0x026b4e03bd8594ad51e76819eb7d258a0a61634464656661756c740000000000",
        "product_id": 0,
        "submission_idx": "3603232",
        "event_type": "withdraw_collateral",
        "pre_balance": {
          "spot": {
            "product_id": 0,
            "lp_balance": {
              "amount": "0"
            },
            "balance": {
              "amount": "212551456254336996356",
              "last_cumulative_multiplier_x18": "1002075435567227032"
            }
          }
        },
        "post_balance": {
          "spot": {
            "product_id": 0,
            "lp_balance": {
              "amount": "0"
            },
            "balance": {
              "amount": "254424107404",
              "last_cumulative_multiplier_x18": "1002418648885030382"
            }
          }
        },
        "product": {
          "spot": {
            "product_id": 0,
            "oracle_price_x18": "1000000000000000000",
            "risk": {
              "long_weight_initial_x18": "1000000000000000000",
              "short_weight_initial_x18": "1000000000000000000",
              "long_weight_maintenance_x18": "1000000000000000000",
              "short_weight_maintenance_x18": "1000000000000000000",
              "large_position_penalty_x18": "0"
            },
            "config": {
              "token": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
              "interest_inflection_util_x18": "800000000000000000",
              "interest_floor_x18": "10000000000000000",
              "interest_small_cap_x18": "40000000000000000",
              "interest_large_cap_x18": "1000000000000000000"
            },
            "state": {
              "cumulative_deposits_multiplier_x18": "1002418648885030382",
              "cumulative_borrows_multiplier_x18": "1014365262860502753",
              "total_deposits_normalized": "24642893804018179224462069",
              "total_borrows_normalized": "8918001388347543586903844"
            },
            "lp_state": {
              "supply": "0",
              "quote": {
                "amount": "0",
                "last_cumulative_multiplier_x18": "0"
              },
              "base": {
                "amount": "0",
                "last_cumulative_multiplier_x18": "0"
              }
            },
            "book_info": {
              "size_increment": "0",
              "price_increment_x18": "0",
              "min_size": "0",
              "collected_fees": "0",
              "lp_spread_x18": "0"
            }
          }
        },
        "net_interest_unrealized": "-5434815108",
        "net_interest_cumulative": "-4614717421152600607",
        "net_funding_unrealized": "0",
        "net_funding_cumulative": "0",
        "net_entry_unrealized": "344757238",
        "net_entry_cumulative": "2629533999999999996",
        "net_entry_lp_unrealized": "0",
        "net_entry_lp_cumulative": "0"
      }
    ]
  }
}

Response Fields

Events

  • Net cumulative: the net difference in that quantity since the beginning of time. For example, if I want to compute total amount paid out in funding between two events, you can subtract the net_funding_cumulative of the larger event by the net_funding_cumulative of the smaller event.

  • Net unrealized: similar to net_cumulative, but for net_unrealized, we have the caveat that when the magnitude of your position decreases, the magnitude of net_unrealized decreases by the same amount.

Field name
Description

submission_idx

Used to uniquely identify the blockchain transaction that generated the event; you can use it to grab the relevant transaction in the txs section.

product_id

The id of of the product the event is associated with.

event_type

Name of the transaction type this event corresponds to.

subaccount

The subaccount associated to the event.

pre_balance

The state of your balance before the event happened.

post_balance

The state of your balance after the event happened.

product

The state of the product throughout the event.

API Rate limits