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:
LiquidateSubaccount
liquidate_subaccount
DepositCollateral
deposit_collateral
WithdrawCollateral
withdraw_collateral
SettlePnl
settle_pnl
MatchOrders
match_orders
MintLp
mint_lp
BurnLp
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
subaccount
string
No
a bytes32
sent as a hex string; includes the address and the subaccount identifier.
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 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 events created <= max_time
limit
object {"raw": number } or
{"txs": number }
No
specifying
raw
limit: max number of events to return. defaults to100
. max possible of500
.specifying
txs
limit: max number of txs to return.
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.
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.
Txs
submission_idx
Unique identifier of the transaction.
product_id
Product associated to the transaction.
tx
Raw data of the corresponding transaction e.g: match_orders
with all associated data.
timestamp
The unix epoch in seconds of when the transaction took place.
Last updated