Events
Query Vertex events by subaccount, products, event types, etc.
Rate limits
Dynamic based on
limit
param provided (weight = 2 + limit / 10)E.g: With
limit=100
, you can make up to 200 requests per min or 33 requests / 10 secs.
See more details in API Rate limits
Available Events
Each event corresponds to a transaction type in Vertex. See below available events and their event_type
mapping:
Event Name | Event Type Value |
---|---|
| liquidate_subaccount |
| deposit_collateral |
| withdraw_collateral |
| settle_pnl |
| match_orders |
| mint_lp |
| burn_lp |
Event Limits
You can specify 2 types of limit
on the query:
raw
: the max number of events to return.txs
: the max number of transactions to return. note: one transaction can emit multiple events, by specifying this limit, you will get all the events associated to the transactions in the response.
Request
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
subaccount | string | No | a |
product_ids | number[] | No | when provided, only return events for the specified product ids; return events for all products otherwise. |
event_types | string[] | No | when provided, only return events for the specified event types; return all events otherwise. |
idx | number / string | No | when provided, only return events with |
max_time | number / string | No | when |
limit | object {"raw": number } or {"txs": number } | No |
|
Response
Note:
the response includes a
txs
field which contains the relevant transactions to the events. There are>=1 events
per transaction.both
events
andtxs
are in descending order bysubmission_idx
.
use the
submission_idx
to associate anevent
to it's corresponding transaction.
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 thenet_funding_cumulative
of the smaller event.Net unrealized: similar to
net_cumulative
, but fornet_unrealized
, we have the caveat that when the magnitude of your position decreases, the magnitude of net_unrealizeddecreases
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 |
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. |
Txs
Field name | Description |
---|---|
submission_idx | Unique identifier of the transaction. |
product_id | Product associated to the transaction. |
tx | Raw data of the corresponding transaction e.g: |
timestamp | The unix epoch in seconds of when the transaction took place. |
Last updated