events.proto
path vega/events/v1/events.proto
package vega.events.v1
Messages
AuctionEvent
Auction event indicating a change in auction state, for example starting or ending an auction
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
opening_auction | bool | True if the event indicates an auction opening and False otherwise |
leave | bool | True if the event indicates leaving auction mode and False otherwise |
start | int64 | Timestamp containing the start time for an auction |
end | int64 | Timestamp containing the end time for an auction |
trigger | vega.AuctionTrigger | Reason this market is/was in auction |
extension_trigger | vega.AuctionTrigger | If an auction was ongoing, but was extended for whatever reason, this field will be set to the trigger type indicating which component extended the auction |
BeginBlock
BeginBlock
Name | Type | Description |
---|---|---|
height | uint64 | |
timestamp | int64 | |
hash | string |
BusEvent
Bus event is a container for event bus events emitted by Vega
Name | Type | Description |
---|---|---|
id | string | Unique event ID for the message |
block | string | The batch or block of transactions that the events relate to |
type | BusEventType | The type of bus event. Must be one of the list below: |
time_update | TimeUpdate | Time update events |
ledger_movements | LedgerMovements | Transfer responses update events |
position_resolution | PositionResolution | Position resolution events |
order | vega.Order | Order events |
account | vega.Account | Account events |
party | vega.Party | Party events |
trade | vega.Trade | Trade events |
margin_levels | vega.MarginLevels | Margin level update events |
proposal | vega.Proposal | Proposal events for governance |
vote | vega.Vote | Vote events for governance |
market_data | vega.MarketData | Market data events |
node_signature | vega.commands.v1.NodeSignature | Node signature events |
loss_socialization | LossSocialization | Loss socialization events |
settle_position | SettlePosition | Position settlement events |
settle_distressed | SettleDistressed | Position distressed events |
market_created | vega.Market | Market created events |
asset | vega.Asset | Asset events |
market_tick | MarketTick | Market tick events |
withdrawal | vega.Withdrawal | Withdrawal events |
deposit | vega.Deposit | Deposit events |
auction | AuctionEvent | Auction events |
risk_factor | vega.RiskFactor | Risk factor events |
network_parameter | vega.NetworkParameter | Network parameter events |
liquidity_provision | vega.LiquidityProvision | LiquidityProvision events |
market_updated | vega.Market | Market created events |
oracle_spec | vega.OracleSpec | OracleSpec events |
oracle_data | vega.OracleData | OracleData events |
delegation_balance | DelegationBalanceEvent | Delegation balance events |
validator_score | ValidatorScoreEvent | Validator score calculated |
epoch_event | EpochEvent | Epoch update events |
validator_update | ValidatorUpdate | Validator update events |
stake_linking | StakeLinking | Staking event |
reward_payout | RewardPayoutEvent | Reward payout event |
checkpoint | CheckpointEvent | Checkpoint was created |
key_rotation | KeyRotation | Key rotation took place |
state_var | StateVar | State variable consensus state transition update |
network_limits | vega.NetworkLimits | Network limits events |
transfer | Transfer | Transfer event |
ranking_event | ValidatorRankingEvent | Ranking event |
erc20_multisig_signer_event | ERC20MultiSigSignerEvent | ERC20 multi sig signer event |
erc20_multisig_set_threshold_event | ERC20MultiSigThresholdSetEvent | ERC20 multi sig set threshold event |
erc20_multisig_signer_added | ERC20MultiSigSignerAdded | ERC20 multi sig signer added |
erc20_multisig_signer_removed | ERC20MultiSigSignerRemoved | ERC20 multi sig signer removed |
position_state_event | PositionStateEvent | Position status for a party in a market |
ethereum_key_rotation | EthereumKeyRotation | Ethereum key rotation took place |
protocol_upgrade_event | ProtocolUpgradeEvent | Protocol upgrade proposal updates |
begin_block | BeginBlock | Core is starting to process a new block |
end_block | EndBlock | Core finished processing a block |
protocol_upgrade_started | ProtocolUpgradeStarted | Core is starting a protocol upgrade |
settle_market | SettleMarket | Settle market event for data-node to update positions for settled markets |
transaction_result | TransactionResult | Result of a transaction processed by the network |
core_snapshot_event | CoreSnapshotData | Core snapshot has been taken at the end of the block |
protocol_upgrade_data_node_ready | ProtocolUpgradeDataNodeReady | Core snapshot has been taken at the end of the block |
distressed_orders | DistressedOrders | Parties that had their orders closed because they were distressed |
expired_orders | ExpiredOrders | Orders that expired for a given market |
distressed_positions | DistressedPositions | Open positions on the market that are/were distressed |
stop_order | StopOrderEvent | A stop order event |
funding_period | FundingPeriod | Start or end of a funding period. |
funding_period_data_point | FundingPeriodDataPoint | Data point within a funding period. |
team_created | TeamCreated | Event notifying of the creation of a team.m |
team_updated | TeamUpdated | Event notifying of an update to a team. |
referee_switched_team | RefereeSwitchedTeam | Event notifying that a referee switched teams. |
referee_joined_team | RefereeJoinedTeam | Event notifying that a referee joined a team. |
referral_program_started | ReferralProgramStarted | Event notifying that a referral program has started. |
referral_program_updated | ReferralProgramUpdated | Event notifying that a referral program has been updated. |
referral_program_ended | ReferralProgramEnded | Event notifying that a referral program has ended. |
referral_set_created | ReferralSetCreated | Event notifying a referral set has been created. |
referee_joined_referral_set | RefereeJoinedReferralSet | Event notifying a referee has joined a referral set. |
party_activity_streak | PartyActivityStreak | Event notifying of an update to a party's activity streak |
volume_discount_program_started | VolumeDiscountProgramStarted | Event notifying that a volume discount program has started. |
volume_discount_program_updated | VolumeDiscountProgramUpdated | Event notifying that a volume discount program has been updated. |
volume_discount_program_ended | VolumeDiscountProgramEnded | Event notifying that a volume discount program has ended. |
referral_set_stats_updated | ReferralSetStatsUpdated | Event notifying of an update to a referral set's statistics. |
vesting_stats_updated | VestingStatsUpdated | Event notifying of an update to the vesting statistics. |
volume_discount_stats_updated | VolumeDiscountStatsUpdated | Event notifying of an update to the volume discount statistics. |
fees_stats | FeesStats | Event notifying of an update the fees stats for a market. |
funding_payments | FundingPayments | Event notifying of funding payments at the end of a funding period. |
paid_liquidity_fees_stats | PaidLiquidityFeesStats | Event notifying of an update to the liqudity fees stats for a market. |
vesting_balances_summary | VestingBalancesSummary | Event notifying of an update to the vesting and locked balances. |
transfer_fees | TransferFees | Event notifying of fees related to a transfer being paid. |
transfer_fees_discount | TransferFeesDiscount | Event notifying of a party's available discounts for transfer fees, per asset. |
party_margin_mode_updated | PartyMarginModeUpdated | Event notifying of a party's margin mode update on a market. |
party_profile_updated | PartyProfileUpdated | Event notifying of a party's profile update. |
teams_stats_updated | TeamsStatsUpdated | Event notifying of an update of teams' statistics. |
market | MarketEvent | Market tick events |
tx_err_event | TxErrorEvent | Transaction error events, not included in the ALL event type |
version | uint32 | Version of bus event |
chain_id | string | |
tx_hash | string |
CheckpointEvent
Name | Type | Description |
---|---|---|
hash | string | |
block_hash | string | |
block_height | uint64 |
CoreSnapshotData
CoreSnapshotData represents the core snapshot data.
Name | Type | Description |
---|---|---|
block_height | uint64 | Block height at which snapshot was taken |
block_hash | string | Hash of the snapshot block |
core_version | string | Semver version number of the core. |
protocol_upgrade_block | bool | Indicates if the snapshot is taken as part of protocol upgrade |
DelegationBalanceEvent
DelegationBalanceEvent - updates on the delegation balance of a party to a node in the current epoch in effect
Name | Type | Description |
---|---|---|
party | string | |
node_id | string | |
amount | string | |
epoch_seq | string |
DistressedOrders
Distressed order contains the party IDs for all parties that were distressed and had their orders closed, but did not need to be closed out after cancelling their orders
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
parties | repeated string | Slice of Party IDs i.e. each party's public key for the event |
DistressedPositions
Distressed positions event contains the party IDs for all parties that were distressed, had their orders closed but because of insufficient volume on the book could not be fully closed out. These parties are distressed, but still hold an active position on the book as a result. Once enough volume is on the book to close them out, a SettleDistressed event will be sent. In case they manage to reduce their position, or meet the margin requirements, this status will be updated. Parties that are no longer distressed but active will be listed in the safe_parties field.
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
distressed_parties | repeated string | Slice of party IDs i.e. each party's public key, that are distressed but still have open volume |
safe_parties | repeated string | Slice of party IDs i.e. each party's public key, who were distressed but now can safely maintain their position |
ERC20MultiSigSignerAdded
Name | Type | Description |
---|---|---|
signature_id | string | ID of the signature bundle |
validator_id | string | Node ID of the Vega node to be added |
timestamp | int64 | Time at which this happened |
new_signer | string | Ethereum address of the new signer |
submitter | string | Address of the submitter of the transaction |
nonce | string | Nonce used. |
epoch_seq | string | Epoch that the node was added for |
ERC20MultiSigSignerEvent
Name | Type | Description |
---|---|---|
id | string | |
type | ERC20MultiSigSignerEvent.Type | |
signer | string | |
nonce | string | |
block_time | int64 | |
tx_hash | string | |
log_index | uint64 | |
block_number | uint64 |
ERC20MultiSigSignerRemoved
Name | Type | Description |
---|---|---|
signature_submitters | repeated ERC20MultiSigSignerRemovedSubmitter | List containing all the IDs of bundle generated There should be one bundle generated for every validators in the validator set |
validator_id | string | Node ID of the Vega node which is to be removed |
timestamp | int64 | Time at which this happened |
old_signer | string | Ethereum address of the signer to be removed |
nonce | string | Nonce used. |
epoch_seq | string | Epoch that the node was removed for |
ERC20MultiSigSignerRemovedSubmitter
Name | Type | Description |
---|---|---|
signature_id | string | Signature ID of the signer removed. |
submitter | string | Address of the submitter of the transaction |
ERC20MultiSigThresholdSetEvent
Name | Type | Description |
---|---|---|
id | string | |
new_threshold | uint32 | |
nonce | string | |
block_time | int64 | |
tx_hash | string | |
log_index | uint64 | |
block_number | uint64 |
EndBlock
EndBlock
Name | Type | Description |
---|---|---|
height | uint64 |
EpochEvent
Epoch details
Name | Type | Description |
---|---|---|
seq | uint64 | Sequence number that increases by one each epoch |
action | vega.EpochAction | Action tells us what action is taking place |
start_time | int64 | Vega time at which this epoch started |
expire_time | int64 | Vega time at which this epoch should end |
end_time | int64 | Vega time at which this epoch actually ended |
EthereumKeyRotation
Event that contains information about an Ethereum key rotation
Name | Type | Description |
---|---|---|
node_id | string | Node ID of the node that rotated their Ethereum key |
old_address | string | Ethereum address that was previously associated with the node |
new_address | string | Ethereum address that is newly associated with the node |
block_height | uint64 | Block height when the key rotation took effect |
ExpiredOrders
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
order_ids | repeated string | Slice of expired order IDs |
FeesStats
Fees rewards and discounts paid / received per parties during an epoch
Name | Type | Description |
---|---|---|
market | string | Market the fees were paid in |
asset | string | Settlement asset of the market. |
epoch_seq | uint64 | Epoch for which these stats where valid. |
total_rewards_received | repeated PartyAmount | Total referral rewards received by the referrer of the referral set. |
referrer_rewards_generated | repeated ReferrerRewardsGenerated | Referral rewards generated by all referee taker fees. |
referees_discount_applied | repeated PartyAmount | Total referral discounts applied to all referee taker fees. |
volume_discount_applied | repeated PartyAmount | Total volume discounts applied to all referee taker fees. |
total_maker_fees_received | repeated PartyAmount | Total maker fees received by the maker side. |
maker_fees_generated | repeated MakerFeesGenerated | Maker fees paid by all trade aggressors, and which makers the fees were paid to. |
total_fees_paid_and_received | repeated PartyAmount | Total trading fees received and paid by the party. |
FundingPayment
The amount gained or lost by a party as a result of a funding payment.
Name | Type | Description |
---|---|---|
party_id | string | ID of the party. |
amount | string | The amount paid, this can be negative for parties who lost at the end of the funding period. |
FundingPayments
Event notifying of funding payments at the end of a funding period.
Name | Type | Description |
---|---|---|
market_id | string | ID of the market. |
seq | uint64 | Sequence number of the funding period associated with these payments. |
payments | repeated FundingPayment | List of parties and the payment amounts, this can be negative for parties who lost at the end of the funding period. |
FundingPeriod
Event notifying on the details of a funding interval for a perpetuals market.
Name | Type | Description |
---|---|---|
market_id | string | ID of the market for which this funding period relates to. |
seq | uint64 | Sequence number of the funding period. |
start | int64 | Time in Unix nanoseconds when the funding period started. |
end | optional int64 | Time in Unix nanoseconds when the funding period ended. |
funding_payment | optional string | Funding payment for this period as the difference between the time-weighted average price of the external and internal data point. |
funding_rate | optional string | Percentage difference between the time-weighted average price of the external and internal data point. |
internal_twap | optional string | TWAP for this period based on the internal data-points. |
external_twap | optional string | TWAP for this period based on the external data-points. |
FundingPeriodDataPoint
Event notifying a data point for a funding period.
Name | Type | Description |
---|---|---|
market_id | string | Market ID which the data point relates to. |
seq | uint64 | Sequence number of the funding period this data point belongs to. |
data_point_type | FundingPeriodDataPoint.Source | Origin of the data point. |
price | string | Price of the asset as seen by this data point. |
timestamp | int64 | Timestamp in Unix nanoseconds of when the data point was received. |
twap | string | The TWAP for this source with this data-point added. |
KeyRotation
Event that contains information about a Vega key rotation
Name | Type | Description |
---|---|---|
node_id | string | Node ID of the node that rotated their Vega key |
old_pub_key | string | Vega public key that was previously associated with the node |
new_pub_key | string | Vega public key that is newly associated with the node |
block_height | uint64 | Block height when the key rotation took effect |
LedgerMovements
Transfer responses event contains a collection of transfer information
Name | Type | Description |
---|---|---|
ledger_movements | repeated vega.LedgerMovement | One or more entries containing internal transfer information |
LossSocialization
Loss socialization event contains details on the amount of wins unable to be distributed
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
party_id | string | Party ID (public key) for the event |
amount | string | Amount distributed |
MakerFeesGenerated
Maker fees generated by the trade aggressor
Name | Type | Description |
---|---|---|
taker | string | Party that paid the fees. |
maker_fees_paid | repeated PartyAmount | Amount of maker fees paid by the taker to the maker. |
MarketEvent
MarketEvent - the common denominator for all market events interface has a method to return a string for logging
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
payload | string | Payload is a unique information string |
MarketTick
Market tick event contains the time value for when a particular market was last processed on Vega
Name | Type | Description |
---|---|---|
id | string | Market ID for the event |
time | int64 | Timestamp containing latest update from Vega blockchain aka Vega-time |
OneOffGovernanceTransfer
Name | Type | Description |
---|---|---|
deliver_on | int64 |
OneOffTransfer
Name | Type | Description |
---|---|---|
deliver_on | int64 |
PaidLiquidityFeesStats
Name | Type | Description |
---|---|---|
market | string | Market the fees were paid in. |
asset | string | Settlement asset of the market. |
epoch_seq | uint64 | Epoch for which these stats where valid. |
total_fees_paid | string | Total fees paid across all parties. |
fees_paid_per_party | repeated PartyAmount | Fees paid per party. |
PartyActivityStreak
The updated activity streak of a party at end of epoch
Name | Type | Description |
---|---|---|
party | string | The party. |
active_for | uint64 | How many epoch this party has been active for. |
inactive_for | uint64 | how many epoch this party has been inactive for. |
is_active | bool | Is this party considered active or not. |
reward_distribution_activity_multiplier | string | The current rewards distribution multiplier for this party. |
reward_vesting_activity_multiplier | string | The vesting multiplier for this party. |
epoch | uint64 | The epoch this information is relevant to. |
traded_volume | string | Party's traded volume at the end of the given epoch |
open_volume | string | Party's open interest volume at the end of the given epoch |
PartyAmount
A pair of a party and amount
Name | Type | Description |
---|---|---|
party | string | Receiving party ID. |
amount | string | Amount received. |
quantum_amount | string | Amount value in quantum. |
PartyLockedBalance
A party's locked balance for a given asset.
Name | Type | Description |
---|---|---|
asset | string | Asset ID. |
until_epoch | uint64 | Epoch in which the balance will be released. |
balance | string | Locked balance. |
PartyMarginModeUpdated
Name | Type | Description |
---|---|---|
market_id | string | Unique ID of the market in which the update happened. |
party_id | string | Unique ID of the party that updated their margin mode. |
margin_mode | vega.MarginMode | Updated margin mode. |
margin_factor | optional string | Margin factor for the market. Isolated mode only. |
min_theoretical_margin_factor | optional string | Minimum theoretical margin factor for the market. Isolated mode only. |
max_theoretical_leverage | optional string | Maximum theoretical leverage for the market. Isolated mode only. |
at_epoch | uint64 | Epoch at which the update happened. |
PartyProfileUpdated
Name | Type | Description |
---|---|---|
updated_profile | vega.PartyProfile | Party's profile updated. |
PartyVestingBalance
Balance that is being vested for the party.
Name | Type | Description |
---|---|---|
asset | string | Asset ID. |
balance | string | Balance that is vested. |
PartyVestingStats
The vesting stats for a given party.
Name | Type | Description |
---|---|---|
party_id | string | The party. |
reward_bonus_multiplier | string | The bonus multiplier applied on the reward. |
quantum_balance | string | The balance of the party, in quantum. |
PartyVestingSummary
Summary of a party's vesting balances
Name | Type | Description |
---|---|---|
party | string | Party ID. |
party_locked_balances | repeated PartyLockedBalance | List of locked balances. |
party_vesting_balances | repeated PartyVestingBalance | List of vesting balances. |
PartyVolumeDiscountStats
Volume discount stats for a given party.
Name | Type | Description |
---|---|---|
party_id | string | Party ID. |
discount_factor | string | Discount factor applied to fees. |
running_volume | string | The party's running volume. |
PositionResolution
Position resolution event contains information on distressed trades
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
distressed | int64 | Number of distressed traders |
closed | int64 | Number of close outs |
mark_price | string | Mark price as a string representing a scaled price |
PositionStateEvent
Position state event contains the current position state for a single party in a single market
Name | Type | Description |
---|---|---|
party_id | string | Party ID for this position update |
market_id | string | Market ID for this position update |
size | int64 | Current position |
potential_buys | int64 | Potential orders |
potential_sells | int64 | |
vw_buy_price | string | Volume weighted prices |
vw_sell_price | string |
ProtocolUpgradeDataNodeReady
Event indicating the data node is ready for protocol upgrade
Name | Type | Description |
---|---|---|
last_block_height | uint64 |
ProtocolUpgradeEvent
Name | Type | Description |
---|---|---|
upgrade_block_height | uint64 | Block height at which to perform the upgrade |
vega_release_tag | string | Release tag for the vega binary |
approvers | repeated string | Tendermint validators that have agreed to the upgrade |
status | ProtocolUpgradeProposalStatus | Status of the proposal |
ProtocolUpgradeStarted
Event indicating the core is starting a protocol upgrade
Name | Type | Description |
---|---|---|
last_block_height | uint64 |
RecurringGovernanceTransfer
Name | Type | Description |
---|---|---|
start_epoch | uint64 | |
end_epoch | optional uint64 | |
dispatch_strategy | optional vega.DispatchStrategy |
RecurringTransfer
Name | Type | Description |
---|---|---|
start_epoch | uint64 | |
end_epoch | optional uint64 | |
factor | string | |
dispatch_strategy | vega.DispatchStrategy |
RefereeJoinedReferralSet
Name | Type | Description |
---|---|---|
set_id | string | Unique ID of the referral set the referee joined. |
referee | string | Party that joined the set. |
joined_at | int64 | Time in Unix nanoseconds when the party joined the set. |
at_epoch | uint64 | Epoch at which the party joined the set. |
RefereeJoinedTeam
Name | Type | Description |
---|---|---|
team_id | string | The unique identifier of the team the referee joined. |
referee | string | The party that joined the team. |
joined_at | int64 | Time in Unix nanoseconds when the party joined a team. |
at_epoch | uint64 | Epoch at which the party joined the team. |
RefereeStats
Name | Type | Description |
---|---|---|
party_id | string | Unique ID of the party. |
discount_factor | string | Discount factor applied to the party. |
epoch_notional_taker_volume | string | Current referee notional taker volume |
RefereeSwitchedTeam
Name | Type | Description |
---|---|---|
from_team_id | string | The unique identifier of the team the referee left. |
to_team_id | string | The unique identifier of the team joined. |
referee | string | The party that switched team. |
switched_at | int64 | Time in Unix nanoseconds when the party switched team. This time acts as the joining time. |
at_epoch | uint64 | Epoch at which the party switched the team. |
ReferralProgramEnded
Name | Type | Description |
---|---|---|
version | uint64 | Program update version. |
id | string | Unique ID of the referral program. |
ended_at | int64 | Time in Unix nanoseconds when the referral program ended. |
at_epoch | uint64 | Epoch at which the referral program ended. |
ReferralProgramStarted
Name | Type | Description |
---|---|---|
program | vega.ReferralProgram | Referral program that has started. |
started_at | int64 | Time in Unix nanoseconds when the referral program started. |
at_epoch | uint64 | Epoch at which the referral program started. |
ReferralProgramUpdated
Name | Type | Description |
---|---|---|
program | vega.ReferralProgram | The updated referral program. |
updated_at | int64 | Time in Unix nanoseconds when the referral program was updated. |
at_epoch | uint64 | Epoch at which the referral program was updated. |
ReferralSetCreated
Name | Type | Description |
---|---|---|
set_id | string | Unique ID of the created set. |
referrer | string | Party that created the set. |
created_at | int64 | Time in Unix nanoseconds when the set was created. |
updated_at | int64 | Time in Unix nanoseconds when the set was updated. |
ReferralSetStatsUpdated
Name | Type | Description |
---|---|---|
set_id | string | Unique ID of the set. |
at_epoch | uint64 | Epoch at which the set's statistics are updated. |
referral_set_running_notional_taker_volume | string | Running volume for the set based on the window length of the current referral program. |
referees_stats | repeated RefereeStats | Referees' statistics for that epoch. |
reward_factor | string | Reward factor applied to the trades. |
rewards_multiplier | string | Rewards multiplier applied to the trades. |
rewards_factor_multiplier | string | Rewards factor multiplier for the trades. |
was_eligible | bool | Indicates if the referral set was eligible to be part of the referral program. |
referrer_taker_volume | string | Taker volume of the referrer |
ReferrerRewardsGenerated
Rewards generated for referrers by each of their referees
Name | Type | Description |
---|---|---|
referrer | string | Referrer party. |
generated_reward | repeated PartyAmount | Amount of rewards generated per party. |
RewardPayoutEvent
Name | Type | Description |
---|---|---|
party | string | |
epoch_seq | string | |
asset | string | |
amount | string | |
percent_of_total_reward | string | |
timestamp | int64 | |
reward_type | string | |
locked_until_epoch | string | |
quantum_amount | string | |
game_id | optional string |
SettleDistressed
Settle distressed event contains information on distressed trading parties who are closed out Note: Any PositionResolution event (market level) will most likely be followed by a number of these events
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
party_id | string | Party ID i.e. a party's public key for the event |
margin | string | Margin value as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
price | string | Price as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
SettleMarket
Settle market event to notify data node that a market has been settled so positions and PL can be updated accordingly
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
price | string | Price of settlement as a string |
position_factor | string | Position factor - 10 ^ number of position decimal places |
SettlePosition
Settle position event contains position settlement information for a party
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the event |
party_id | string | Party ID (public key) for the event |
price | string | Price of settlement as a string |
trade_settlements | repeated TradeSettlement | A collection of 1 or more trade settlements |
position_factor | string | Position factor - 10 ^ number of position decimal places |
StakeLinking
StakeLinking - an event notifying of stake being deposited or removed for a given party These events are emitted for every Staking deposit or removed accepted by the network
Name | Type | Description |
---|---|---|
id | string | Internal ID for this staking event |
type | StakeLinking.Type | Stake linking event type. |
ts | int64 | Timestamp in Unix nanoseconds of when the event was emitted by Ethereum. |
party | string | Party to whom the event is directed at. |
amount | string | Amount of stake deposited or removed. |
status | StakeLinking.Status | Status of the event. |
finalized_at | int64 | Time at which the Vega network finalised the state of the event. |
tx_hash | string | Hash of the transaction in which the event happened. |
block_height | uint64 | Block when the event happened. |
block_time | int64 | Block time. |
log_index | uint64 | Log index. |
ethereum_address | string | Ethereum address from which the stake link was initiated. |
StateVar
StateVar event updates on state changes in state variable consensus
Name | Type | Description |
---|---|---|
id | string | |
event_id | string | |
state | string |
StopOrderEvent
Name | Type | Description |
---|---|---|
submission | vega.commands.v1.OrderSubmission | |
stop_order | vega.StopOrder |
StreamStartEvent
Name | Type | Description |
---|---|---|
chain_id | string |
TeamCreated
Name | Type | Description |
---|---|---|
team_id | string | The unique identifier of the created team. |
referrer | string | The party that created the team. |
name | string | Name of the team. |
team_url | optional string | Link to the team's homepage. |
avatar_url | optional string | Link to an image of the team's avatar. |
created_at | int64 | Time in Unix nanoseconds when the team is created. |
closed | bool | Tells if a party can join the team or not. |
at_epoch | uint64 | Epoch at which the team was created. |
allow_list | repeated string | List of public keys that are allowed to join the team. |
TeamMemberStats
Name | Type | Description |
---|---|---|
party_id | string | The party ID of the team member. |
notional_volume | string | Team members' notional volume for the epoch. |
TeamStats
Name | Type | Description |
---|---|---|
team_id | string | The unique identifier of the team. |
members_stats | repeated TeamMemberStats | Statistics for each team member. |
TeamUpdated
Name | Type | Description |
---|---|---|
team_id | string | The unique identifier for the updated team. |
name | string | Name of the team. |
team_url | optional string | Link to the team's homepage. |
avatar_url | optional string | Link to an image of the team's avatar. |
closed | bool | Tells if a party can join the team or not. |
allow_list | repeated string | List of public keys that are allowed to join the team. |
TeamsStatsUpdated
Stats for all teams.
Name | Type | Description |
---|---|---|
at_epoch | uint64 | Epoch at which the statistics are updated. |
stats | repeated TeamStats | All teams' stats. |
TimeUpdate
Time update event contains the latest time update from Vega blockchain and indicates the start of a new block
Name | Type | Description |
---|---|---|
timestamp | int64 | Timestamp containing latest update from Vega blockchain aka Vega-time |
TradeSettlement
Trade settlement is part of the settle position event
Name | Type | Description |
---|---|---|
size | int64 | Size of trade settlement |
price | string | Price of settlement as string (in asset decimals) |
market_price | string | Price of settlement as a string (in market decimals) |
TransactionResult
TransactionResult.FailureDetails
Name | Type | Description |
---|---|---|
error | string | Error message explaining the reason for the transaction failing processing |
TransactionResult.SuccessDetails
TBD
Name | Type | Description |
---|
Transfer
Name | Type | Description |
---|---|---|
id | string | |
from | string | |
from_account_type | vega.AccountType | |
to | string | |
to_account_type | vega.AccountType | |
asset | string | |
amount | string | |
reference | string | |
status | Transfer.Status | |
timestamp | int64 | |
reason | optional string | |
game_id | optional string | ID of the game this transfer was made in relation to. A transfer is made to members of a team or participants who take part in a game and are rewarded for their participation |
one_off | OneOffTransfer | |
recurring | RecurringTransfer | |
one_off_governance | OneOffGovernanceTransfer | |
recurring_governance | RecurringGovernanceTransfer |
TransferFees
Name | Type | Description |
---|---|---|
transfer_id | string | Transfer that triggered the collection of fees. |
amount | string | Amount of fees paid. |
epoch | uint64 | Epoch when the transfer was dispatched, and fees were paid. |
discount_applied | string | Amount that was subtracted from the transfer fee based on available discounts. |
TransferFeesDiscount
Name | Type | Description |
---|---|---|
party | string | Party that the transfer fee discount applies to. |
asset | string | Asset that the transfer fee discount is relevant to. |
amount | string | Amount that the transfer fee was discounted by. |
epoch | uint64 | Epoch in which the discount was first available. |
TxErrorEvent
ValidatorRankingEvent
Event that explains the status of the validator for the coming epoch
Name | Type | Description |
---|---|---|
node_id | string | |
stake_score | string | Stake based score - no anti-whaling |
performance_score | string | Performance base score |
ranking_score | string | Final score |
previous_status | string | Status of the validator in the previous epoch |
next_status | string | Status of the validator in the next epoch |
epoch_seq | string | Epoch seq for which the status is valid |
tm_voting_power | uint32 | Tendermint voting power of the validator |
ValidatorScoreEvent
ValidatorScoreEvent is the score a validator gets for a given epoch
Name | Type | Description |
---|---|---|
node_id | string | |
epoch_seq | string | |
validator_score | string | |
normalised_score | string | |
validator_performance | string | |
raw_validator_score | string | |
validator_status | string | |
multisig_score | string |
ValidatorUpdate
Validator update event contains information about validator node
Name | Type | Description |
---|---|---|
node_id | string | Node ID of the validator node |
vega_pub_key | string | Vega public key of validator node |
ethereum_address | string | Ethereum public key of validator node |
tm_pub_key | string | Public key of Tendermint |
info_url | string | URL with more info on the node |
country | string | Country code (ISO 3166-1 alpha-2) for the location of the node |
name | string | Name of the validator |
avatar_url | string | AvatarURL of the validator |
vega_pub_key_index | uint32 | Vega public key derivation index |
added | bool | Flag indicating if the validator has been added to or removed from vega |
from_epoch | uint64 | Epoch in which the announced pending node will start participating in the network |
submitter_address | string | Ethereum public key being used as the submitter to allow automatic signature generation |
epoch_seq | uint64 | Epoch in which the node was announced or removed from the network |
VestingBalancesSummary
Summary of the vesting and locked balances for an epoch
Name | Type | Description |
---|---|---|
epoch_seq | uint64 | Epoch for which these balances are valid. |
parties_vesting_summary | repeated PartyVestingSummary | Parties' summaries. |
VestingStatsUpdated
Stats of all parties invested in the vesting program.
Name | Type | Description |
---|---|---|
at_epoch | uint64 | Epoch at which the vesting statistics are updated. |
stats | repeated PartyVestingStats | All parties stats. |
VolumeDiscountProgramEnded
Name | Type | Description |
---|---|---|
version | uint64 | Program update version. |
id | string | Unique ID of the volume discount program. |
ended_at | int64 | Time in Unix nanoseconds when the referral program ended. |
at_epoch | uint64 | Epoch at which the referral program ended. |
VolumeDiscountProgramStarted
Name | Type | Description |
---|---|---|
program | vega.VolumeDiscountProgram | Volume discount program that has started. |
started_at | int64 | Time in Unix nanoseconds when the volume discount program started. |
at_epoch | uint64 | Epoch at which the volume discount program started. |
VolumeDiscountProgramUpdated
Name | Type | Description |
---|---|---|
program | vega.VolumeDiscountProgram | The updated volume discount program. |
updated_at | int64 | Time in Unix nanoseconds when the volume discount program was updated. |
at_epoch | uint64 | Epoch at which the volume discount program was updated. |
VolumeDiscountStatsUpdated
Stats of all parties eligible for volume discount.
Name | Type | Description |
---|---|---|
at_epoch | uint64 | Epoch at which the volume discount statistics are updated. |
stats | repeated PartyVolumeDiscountStats | All parties' stats. |
Enums
BusEventType
Bus event type is used to specify a type of event It has 2 styles of event: Single values (e.g. BUS_EVENT_TYPE_ORDER) where they represent one data item Group values (e.g. BUS_EVENT_TYPE_AUCTION) where they represent a group of data items
Name | Number | Description |
---|---|---|
BUS_EVENT_TYPE_UNSPECIFIED | 0 | Default value, always invalid |
BUS_EVENT_TYPE_ALL | 1 | Events of ALL event types, used when filtering stream from event bus |
BUS_EVENT_TYPE_TIME_UPDATE | 2 | Event for blockchain time updates |
BUS_EVENT_TYPE_LEDGER_MOVEMENTS | 3 | Event for when a transfer happens internally, contains the transfer information |
BUS_EVENT_TYPE_POSITION_RESOLUTION | 4 | Event indicating position resolution has occurred |
BUS_EVENT_TYPE_ORDER | 5 | Event for order updates, both new and existing orders |
BUS_EVENT_TYPE_ACCOUNT | 6 | Event for account updates |
BUS_EVENT_TYPE_PARTY | 7 | Event for party updates |
BUS_EVENT_TYPE_TRADE | 8 | Event indicating a new trade has occurred |
BUS_EVENT_TYPE_MARGIN_LEVELS | 9 | Event indicating margin levels have changed for a party |
BUS_EVENT_TYPE_PROPOSAL | 10 | Event for proposal updates (for governance) |
BUS_EVENT_TYPE_VOTE | 11 | Event indicating a new vote has occurred (for governance) |
BUS_EVENT_TYPE_MARKET_DATA | 12 | Event for market data updates |
BUS_EVENT_TYPE_NODE_SIGNATURE | 13 | Event for a new signature for a Vega node |
BUS_EVENT_TYPE_LOSS_SOCIALIZATION | 14 | Event indicating loss socialisation occurred for a party |
BUS_EVENT_TYPE_SETTLE_POSITION | 15 | Event for when a position is being settled |
BUS_EVENT_TYPE_SETTLE_DISTRESSED | 16 | Event for when a position is distressed |
BUS_EVENT_TYPE_MARKET_CREATED | 17 | Event indicating a new market was created |
BUS_EVENT_TYPE_ASSET | 18 | Event for when an asset is added to Vega |
BUS_EVENT_TYPE_MARKET_TICK | 19 | Event indicating a market tick event |
BUS_EVENT_TYPE_WITHDRAWAL | 20 | Event for when a withdrawal occurs |
BUS_EVENT_TYPE_DEPOSIT | 21 | Event for when a deposit occurs |
BUS_EVENT_TYPE_AUCTION | 22 | Event indicating a change in auction state, for example starting or ending an auction |
BUS_EVENT_TYPE_RISK_FACTOR | 23 | Event indicating a risk factor has been updated |
BUS_EVENT_TYPE_NETWORK_PARAMETER | 24 | Event indicating a network parameter has been added or updated |
BUS_EVENT_TYPE_LIQUIDITY_PROVISION | 25 | Event indicating a liquidity provision has been created or updated |
BUS_EVENT_TYPE_MARKET_UPDATED | 26 | Event indicating a new market was created |
BUS_EVENT_TYPE_ORACLE_SPEC | 27 | Event indicating an oracle spec has been created or updated |
BUS_EVENT_TYPE_ORACLE_DATA | 28 | Event indicating that an oracle data has been broadcast |
BUS_EVENT_TYPE_DELEGATION_BALANCE | 29 | Event indicating that an delegation balance of a party to a node for current epoch has changed |
BUS_EVENT_TYPE_VALIDATOR_SCORE | 30 | Event indicating the validator score for the given epoch |
BUS_EVENT_TYPE_EPOCH_UPDATE | 31 | Event indicating the start or end of an epoch |
BUS_EVENT_TYPE_VALIDATOR_UPDATE | 32 | Event indicating that validator node has been updated |
BUS_EVENT_TYPE_STAKE_LINKING | 33 | Event indicating a new staking event have been processed by the network |
BUS_EVENT_TYPE_REWARD_PAYOUT_EVENT | 34 | Event indicating the payout of a reward has been initiated |
BUS_EVENT_TYPE_CHECKPOINT | 35 | Event indicating a new checkpoint was created |
BUS_EVENT_TYPE_STREAM_START | 36 | Event indicating stream is starting |
BUS_EVENT_TYPE_KEY_ROTATION | 37 | Event indicating key rotation took place |
BUS_EVENT_TYPE_STATE_VAR | 38 | Event indicating state transitions in state variable consensus |
BUS_EVENT_TYPE_NETWORK_LIMITS | 39 | Event indicating network limits set or updated |
BUS_EVENT_TYPE_TRANSFER | 40 | Event indicating a update for a transfer |
BUS_EVENT_TYPE_VALIDATOR_RANKING | 41 | Event indicating the ranking of validator and their status in Vega |
BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_EVENT | 42 | Event indicating a new multi sig signer event have been processed |
BUS_EVENT_TYPE_ERC20_MULTI_SIG_SET_THRESHOLD | 43 | Event indicating the erc20 multi sig threshold have been updated |
BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_ADDED | 44 | Event indicating a new signer has been added to the ERC-20 multisig |
BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_REMOVED | 45 | Event indicating a signer has been removed from the ERC-20 multisig |
BUS_EVENT_TYPE_POSITION_STATE | 46 | Event indicating that a party's position has changed |
BUS_EVENT_TYPE_ETHEREUM_KEY_ROTATION | 47 | Event indicating Ethereum key rotation took place |
BUS_EVENT_TYPE_PROTOCOL_UPGRADE_PROPOSAL | 48 | Event indicating protocol upgrade proposal updates |
BUS_EVENT_TYPE_BEGIN_BLOCK | 49 | Event indicating the core is starting to process a new block |
BUS_EVENT_TYPE_END_BLOCK | 50 | Event indicating the core finished to process a block |
BUS_EVENT_TYPE_PROTOCOL_UPGRADE_STARTED | 51 | Event indicating the core is starting a protocol upgrade |
BUS_EVENT_TYPE_SETTLE_MARKET | 52 | Event indicating the market has stopped and settled |
BUS_EVENT_TYPE_TRANSACTION_RESULT | 53 | Event indicating the result of a transaction processed by the network |
BUS_EVENT_TYPE_SNAPSHOT_TAKEN | 54 | Event indicating a snapshot was taken at this block height |
BUS_EVENT_TYPE_PROTOCOL_UPGRADE_DATA_NODE_READY | 55 | Event data node uses to notify that it is ready to upgrade |
BUS_EVENT_TYPE_DISTRESSED_ORDERS_CLOSED | 56 | Event indicating parties had orders closed because they were distressed, but were not closed out. |
BUS_EVENT_TYPE_EXPIRED_ORDERS | 57 | Event indicating parties had orders closed because they were distressed, but were not closed out. |
BUS_EVENT_TYPE_DISTRESSED_POSITIONS | 58 | Event indicating parties have become, or were, distressed but still have an active position. |
BUS_EVENT_TYPE_SPOT_LIQUIDITY_PROVISION | 59 | Event indicating a spot liquidity provision has been created or updated. |
BUS_EVENT_TYPE_STOP_ORDER | 60 | Event indicating a stop order has been submitted or updated. |
BUS_EVENT_TYPE_FUNDING_PERIOD | 61 | Event indicating the start or end of a funding period. |
BUS_EVENT_TYPE_FUNDING_PERIOD_DATA_POINT | 62 | Event indicating a data point for a funding period has been received. |
BUS_EVENT_TYPE_TEAM_CREATED | 63 | Event indicating a team has been created. |
BUS_EVENT_TYPE_TEAM_UPDATED | 64 | Event indicating a team has been updated. |
BUS_EVENT_TYPE_REFEREE_SWITCHED_TEAM | 65 | Event indicating a referee switched team. |
BUS_EVENT_TYPE_REFEREE_JOINED_TEAM | 66 | Event indicating a referee joined a team. |
BUS_EVENT_TYPE_REFERRAL_PROGRAM_STARTED | 67 | Event indicating a referral program started. |
BUS_EVENT_TYPE_REFERRAL_PROGRAM_UPDATED | 68 | Event indicating a referral program has been updated. |
BUS_EVENT_TYPE_REFERRAL_PROGRAM_ENDED | 69 | Event indicating a referral program ended. |
BUS_EVENT_TYPE_REFERRAL_SET_CREATED | 70 | Event indicating a set has been created. |
BUS_EVENT_TYPE_REFEREE_JOINED_REFERRAL_SET | 71 | Event indicating a referee joined a set. |
BUS_EVENT_TYPE_PARTY_ACTIVITY_STREAK | 72 | Event indicating the updated activity streak for a party |
BUS_EVENT_TYPE_VOLUME_DISCOUNT_PROGRAM_STARTED | 73 | Event indicating a volume discount program started. |
BUS_EVENT_TYPE_VOLUME_DISCOUNT_PROGRAM_UPDATED | 74 | Event indicating a volume discount program has been updated. |
BUS_EVENT_TYPE_VOLUME_DISCOUNT_PROGRAM_ENDED | 75 | Event indicating a volume discount program ended. |
BUS_EVENT_TYPE_REFERRAL_SET_STATS_UPDATED | 76 | Event indicating the updated statistics for a referral set. |
BUS_EVENT_TYPE_VESTING_STATS_UPDATED | 77 | Event indicating the updated statistics for the vesting program. |
BUS_EVENT_TYPE_VOLUME_DISCOUNT_STATS_UPDATED | 78 | Event indicating the updated statistics for the volume discount. |
BUS_EVENT_TYPE_FEES_STATS_UPDATED | 79 | Event indicating the fees statistics per market at end of epoch |
BUS_EVENT_TYPE_FUNDING_PAYMENTS | 80 | Event indicating a funding period has ended and resulted in funding payment transfers. |
BUS_EVENT_TYPE_PAID_LIQUIDITY_FEES_STATS_UPDATED | 81 | Event used to report the updated paid liquidity fee statistics for the market at the end of the epoch |
BUS_EVENT_TYPE_VESTING_SUMMARY | 82 | Event used to report the summary of vesting and locked balances at the end of the epoch |
BUS_EVENT_TYPE_TRANSFER_FEES_PAID | 83 | Event used to link ledger entries to the transfer that triggered the fees being collected. |
BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED | 84 | Event indicating that a party's available transfer fee discount has changed, per asset. |
BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED | 85 | Event indicating that a party updated their margin mode on a market. |
BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED | 86 | Event indicating that a party updated their profile. |
BUS_EVENT_TYPE_TEAMS_STATS_UPDATED | 87 | Event indicating that teams' statistics have been updated. |
BUS_EVENT_TYPE_MARKET | 101 | Event indicating a market related event, for example when a market opens |
BUS_EVENT_TYPE_TX_ERROR | 201 | Event used to report failed transactions back to a user, this is excluded from the ALL type |
ERC20MultiSigSignerEvent.Type
Name | Number | Description |
---|---|---|
TYPE_UNSPECIFIED | 0 | |
TYPE_ADDED | 1 | |
TYPE_REMOVED | 2 |
FundingPeriodDataPoint.Source
Name | Number | Description |
---|---|---|
SOURCE_UNSPECIFIED | 0 | Default value |
SOURCE_EXTERNAL | 1 | Data point is from an external data source, such as an oracle, and represents the spot price of the underlying asset. |
SOURCE_INTERNAL | 2 | Data point from within Vega such as the mark price after performing mark-to-market. |
ProtocolUpgradeProposalStatus
Name | Number | Description |
---|---|---|
PROTOCOL_UPGRADE_PROPOSAL_STATUS_UNSPECIFIED | 0 | |
PROTOCOL_UPGRADE_PROPOSAL_STATUS_PENDING | 1 | The proposal is pending |
PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED | 2 | The proposal is approved |
PROTOCOL_UPGRADE_PROPOSAL_STATUS_REJECTED | 3 | The proposal is rejected |
StakeLinking.Status
Name | Number | Description |
---|---|---|
STATUS_UNSPECIFIED | 0 | Default value |
STATUS_PENDING | 1 | Indicates an event waiting for confirmation from the Vega network |
STATUS_ACCEPTED | 2 | Indicates an event accepted by the Vega network |
STATUS_REJECTED | 3 | Indicates an event rejected by the Vega network |
StakeLinking.Type
Name | Number | Description |
---|---|---|
TYPE_UNSPECIFIED | 0 | Default value |
TYPE_LINK | 1 | Indicate of a stake deposit instruction |
TYPE_UNLINK | 2 | Indicate of a stake remove instruction |
Transfer.Status
Name | Number | Description |
---|---|---|
STATUS_UNSPECIFIED | 0 | Default value |
STATUS_PENDING | 1 | Indicates a transfer still being processed |
STATUS_DONE | 2 | Indicates a transfer accepted by the Vega network |
STATUS_REJECTED | 3 | Indicates a transfer rejected by the Vega network |
STATUS_STOPPED | 4 | Indicates a transfer stopped by the Vega network e.g: no funds left to cover the transfer |
STATUS_CANCELLED | 5 | Indicates a transfer cancelled by the user |