Summary

Query historical summary for a given subaccount.

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 API Rate limits

Request

Query subaccount events/actions ordered by submission index desc.

POST [ARCHIVE_ENDPOINT]

Body

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

Request Parameters

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"
    }
  ]
}{

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.

Last updated