code.vegaprotocol.io/vega@v0.79.0/protos/sources/vega/events/v1/events.proto (about) 1 syntax = "proto3"; 2 3 package vega.events.v1; 4 5 import "vega/assets.proto"; 6 import "vega/commands/v1/commands.proto"; 7 import "vega/commands/v1/data.proto"; 8 import "vega/commands/v1/validator_commands.proto"; 9 import "vega/governance.proto"; 10 import "vega/markets.proto"; 11 import "vega/oracle.proto"; 12 import "vega/vega.proto"; 13 14 option go_package = "code.vegaprotocol.io/vega/protos/vega/events/v1"; 15 16 // Time weighted notional position update for the current epoch. 17 // The time weighted notional position is used to determine whether 18 // a party is eligible for receiving rewards at the end of an epoch. 19 // These updates are provided to facilitate knowing whether or not a party 20 // is on track to qualify. 21 message TimeWeightedNotionalPositionUpdated { 22 // Epoch the time weighted notional position is relevant for 23 uint64 epoch_seq = 1; 24 // Asset ID for the position's settlement asset. 25 string asset = 2; 26 // Party holding the position 27 string party = 3; 28 // Game ID the time weighted notional position is calculated for. 29 string game_id = 4; 30 // Time weighted notional position from the end of the most recently completed epoch. 31 string time_weighted_notional_position = 5; 32 } 33 34 message AMM { 35 // ID of the AMM. 36 string id = 1; 37 // Party ID of the owner of the AMM. 38 string party_id = 2; 39 // Market ID that the AMM provides liquidity for. 40 string market_id = 3; 41 // Party ID that the AMM operates as. 42 string amm_party_id = 4; 43 // Amount committed to the AMM. 44 string commitment = 5; 45 // Liquidity parameters that define the size and range of the AMM's tradeable volume. 46 ConcentratedLiquidityParameters parameters = 6; 47 // Current status of the AMM. 48 Status status = 7; 49 // Reason for the AMM's current status. 50 StatusReason status_reason = 8; 51 // Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market. 52 string proposed_fee = 9; 53 optional Curve lower_curve = 10; 54 optional Curve upper_curve = 11; 55 // An AMM with an oracle driven base price will only be updated if abs(new-base-price / old-base-price - 1) >= minimum_price_change_trigger. 56 string minimum_price_change_trigger = 12; 57 58 enum Status { 59 STATUS_UNSPECIFIED = 0; 60 // AMM is active on the market and is posting tradable volume. 61 STATUS_ACTIVE = 1; 62 // AMM submission was rejected. 63 STATUS_REJECTED = 2; 64 // AMM has been cancelled by the owner and is no longer trading. 65 STATUS_CANCELLED = 3; 66 // AMM has been stopped by the network and is no longer trading. 67 STATUS_STOPPED = 4; 68 // AMM will only trade such that it will reduce its position. 69 STATUS_REDUCE_ONLY = 5; 70 // AMM is waiting for a base price from its configured data source. 71 STATUS_PENDING = 6; 72 } 73 74 enum StatusReason { 75 STATUS_REASON_UNSPECIFIED = 0; 76 // AMM was cancelled by its owner. 77 STATUS_REASON_CANCELLED_BY_PARTY = 1; 78 // Party does not have enough funds in their general account to meet the AMM's commitment. 79 STATUS_REASON_CANNOT_FILL_COMMITMENT = 2; 80 // Party already has an AMM operating on this market and cannot create another one. 81 STATUS_REASON_PARTY_ALREADY_OWNS_AMM_FOR_MARKET = 3; 82 // AMM was liquidated and stopped by the network. 83 STATUS_REASON_PARTY_CLOSED_OUT = 4; 84 // AMM was stopped by the network because the market it operated in was closed. 85 STATUS_REASON_MARKET_CLOSED = 5; 86 // Commitment amount was below the network wide minimum, or its price bounds are too wide, such that the volume is spread thinly creating zero-volume price-levels. 87 STATUS_REASON_COMMITMENT_TOO_LOW = 6; 88 // AMM was unable to rebase its fair-price such that it does not cross with existing orders. 89 STATUS_REASON_CANNOT_REBASE = 7; 90 } 91 92 // Liquidity parameters that define the range and shape of the AMM's curve. 93 message ConcentratedLiquidityParameters { 94 // Base price bound configuration for the AMM. 95 string base = 1; 96 // Upper price bound configuration for the AMM. If unset, the AMM will never hold a short position. 97 optional string lower_bound = 2; 98 // Lower price bound configuration for the AMM. If unset, the AMM will never hold a long position. 99 optional string upper_bound = 3; 100 // Leverage at upper bounds. 101 optional string leverage_at_upper_bound = 4; 102 // Leverage at lower bounds. 103 optional string leverage_at_lower_bound = 5; 104 // Data source that is used to re-price the AMM's base. 105 optional string data_source_id = 6; 106 } 107 108 message Curve { 109 // Virtual liquidity for the given AMM curve. 110 string virtual_liquidity = 1; 111 // Maximum tradable volume on the AMM curve. 112 string theoretical_position = 2; 113 } 114 } 115 116 // Summary of the vesting and locked balances for an epoch 117 message VestingBalancesSummary { 118 // Epoch for which these balances are valid. 119 uint64 epoch_seq = 1; 120 // Parties' summaries. 121 repeated PartyVestingSummary parties_vesting_summary = 2; 122 } 123 124 // Summary of a party's vesting balances 125 message PartyVestingSummary { 126 // Party ID. 127 string party = 1; 128 // List of locked balances. 129 repeated PartyLockedBalance party_locked_balances = 2; 130 // List of vesting balances. 131 repeated PartyVestingBalance party_vesting_balances = 3; 132 } 133 134 // A party's locked balance for a given asset. 135 message PartyLockedBalance { 136 // Asset ID. 137 string asset = 1; 138 // Epoch in which the balance will be released. 139 uint64 until_epoch = 2; 140 // Locked balance. 141 string balance = 3; 142 } 143 144 // Balance that is being vested for the party. 145 message PartyVestingBalance { 146 // Asset ID. 147 string asset = 1; 148 // Balance that is vested. 149 string balance = 2; 150 } 151 152 // Stats of all parties eligible for volume discount. 153 message VolumeDiscountStatsUpdated { 154 // Epoch at which the volume discount statistics are updated. 155 uint64 at_epoch = 1; 156 // All parties' stats. 157 repeated PartyVolumeDiscountStats stats = 2; 158 } 159 160 // Volume discount stats for a given party. 161 message PartyVolumeDiscountStats { 162 // Party ID. 163 string party_id = 1; 164 // deprecated. 165 string discount_factor = 2; 166 // The party's running volume. 167 string running_volume = 3; 168 // Discount factors applied to fees. 169 vega.DiscountFactors discount_factors = 4; 170 } 171 172 // Stats of all parties invested in the vesting program. 173 message VestingStatsUpdated { 174 // Epoch at which the vesting statistics are updated. 175 uint64 at_epoch = 1; 176 // All parties stats. 177 repeated PartyVestingStats stats = 2; 178 } 179 180 // The vesting stats for a given party. 181 message PartyVestingStats { 182 // The party. 183 string party_id = 1; 184 // The bonus multiplier applied on the reward. 185 string reward_bonus_multiplier = 2; 186 // The balance of the party, in quantum. 187 string quantum_balance = 3; 188 // Bonus multiplier applied on the reward, summed across all derived accounts. 189 string summed_reward_bonus_multiplier = 4; 190 // The balance of the party and derived keys, in quantum. 191 string summed_quantum_balance = 5; 192 } 193 194 // Fees rewards and discounts paid / received per parties during an epoch 195 message FeesStats { 196 reserved 10; 197 198 // Market the fees were paid in 199 string market = 1; 200 // Settlement asset of the market. 201 string asset = 2; 202 // Epoch for which these stats where valid. 203 uint64 epoch_seq = 3; 204 // Total referral rewards received by the referrer of the referral set. 205 repeated PartyAmount total_rewards_received = 4; 206 // Referral rewards generated by all referee taker fees. 207 repeated ReferrerRewardsGenerated referrer_rewards_generated = 5; 208 // Total referral discounts applied to all referee taker fees. 209 repeated PartyAmount referees_discount_applied = 6; 210 // Total volume discounts applied to all referee taker fees. 211 repeated PartyAmount volume_discount_applied = 7; 212 // Total maker fees received by the maker side. 213 repeated PartyAmount total_maker_fees_received = 8; 214 // Maker fees paid by all trade aggressors, and which makers the fees were paid to. 215 repeated MakerFeesGenerated maker_fees_generated = 9; 216 // Total trading fees received and paid by the party. 217 repeated PartyAmount total_fees_paid_and_received = 11; 218 } 219 220 // Rewards generated for referrers by each of their referees 221 message ReferrerRewardsGenerated { 222 // Referrer party. 223 string referrer = 1; 224 // Amount of rewards generated per party. 225 repeated PartyAmount generated_reward = 2; 226 } 227 228 // Maker fees generated by the trade aggressor 229 message MakerFeesGenerated { 230 // Party that paid the fees. 231 string taker = 1; 232 // Amount of maker fees paid by the taker to the maker. 233 repeated PartyAmount maker_fees_paid = 2; 234 } 235 236 // A pair of a party and amount 237 message PartyAmount { 238 // Receiving party ID. 239 string party = 1; 240 // Amount received. 241 string amount = 2; 242 // Amount value in quantum. 243 string quantum_amount = 3; 244 } 245 246 // The updated activity streak of a party at end of epoch 247 message PartyActivityStreak { 248 // The party. 249 string party = 1; 250 // How many epoch this party has been active for. 251 uint64 active_for = 2; 252 // how many epoch this party has been inactive for. 253 uint64 inactive_for = 3; 254 // Is this party considered active or not. 255 bool is_active = 4; 256 // The current rewards distribution multiplier for this party. 257 string reward_distribution_activity_multiplier = 5; 258 // The vesting multiplier for this party. 259 string reward_vesting_activity_multiplier = 6; 260 // The epoch this information is relevant to. 261 uint64 epoch = 7; 262 // Party's traded volume at the end of the given epoch 263 string traded_volume = 8; 264 // Party's open interest volume at the end of the given epoch 265 string open_volume = 9; 266 } 267 268 // Event notifying on the details of a funding interval for a perpetuals market. 269 message FundingPeriod { 270 // ID of the market for which this funding period relates to. 271 string market_id = 1; 272 // Sequence number of the funding period. 273 uint64 seq = 2; 274 // Time in Unix nanoseconds when the funding period started. 275 int64 start = 3; 276 // Time in Unix nanoseconds when the funding period ended. 277 optional int64 end = 4; 278 // Funding payment for this period as the difference between the time-weighted average price of the external and internal data point. 279 optional string funding_payment = 5; 280 // Percentage difference between the time-weighted average price of the external and internal data point. 281 optional string funding_rate = 6; 282 // TWAP for this period based on the internal data-points. 283 optional string internal_twap = 7; 284 // TWAP for this period based on the external data-points. 285 optional string external_twap = 8; 286 } 287 288 // The amount gained or lost by a party as a result of a funding payment. 289 message FundingPayment { 290 // ID of the party. 291 string party_id = 1; 292 // The amount paid, this can be negative for parties who lost at the end of the funding period. 293 string amount = 2; 294 } 295 296 // Event notifying of funding payments at the end of a funding period. 297 message FundingPayments { 298 // ID of the market. 299 string market_id = 1; 300 // Sequence number of the funding period associated with these payments. 301 uint64 seq = 2; 302 // List of parties and the payment amounts, this can be negative for parties who lost at the end of the funding period. 303 repeated FundingPayment payments = 3; 304 } 305 306 // Event notifying a data point for a funding period. 307 message FundingPeriodDataPoint { 308 enum Source { 309 // Default value 310 SOURCE_UNSPECIFIED = 0; 311 // Data point is from an external data source, such as an oracle, and represents the spot price of the underlying asset. 312 SOURCE_EXTERNAL = 1; 313 // Data point from within Vega such as the mark price after performing mark-to-market. 314 SOURCE_INTERNAL = 2; 315 } 316 317 // Market ID which the data point relates to. 318 string market_id = 1; 319 // Sequence number of the funding period this data point belongs to. 320 uint64 seq = 2; 321 // Origin of the data point. 322 Source data_point_type = 3; 323 // Price of the asset as seen by this data point. 324 string price = 4; 325 // Timestamp in Unix nanoseconds of when the data point was received. 326 int64 timestamp = 6; 327 // The TWAP for this source with this data-point added. 328 string twap = 7; 329 } 330 331 message StopOrderEvent { 332 commands.v1.OrderSubmission submission = 1; 333 vega.StopOrder stop_order = 2; 334 } 335 336 message ERC20MultiSigSignerAdded { 337 // ID of the signature bundle 338 string signature_id = 1; 339 // Node ID of the Vega node to be added 340 string validator_id = 2; 341 // Time at which this happened 342 int64 timestamp = 3; 343 // Ethereum address of the new signer 344 string new_signer = 4; 345 // Address of the submitter of the transaction 346 string submitter = 5; 347 // Nonce used. 348 string nonce = 6; 349 // Epoch that the node was added for 350 string epoch_seq = 7; 351 // EVM chain ID that the multisig control contract lives on. 352 string chain_id = 8; 353 } 354 355 message ERC20MultiSigSignerRemovedSubmitter { 356 // Signature ID of the signer removed. 357 string signature_id = 1; 358 // Address of the submitter of the transaction 359 string submitter = 2; 360 } 361 362 message ERC20MultiSigSignerRemoved { 363 // List containing all the IDs of bundle generated 364 // There should be one bundle generated for every validators 365 // in the validator set 366 repeated ERC20MultiSigSignerRemovedSubmitter signature_submitters = 1; 367 // Node ID of the Vega node which is to be removed 368 string validator_id = 2; 369 // Time at which this happened 370 int64 timestamp = 3; 371 // Ethereum address of the signer to be removed 372 string old_signer = 4; 373 // Nonce used. 374 string nonce = 5; 375 // Epoch that the node was removed for 376 string epoch_seq = 6; 377 // EVM chain ID that the multisig control contract lives on. 378 string chain_id = 8; 379 } 380 381 message Transfer { 382 enum Status { 383 // Default value 384 STATUS_UNSPECIFIED = 0; 385 // Indicates a transfer still being processed 386 STATUS_PENDING = 1; 387 // Indicates a transfer accepted by the Vega network 388 STATUS_DONE = 2; 389 // Indicates a transfer rejected by the Vega network 390 STATUS_REJECTED = 3; 391 // Indicates a transfer stopped by the Vega network 392 // e.g: no funds left to cover the transfer 393 STATUS_STOPPED = 4; 394 // Indicates a transfer cancelled by the user 395 STATUS_CANCELLED = 5; 396 } 397 398 string id = 1; 399 string from = 2; 400 vega.AccountType from_account_type = 3; 401 string to = 4; 402 vega.AccountType to_account_type = 5; 403 string asset = 6; 404 string amount = 7; 405 string reference = 8; 406 Status status = 9; 407 int64 timestamp = 10; 408 optional string reason = 11; 409 // ID of the game this transfer was made in relation to. A transfer is made to members of a team 410 // or participants who take part in a game and are rewarded for their participation 411 optional string game_id = 12; 412 413 oneof kind { 414 OneOffTransfer one_off = 101; 415 RecurringTransfer recurring = 102; 416 OneOffGovernanceTransfer one_off_governance = 103; 417 RecurringGovernanceTransfer recurring_governance = 104; 418 } 419 } 420 421 message OneOffGovernanceTransfer { 422 int64 deliver_on = 1; 423 } 424 425 message OneOffTransfer { 426 int64 deliver_on = 1; 427 } 428 429 message RecurringTransfer { 430 uint64 start_epoch = 1; 431 optional uint64 end_epoch = 2; 432 string factor = 3; 433 DispatchStrategy dispatch_strategy = 4; 434 } 435 436 message RecurringGovernanceTransfer { 437 uint64 start_epoch = 1; 438 optional uint64 end_epoch = 2; 439 optional DispatchStrategy dispatch_strategy = 3; 440 string factor = 4; 441 } 442 443 // StakeLinking - an event notifying of stake being deposited or removed for a given party 444 // These events are emitted for every Staking deposit or removed accepted by the network 445 message StakeLinking { 446 enum Type { 447 // Default value 448 TYPE_UNSPECIFIED = 0; 449 // Indicate of a stake deposit instruction 450 TYPE_LINK = 1; 451 // Indicate of a stake remove instruction 452 TYPE_UNLINK = 2; 453 } 454 455 enum Status { 456 // Default value 457 STATUS_UNSPECIFIED = 0; 458 // Indicates an event waiting for confirmation from the Vega network 459 STATUS_PENDING = 1; 460 // Indicates an event accepted by the Vega network 461 STATUS_ACCEPTED = 2; 462 // Indicates an event rejected by the Vega network 463 STATUS_REJECTED = 3; 464 } 465 466 // Internal ID for this staking event 467 string id = 1; 468 // Stake linking event type. 469 Type type = 2; 470 // Timestamp in Unix nanoseconds of when the event was emitted by Ethereum. 471 int64 ts = 3; 472 // Party to whom the event is directed at. 473 string party = 4; 474 // Amount of stake deposited or removed. 475 string amount = 5; 476 // Status of the event. 477 Status status = 6; 478 // Time at which the Vega network finalised the state of the event. 479 int64 finalized_at = 7; 480 // Hash of the transaction in which the event happened. 481 string tx_hash = 8; 482 // Block when the event happened. 483 uint64 block_height = 9; 484 // Block time. 485 int64 block_time = 10; 486 // Log index. 487 uint64 log_index = 11; 488 // Ethereum address from which the stake link was initiated. 489 string ethereum_address = 12; 490 } 491 492 message ERC20MultiSigSignerEvent { 493 enum Type { 494 TYPE_UNSPECIFIED = 0; 495 TYPE_ADDED = 1; 496 TYPE_REMOVED = 2; 497 } 498 499 string id = 1; 500 Type type = 2; 501 string signer = 3; 502 string nonce = 4; 503 int64 block_time = 5; 504 string tx_hash = 6; 505 uint64 log_index = 7; 506 uint64 block_number = 8; 507 string chain_id = 9; 508 } 509 510 message ERC20MultiSigThresholdSetEvent { 511 string id = 1; 512 uint32 new_threshold = 2; 513 string nonce = 3; 514 int64 block_time = 4; 515 string tx_hash = 5; 516 uint64 log_index = 6; 517 uint64 block_number = 7; 518 string chain_id = 8; 519 } 520 521 message CheckpointEvent { 522 string hash = 1; 523 string block_hash = 2; 524 uint64 block_height = 3; 525 } 526 527 message StreamStartEvent { 528 string chain_id = 1; 529 } 530 531 message RewardPayoutEvent { 532 string party = 1; 533 string epoch_seq = 2; 534 string asset = 3; 535 string amount = 4; 536 string percent_of_total_reward = 5; 537 int64 timestamp = 6; 538 string reward_type = 7; 539 reserved 8; 540 string locked_until_epoch = 9; 541 string quantum_amount = 10; 542 optional string game_id = 11; 543 } 544 545 // ValidatorScoreEvent is the score a validator gets for a given epoch 546 message ValidatorScoreEvent { 547 string node_id = 1; 548 string epoch_seq = 2; 549 string validator_score = 3; 550 string normalised_score = 4; 551 string validator_performance = 5; 552 string raw_validator_score = 6; 553 string validator_status = 7; 554 string multisig_score = 8; 555 } 556 557 // DelegationBalanceEvent - updates on the delegation balance of a party to a node in the current epoch in effect 558 message DelegationBalanceEvent { 559 string party = 1; 560 string node_id = 2; 561 string amount = 3; 562 string epoch_seq = 4; 563 } 564 565 // MarketEvent - the common denominator for all market events 566 // interface has a method to return a string for logging 567 message MarketEvent { 568 // Market ID for the event 569 string market_id = 1; 570 // Payload is a unique information string 571 string payload = 2; 572 } 573 574 message TransferFees { 575 // Transfer that triggered the collection of fees. 576 string transfer_id = 1; 577 // Amount of fees paid. 578 string amount = 2; 579 // Epoch when the transfer was dispatched, and fees were paid. 580 uint64 epoch = 3; 581 // Amount that was subtracted from the transfer fee based on available discounts. 582 string discount_applied = 4; 583 } 584 585 message TransferFeesDiscount { 586 // Party that the transfer fee discount applies to. 587 string party = 1; 588 // Asset that the transfer fee discount is relevant to. 589 string asset = 2; 590 // Amount that the transfer fee was discounted by. 591 string amount = 3; 592 // Epoch in which the discount was first available. 593 uint64 epoch = 4; 594 } 595 596 message TransactionResult { 597 enum Status { 598 // Default value, always invalid 599 STATUS_UNSPECIFIED = 0; 600 // The transaction succeeded. 601 STATUS_SUCCESS = 1; 602 // The transaction partially succeeded. 603 STATUS_PARTIAL_SUCCESS = 2; 604 // The transaction's final state is failure. 605 STATUS_FAILURE = 3; 606 } 607 608 // A mapping of a key to a list of errors. 609 message KeyErrors { 610 // The key. 611 string key = 1; 612 // The errors mapped to this key. 613 repeated string errors = 2; 614 } 615 616 // Unique party ID for the related party 617 string party_id = 1; 618 // Status of the transaction, if it succeeded or an error was raised. 619 bool status = 2; 620 // Hash of the transaction 621 string hash = 3; 622 // Status of the transaction. 623 // Backward compatible with previous events, 624 // as this field will default to UNSPECIFIED. 625 Status status_detail = 4; 626 627 // Transaction itself as received by the network 628 oneof transaction { 629 commands.v1.OrderSubmission order_submission = 101; 630 commands.v1.OrderAmendment order_amendment = 102; 631 commands.v1.OrderCancellation order_cancellation = 103; 632 commands.v1.ProposalSubmission proposal = 104; 633 commands.v1.VoteSubmission vote_submission = 105; 634 commands.v1.LiquidityProvisionSubmission liquidity_provision_submission = 106; 635 commands.v1.WithdrawSubmission withdraw_submission = 107; 636 commands.v1.DelegateSubmission delegate_submission = 108; 637 commands.v1.UndelegateSubmission undelegate_submission = 109; 638 commands.v1.LiquidityProvisionCancellation liquidity_provision_cancellation = 111; 639 commands.v1.LiquidityProvisionAmendment liquidity_provision_amendment = 112; 640 commands.v1.Transfer transfer = 113; 641 commands.v1.CancelTransfer cancel_transfer = 114; 642 commands.v1.AnnounceNode announce_node = 115; 643 commands.v1.OracleDataSubmission oracle_data_submission = 116; 644 commands.v1.ProtocolUpgradeProposal protocol_upgrade_proposal = 117; 645 commands.v1.IssueSignatures issue_signatures = 118; 646 commands.v1.BatchMarketInstructions batch_market_instructions = 119; 647 commands.v1.KeyRotateSubmission key_rotate_submission = 120; 648 commands.v1.EthereumKeyRotateSubmission ethereum_key_rotate_submission = 121; 649 commands.v1.StopOrdersSubmission stop_orders_submission = 122; 650 commands.v1.StopOrdersCancellation stop_orders_cancellation = 123; 651 commands.v1.CreateReferralSet create_referral_set = 124; 652 commands.v1.UpdateReferralSet update_referral_set = 125; 653 commands.v1.ApplyReferralCode apply_referral_code = 126; 654 commands.v1.UpdateMarginMode update_margin_mode = 127; 655 commands.v1.JoinTeam join_team = 128; 656 commands.v1.BatchProposalSubmission batch_proposal = 129; 657 commands.v1.UpdatePartyProfile update_party_profile = 130; 658 commands.v1.SubmitAMM submit_amm = 131; 659 commands.v1.AmendAMM amend_amm = 132; 660 commands.v1.CancelAMM cancel_amm = 133; 661 } 662 663 // extra details about the transaction processing 664 oneof extra { 665 SuccessDetails success = 1001; 666 FailureDetails failure = 1002; 667 } 668 669 message SuccessDetails { 670 // TBD 671 } 672 673 message FailureDetails { 674 // Error message explaining the reason for the transaction failing processing 675 string error = 1; 676 // Map of the detailed errors, if any. 677 repeated KeyErrors errors = 2; 678 } 679 } 680 681 message TxErrorEvent { 682 // This was the old restore checkpoint command 683 reserved 110; 684 685 // Unique party ID for the related party 686 string party_id = 1; 687 // Error message describing what went wrong 688 string err_msg = 2; 689 // Transaction that failed 690 oneof transaction { 691 commands.v1.OrderSubmission order_submission = 101; 692 commands.v1.OrderAmendment order_amendment = 102; 693 commands.v1.OrderCancellation order_cancellation = 103; 694 commands.v1.ProposalSubmission proposal = 104; 695 commands.v1.VoteSubmission vote_submission = 105; 696 commands.v1.LiquidityProvisionSubmission liquidity_provision_submission = 106; 697 commands.v1.WithdrawSubmission withdraw_submission = 107; 698 commands.v1.DelegateSubmission delegate_submission = 108; 699 commands.v1.UndelegateSubmission undelegate_submission = 109; 700 commands.v1.LiquidityProvisionCancellation liquidity_provision_cancellation = 111; 701 commands.v1.LiquidityProvisionAmendment liquidity_provision_amendment = 112; 702 commands.v1.Transfer transfer = 113; 703 commands.v1.CancelTransfer cancel_transfer = 114; 704 commands.v1.AnnounceNode announce_node = 115; 705 commands.v1.OracleDataSubmission oracle_data_submission = 116; 706 commands.v1.ProtocolUpgradeProposal protocol_upgrade_proposal = 117; 707 commands.v1.IssueSignatures issue_signatures = 118; 708 commands.v1.BatchMarketInstructions batch_market_instructions = 119; 709 } 710 } 711 712 // Time update event contains the latest time update from Vega blockchain and indicates the start of a new block 713 message TimeUpdate { 714 // Timestamp containing latest update from Vega blockchain aka Vega-time 715 int64 timestamp = 1; 716 } 717 718 // Epoch details 719 message EpochEvent { 720 // Sequence number that increases by one each epoch 721 uint64 seq = 1; 722 // Action tells us what action is taking place 723 vega.EpochAction action = 2; 724 // Vega time at which this epoch started 725 int64 start_time = 3; 726 // Vega time at which this epoch should end 727 int64 expire_time = 4; 728 // Vega time at which this epoch actually ended 729 int64 end_time = 5; 730 } 731 732 // Transfer responses event contains a collection of transfer information 733 message LedgerMovements { 734 // One or more entries containing internal transfer information 735 repeated LedgerMovement ledger_movements = 1; 736 } 737 738 // Position resolution event contains information on distressed trades 739 message PositionResolution { 740 // Market ID for the event 741 string market_id = 1; 742 // Number of distressed traders 743 int64 distressed = 2; 744 // Number of close outs 745 int64 closed = 3; 746 // Mark price as a string representing a scaled price 747 string mark_price = 4; 748 } 749 750 // Loss socialization event contains details on the amount of wins unable to be distributed 751 message LossSocialization { 752 // Market ID for the event 753 string market_id = 1; 754 // Party ID (public key) for the event 755 string party_id = 2; 756 // Amount distributed 757 string amount = 3; 758 // Type of transfer that resulted in loss socialization. 759 Type loss_type = 4; 760 761 enum Type { 762 // Default value. 763 TYPE_UNSPECIFIED = 0; 764 // Loss socialisation occurred during a settlement transfer (mark to market or final settlement). 765 TYPE_SETTLEMENT = 1; 766 // Loss socialisation occurred during a funding payment. 767 TYPE_FUNDING_PAYMENT = 2; 768 } 769 } 770 771 // Trade settlement is part of the settle position event 772 message TradeSettlement { 773 // Size of trade settlement 774 int64 size = 1; 775 // Price of settlement as string (in asset decimals) 776 string price = 2; 777 // Price of settlement as a string (in market decimals) 778 string market_price = 3; 779 } 780 781 // Settle position event contains position settlement information for a party 782 message SettlePosition { 783 // Market ID for the event 784 string market_id = 1; 785 // Party ID (public key) for the event 786 string party_id = 2; 787 // Price of settlement as a string 788 string price = 3; 789 // A collection of 1 or more trade settlements 790 repeated TradeSettlement trade_settlements = 4; 791 // Position factor - 10 ^ number of position decimal places 792 string position_factor = 5; 793 } 794 795 // Settle market event to notify data node that a market has been settled 796 // so positions and PL can be updated accordingly 797 message SettleMarket { 798 // Market ID for the event 799 string market_id = 1; 800 // Price of settlement as a string 801 string price = 2; 802 // Position factor - 10 ^ number of position decimal places 803 string position_factor = 3; 804 } 805 806 // Position state event contains the current position state for a single party in a single market 807 message PositionStateEvent { 808 // Party ID for this position update 809 string party_id = 1; 810 // Market ID for this position update 811 string market_id = 2; 812 // Current position 813 int64 size = 3; 814 // Potential orders 815 int64 potential_buys = 4; 816 int64 potential_sells = 5; 817 // Volume weighted prices 818 string vw_buy_price = 6; 819 string vw_sell_price = 7; 820 } 821 822 // Settle distressed event contains information on distressed trading parties who are closed out 823 message SettleDistressed { 824 // Note: Any PositionResolution event (market level) will most likely be followed by a number of these events 825 826 // Market ID for the event 827 string market_id = 1; 828 // Party ID i.e. a party's public key for the event 829 string party_id = 2; 830 // Margin value as an integer, for example `123456` is a correctly 831 // formatted price of `1.23456` assuming market configured to 5 decimal places 832 string margin = 3; 833 // Price as an integer, for example `123456` is a correctly 834 // formatted price of `1.23456` assuming market configured to 5 decimal places 835 string price = 4; 836 } 837 838 // Distressed order contains the party IDs for all parties that were distressed and had their orders closed, 839 // but did not need to be closed out after cancelling their orders 840 message DistressedOrders { 841 // Market ID for the event 842 string market_id = 1; 843 // Slice of Party IDs i.e. each party's public key for the event 844 repeated string parties = 2; 845 } 846 847 // 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 848 // 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 849 // 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. 850 // Parties that are no longer distressed but active will be listed in the safe_parties field. 851 message DistressedPositions { 852 // Market ID for the event 853 string market_id = 1; 854 // Slice of party IDs i.e. each party's public key, that are distressed but still have open volume 855 repeated string distressed_parties = 2; 856 // Slice of party IDs i.e. each party's public key, who were distressed but now can safely maintain their position 857 repeated string safe_parties = 3; 858 } 859 860 // Market tick event contains the time value for when a particular market was last processed on Vega 861 message MarketTick { 862 // Market ID for the event 863 string id = 1; 864 // Timestamp containing latest update from Vega blockchain aka Vega-time 865 int64 time = 2; 866 } 867 868 // Auction event indicating a change in auction state, for example starting or ending an auction 869 message AuctionEvent { 870 // Market ID for the event 871 string market_id = 1; 872 // True if the event indicates an auction opening and False otherwise 873 bool opening_auction = 2; 874 // True if the event indicates leaving auction mode and False otherwise 875 bool leave = 3; 876 // Timestamp containing the start time for an auction 877 int64 start = 4; 878 // Timestamp containing the end time for an auction 879 int64 end = 5; 880 // Reason this market is/was in auction 881 AuctionTrigger trigger = 6; 882 // If an auction was ongoing, but was extended for whatever reason, this field will 883 // be set to the trigger type indicating which component extended the auction 884 AuctionTrigger extension_trigger = 7; 885 } 886 887 // Validator update event contains information about validator node 888 message ValidatorUpdate { 889 // Node ID of the validator node 890 string node_id = 1; 891 // Vega public key of validator node 892 string vega_pub_key = 2; 893 // Ethereum public key of validator node 894 string ethereum_address = 3; 895 // Public key of Tendermint 896 string tm_pub_key = 4; 897 // URL with more info on the node 898 string info_url = 5; 899 // Country code (ISO 3166-1 alpha-2) for the location of the node 900 string country = 6; 901 // Name of the validator 902 string name = 7; 903 // AvatarURL of the validator 904 string avatar_url = 8; 905 // Vega public key derivation index 906 uint32 vega_pub_key_index = 9; 907 // Flag indicating if the validator has been added to or removed from vega 908 bool added = 10; 909 // Epoch in which the announced pending node will start participating in the network 910 uint64 from_epoch = 11; 911 // Ethereum public key being used as the submitter to allow automatic signature generation 912 string submitter_address = 12; 913 // Epoch in which the node was announced or removed from the network 914 uint64 epoch_seq = 13; 915 } 916 917 // Event that explains the status of the validator for the coming epoch 918 message ValidatorRankingEvent { 919 string node_id = 1; 920 // Stake based score - no anti-whaling 921 string stake_score = 2; 922 // Performance base score 923 string performance_score = 3; 924 // Final score 925 string ranking_score = 4; 926 // Status of the validator in the previous epoch 927 string previous_status = 5; 928 // Status of the validator in the next epoch 929 string next_status = 6; 930 // Epoch seq for which the status is valid 931 string epoch_seq = 7; 932 // Tendermint voting power of the validator 933 uint32 tm_voting_power = 8; 934 } 935 936 // Event that contains information about a Vega key rotation 937 message KeyRotation { 938 // Node ID of the node that rotated their Vega key 939 string node_id = 1; 940 // Vega public key that was previously associated with the node 941 string old_pub_key = 2; 942 // Vega public key that is newly associated with the node 943 string new_pub_key = 3; 944 // Block height when the key rotation took effect 945 uint64 block_height = 4; 946 } 947 948 // Event that contains information about an Ethereum key rotation 949 message EthereumKeyRotation { 950 // Node ID of the node that rotated their Ethereum key 951 string node_id = 1; 952 // Ethereum address that was previously associated with the node 953 string old_address = 2; 954 // Ethereum address that is newly associated with the node 955 string new_address = 3; 956 // Block height when the key rotation took effect 957 uint64 block_height = 4; 958 } 959 960 enum ProtocolUpgradeProposalStatus { 961 PROTOCOL_UPGRADE_PROPOSAL_STATUS_UNSPECIFIED = 0; 962 // The proposal is pending 963 PROTOCOL_UPGRADE_PROPOSAL_STATUS_PENDING = 1; 964 // The proposal is approved 965 PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED = 2; 966 // The proposal is rejected 967 PROTOCOL_UPGRADE_PROPOSAL_STATUS_REJECTED = 3; 968 } 969 970 message ProtocolUpgradeEvent { 971 // Block height at which to perform the upgrade 972 uint64 upgrade_block_height = 1; 973 // Release tag for the vega binary 974 string vega_release_tag = 2; 975 // Tendermint validators that have agreed to the upgrade 976 repeated string approvers = 3; 977 // Status of the proposal 978 ProtocolUpgradeProposalStatus status = 4; 979 } 980 981 // StateVar event updates on state changes in state variable consensus 982 message StateVar { 983 string id = 1; 984 string event_id = 2; 985 string state = 3; 986 } 987 988 // BeginBlock 989 message BeginBlock { 990 uint64 height = 1; 991 int64 timestamp = 2; 992 string hash = 3; 993 } 994 995 // EndBlock 996 message EndBlock { 997 uint64 height = 1; 998 } 999 1000 // Event indicating the core is starting a protocol upgrade 1001 message ProtocolUpgradeStarted { 1002 uint64 last_block_height = 1; 1003 } 1004 1005 // Event indicating the data node is ready for protocol upgrade 1006 message ProtocolUpgradeDataNodeReady { 1007 uint64 last_block_height = 1; 1008 } 1009 1010 // CoreSnapshotData represents the core snapshot data. 1011 message CoreSnapshotData { 1012 // Block height at which snapshot was taken 1013 uint64 block_height = 1; 1014 // Hash of the snapshot block 1015 string block_hash = 2; 1016 // Semver version number of the core. 1017 string core_version = 3; 1018 // Indicates if the snapshot is taken as part of protocol upgrade 1019 bool protocol_upgrade_block = 4; 1020 } 1021 1022 message ExpiredOrders { 1023 // Market ID for the event 1024 string market_id = 1; 1025 // Slice of expired order IDs 1026 repeated string order_ids = 2; 1027 } 1028 1029 message CancelledOrders { 1030 // Market ID for the event. 1031 string market_id = 1; 1032 // The ID of the party which cancelled the orders. 1033 string party_id = 2; 1034 // The order IDs that were cancelled. 1035 repeated string order_ids = 3; 1036 } 1037 1038 message TeamCreated { 1039 // The unique identifier of the created team. 1040 string team_id = 1; 1041 // The party that created the team. 1042 string referrer = 2; 1043 // Name of the team. 1044 string name = 3; 1045 // Link to the team's homepage. 1046 optional string team_url = 4; 1047 // Link to an image of the team's avatar. 1048 optional string avatar_url = 5; 1049 // Time in Unix nanoseconds when the team is created. 1050 int64 created_at = 6; 1051 // Tells if a party can join the team or not. 1052 bool closed = 7; 1053 // Epoch at which the team was created. 1054 uint64 at_epoch = 8; 1055 // List of public keys that are allowed to join the team. 1056 repeated string allow_list = 9; 1057 } 1058 1059 message TeamUpdated { 1060 // The unique identifier for the updated team. 1061 string team_id = 1; 1062 // Name of the team. 1063 string name = 2; 1064 // Link to the team's homepage. 1065 optional string team_url = 3; 1066 // Link to an image of the team's avatar. 1067 optional string avatar_url = 4; 1068 // Tells if a party can join the team or not. 1069 bool closed = 5; 1070 // List of public keys that are allowed to join the team. 1071 repeated string allow_list = 6; 1072 } 1073 1074 message RefereeSwitchedTeam { 1075 // The unique identifier of the team the referee left. 1076 string from_team_id = 1; 1077 // The unique identifier of the team joined. 1078 string to_team_id = 2; 1079 // The party that switched team. 1080 string referee = 3; 1081 // Time in Unix nanoseconds when the party switched team. This time acts as 1082 // the joining time. 1083 int64 switched_at = 4; 1084 // Epoch at which the party switched the team. 1085 uint64 at_epoch = 5; 1086 } 1087 1088 message RefereeJoinedTeam { 1089 // The unique identifier of the team the referee joined. 1090 string team_id = 1; 1091 // The party that joined the team. 1092 string referee = 2; 1093 // Time in Unix nanoseconds when the party joined a team. 1094 int64 joined_at = 3; 1095 // Epoch at which the party joined the team. 1096 uint64 at_epoch = 4; 1097 } 1098 1099 message ReferralSetCreated { 1100 // Unique ID of the created set. 1101 string set_id = 1; 1102 // Party that created the set. 1103 string referrer = 2; 1104 // Time in Unix nanoseconds when the set was created. 1105 int64 created_at = 3; 1106 // Time in Unix nanoseconds when the set was updated. 1107 int64 updated_at = 4; 1108 } 1109 1110 message ReferralSetStatsUpdated { 1111 // Unique ID of the set. 1112 string set_id = 1; 1113 // Epoch at which the set's statistics are updated. 1114 uint64 at_epoch = 2; 1115 // Running volume for the set based on the window length of the current 1116 // referral program. 1117 string referral_set_running_notional_taker_volume = 3; 1118 // Referees' statistics for that epoch. 1119 repeated RefereeStats referees_stats = 4; 1120 // deprecated 1121 string reward_factor = 5; 1122 // Rewards multiplier applied to the trades. 1123 string rewards_multiplier = 6; 1124 // deprecated 1125 string rewards_factor_multiplier = 7; 1126 // Indicates if the referral set was eligible to be part of the referral program. 1127 bool was_eligible = 8; 1128 // Taker volume of the referrer 1129 string referrer_taker_volume = 9; 1130 // Reward factor applied to the trades. 1131 vega.RewardFactors reward_factors = 10; 1132 // Reward factors multiplier for the trades. 1133 vega.RewardFactors reward_factors_multiplier = 11; 1134 } 1135 1136 message RefereeStats { 1137 // Unique ID of the party. 1138 string party_id = 1; 1139 // deprecated. 1140 string discount_factor = 2; 1141 // Current referee notional taker volume 1142 string epoch_notional_taker_volume = 4; 1143 // Discount factors applied to the party. 1144 vega.DiscountFactors discount_factors = 5; 1145 } 1146 1147 message RefereeJoinedReferralSet { 1148 // Unique ID of the referral set the referee joined. 1149 string set_id = 1; 1150 // Party that joined the set. 1151 string referee = 2; 1152 // Time in Unix nanoseconds when the party joined the set. 1153 int64 joined_at = 3; 1154 // Epoch at which the party joined the set. 1155 uint64 at_epoch = 4; 1156 } 1157 1158 message ReferralProgramStarted { 1159 // Referral program that has started. 1160 vega.ReferralProgram program = 1; 1161 // Time in Unix nanoseconds when the referral program started. 1162 int64 started_at = 2; 1163 // Epoch at which the referral program started. 1164 uint64 at_epoch = 3; 1165 } 1166 1167 message ReferralProgramUpdated { 1168 // The updated referral program. 1169 vega.ReferralProgram program = 1; 1170 // Time in Unix nanoseconds when the referral program was updated. 1171 int64 updated_at = 2; 1172 // Epoch at which the referral program was updated. 1173 uint64 at_epoch = 3; 1174 } 1175 1176 message ReferralProgramEnded { 1177 // Program update version. 1178 uint64 version = 1; 1179 // Unique ID of the referral program. 1180 string id = 2; 1181 // Time in Unix nanoseconds when the referral program ended. 1182 int64 ended_at = 3; 1183 // Epoch at which the referral program ended. 1184 uint64 at_epoch = 4; 1185 } 1186 1187 message VolumeDiscountProgramStarted { 1188 // Volume discount program that has started. 1189 vega.VolumeDiscountProgram program = 1; 1190 // Time in Unix nanoseconds when the volume discount program started. 1191 int64 started_at = 2; 1192 // Epoch at which the volume discount program started. 1193 uint64 at_epoch = 3; 1194 } 1195 1196 message VolumeDiscountProgramUpdated { 1197 // The updated volume discount program. 1198 vega.VolumeDiscountProgram program = 1; 1199 // Time in Unix nanoseconds when the volume discount program was updated. 1200 int64 updated_at = 2; 1201 // Epoch at which the volume discount program was updated. 1202 uint64 at_epoch = 3; 1203 } 1204 1205 message VolumeDiscountProgramEnded { 1206 // Program update version. 1207 uint64 version = 1; 1208 // Unique ID of the volume discount program. 1209 string id = 2; 1210 // Time in Unix nanoseconds when the referral program ended. 1211 int64 ended_at = 3; 1212 // Epoch at which the referral program ended. 1213 uint64 at_epoch = 4; 1214 } 1215 1216 message PaidLiquidityFeesStats { 1217 // Market the fees were paid in. 1218 string market = 1; 1219 // Settlement asset of the market. 1220 string asset = 2; 1221 // Epoch for which these stats where valid. 1222 uint64 epoch_seq = 3; 1223 // Total fees paid across all parties. 1224 string total_fees_paid = 4; 1225 // Fees paid per party. 1226 repeated PartyAmount fees_paid_per_party = 5; 1227 } 1228 1229 message PartyMarginModeUpdated { 1230 // Unique ID of the market in which the update happened. 1231 string market_id = 1; 1232 // Unique ID of the party that updated their margin mode. 1233 string party_id = 2; 1234 // Updated margin mode. 1235 vega.MarginMode margin_mode = 3; 1236 // Margin factor for the market. Isolated mode only. 1237 optional string margin_factor = 4; 1238 // Minimum theoretical margin factor for the market. Isolated mode only. 1239 optional string min_theoretical_margin_factor = 5; 1240 // Maximum theoretical leverage for the market. Isolated mode only. 1241 optional string max_theoretical_leverage = 6; 1242 // Epoch at which the update happened. 1243 uint64 at_epoch = 7; 1244 } 1245 1246 message PartyProfileUpdated { 1247 // Party's profile updated. 1248 vega.PartyProfile updated_profile = 1; 1249 } 1250 1251 // Stats for all teams. 1252 message TeamsStatsUpdated { 1253 // Epoch at which the statistics are updated. 1254 uint64 at_epoch = 1; 1255 // All teams' stats. 1256 repeated TeamStats stats = 2; 1257 } 1258 1259 message TeamStats { 1260 // The unique identifier of the team. 1261 string team_id = 1; 1262 // Statistics for each team member. 1263 repeated TeamMemberStats members_stats = 2; 1264 } 1265 1266 message TeamMemberStats { 1267 // The party ID of the team member. 1268 string party_id = 1; 1269 // Team members' notional volume for the epoch. 1270 string notional_volume = 2; 1271 } 1272 1273 // Scores per party per game with eligibility context. 1274 message GamePartyScore { 1275 // Game ID. 1276 string game_id = 1; 1277 // The party ID. 1278 string party = 2; 1279 // Team the party belongs to. Unset if the party is not part of a team. 1280 optional string team_id = 3; 1281 // Epoch when these scores were generated. 1282 int64 epoch = 4; 1283 // Timestamp in Unix nanoseconds when these scores were generated. 1284 int64 time = 5; 1285 // Party's current score in the game. 1286 string score = 6; 1287 // Party's current staking balance. Only populated if the game has a requirement for it. 1288 string staking_balance = 7; 1289 // Party's current open volume. Only populated if the game has a requirement for it. 1290 string open_volume = 8; 1291 // Total fees paid by the party during the relevant period. 1292 string total_fees_paid = 9; 1293 // If the party is eligible for a reward for this game based on the current information. 1294 bool is_eligible = 10; 1295 // If the party is a member of a team, this is their relative position in the sorting order of the team. 1296 // Empty if not a team, or if the party is not eligible. 1297 optional uint64 rank = 11; 1298 } 1299 1300 message GameTeamScore { 1301 // Game ID. 1302 string game_id = 1; 1303 // Team ID 1304 string team_id = 2; 1305 // Epoch when these scores were generated. 1306 int64 epoch = 3; 1307 // Timestamp in Unix nanoseconds when these scores were generated. 1308 int64 time = 4; 1309 // Team's current collective score in the game. 1310 string score = 5; 1311 } 1312 1313 message GameScores { 1314 repeated GameTeamScore team_scores = 1; 1315 repeated GamePartyScore party_scores = 2; 1316 } 1317 1318 // Bus event type is used to specify a type of event 1319 // It has 2 styles of event: 1320 // Single values (e.g. BUS_EVENT_TYPE_ORDER) where they represent one data item 1321 // Group values (e.g. BUS_EVENT_TYPE_AUCTION) where they represent a group of data items 1322 enum BusEventType { 1323 // Default value, always invalid 1324 BUS_EVENT_TYPE_UNSPECIFIED = 0; 1325 // Events of ALL event types, used when filtering stream from event bus 1326 BUS_EVENT_TYPE_ALL = 1; 1327 // Event for blockchain time updates 1328 BUS_EVENT_TYPE_TIME_UPDATE = 2; 1329 // Event for when a transfer happens internally, contains the transfer information 1330 BUS_EVENT_TYPE_LEDGER_MOVEMENTS = 3; 1331 // Event indicating position resolution has occurred 1332 BUS_EVENT_TYPE_POSITION_RESOLUTION = 4; 1333 // Event for order updates, both new and existing orders 1334 BUS_EVENT_TYPE_ORDER = 5; 1335 // Event for account updates 1336 BUS_EVENT_TYPE_ACCOUNT = 6; 1337 // Event for party updates 1338 BUS_EVENT_TYPE_PARTY = 7; 1339 // Event indicating a new trade has occurred 1340 BUS_EVENT_TYPE_TRADE = 8; 1341 // Event indicating margin levels have changed for a party 1342 BUS_EVENT_TYPE_MARGIN_LEVELS = 9; 1343 // Event for proposal updates (for governance) 1344 BUS_EVENT_TYPE_PROPOSAL = 10; 1345 // Event indicating a new vote has occurred (for governance) 1346 BUS_EVENT_TYPE_VOTE = 11; 1347 // Event for market data updates 1348 BUS_EVENT_TYPE_MARKET_DATA = 12; 1349 // Event for a new signature for a Vega node 1350 BUS_EVENT_TYPE_NODE_SIGNATURE = 13; 1351 // Event indicating loss socialisation occurred for a party 1352 BUS_EVENT_TYPE_LOSS_SOCIALIZATION = 14; 1353 // Event for when a position is being settled 1354 BUS_EVENT_TYPE_SETTLE_POSITION = 15; 1355 // Event for when a position is distressed 1356 BUS_EVENT_TYPE_SETTLE_DISTRESSED = 16; 1357 // Event indicating a new market was created 1358 BUS_EVENT_TYPE_MARKET_CREATED = 17; 1359 // Event for when an asset is added to Vega 1360 BUS_EVENT_TYPE_ASSET = 18; 1361 // Event indicating a market tick event 1362 BUS_EVENT_TYPE_MARKET_TICK = 19; 1363 // Event for when a withdrawal occurs 1364 BUS_EVENT_TYPE_WITHDRAWAL = 20; 1365 // Event for when a deposit occurs 1366 BUS_EVENT_TYPE_DEPOSIT = 21; 1367 // Event indicating a change in auction state, for example starting or ending an auction 1368 BUS_EVENT_TYPE_AUCTION = 22; 1369 // Event indicating a risk factor has been updated 1370 BUS_EVENT_TYPE_RISK_FACTOR = 23; 1371 // Event indicating a network parameter has been added or updated 1372 BUS_EVENT_TYPE_NETWORK_PARAMETER = 24; 1373 // Event indicating a liquidity provision has been created or updated 1374 BUS_EVENT_TYPE_LIQUIDITY_PROVISION = 25; 1375 // Event indicating a new market was created 1376 BUS_EVENT_TYPE_MARKET_UPDATED = 26; 1377 // Event indicating an oracle spec has been created or updated 1378 BUS_EVENT_TYPE_ORACLE_SPEC = 27; 1379 // Event indicating that an oracle data has been broadcast 1380 BUS_EVENT_TYPE_ORACLE_DATA = 28; 1381 // Event indicating that an delegation balance of a party to a node for current epoch has changed 1382 BUS_EVENT_TYPE_DELEGATION_BALANCE = 29; 1383 // Event indicating the validator score for the given epoch 1384 BUS_EVENT_TYPE_VALIDATOR_SCORE = 30; 1385 // Event indicating the start or end of an epoch 1386 BUS_EVENT_TYPE_EPOCH_UPDATE = 31; 1387 // Event indicating that validator node has been updated 1388 BUS_EVENT_TYPE_VALIDATOR_UPDATE = 32; 1389 // Event indicating a new staking event have been processed by the network 1390 BUS_EVENT_TYPE_STAKE_LINKING = 33; 1391 // Event indicating the payout of a reward has been initiated 1392 BUS_EVENT_TYPE_REWARD_PAYOUT_EVENT = 34; 1393 // Event indicating a new checkpoint was created 1394 BUS_EVENT_TYPE_CHECKPOINT = 35; 1395 // Event indicating stream is starting 1396 BUS_EVENT_TYPE_STREAM_START = 36; 1397 // Event indicating key rotation took place 1398 BUS_EVENT_TYPE_KEY_ROTATION = 37; 1399 // Event indicating state transitions in state variable consensus 1400 BUS_EVENT_TYPE_STATE_VAR = 38; 1401 // Event indicating network limits set or updated 1402 BUS_EVENT_TYPE_NETWORK_LIMITS = 39; 1403 // Event indicating a update for a transfer 1404 BUS_EVENT_TYPE_TRANSFER = 40; 1405 // Event indicating the ranking of validator and their status in Vega 1406 BUS_EVENT_TYPE_VALIDATOR_RANKING = 41; 1407 // Event indicating a new multi sig signer event have been processed 1408 BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_EVENT = 42; 1409 // Event indicating the erc20 multi sig threshold have been updated 1410 BUS_EVENT_TYPE_ERC20_MULTI_SIG_SET_THRESHOLD = 43; 1411 // Event indicating a new signer has been added to the ERC-20 multisig 1412 BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_ADDED = 44; 1413 // Event indicating a signer has been removed from the ERC-20 multisig 1414 BUS_EVENT_TYPE_ERC20_MULTI_SIG_SIGNER_REMOVED = 45; 1415 // Event indicating that a party's position has changed 1416 BUS_EVENT_TYPE_POSITION_STATE = 46; 1417 // Event indicating Ethereum key rotation took place 1418 BUS_EVENT_TYPE_ETHEREUM_KEY_ROTATION = 47; 1419 // Event indicating protocol upgrade proposal updates 1420 BUS_EVENT_TYPE_PROTOCOL_UPGRADE_PROPOSAL = 48; 1421 // Event indicating the core is starting to process a new block 1422 BUS_EVENT_TYPE_BEGIN_BLOCK = 49; 1423 // Event indicating the core finished to process a block 1424 BUS_EVENT_TYPE_END_BLOCK = 50; 1425 // Event indicating the core is starting a protocol upgrade 1426 BUS_EVENT_TYPE_PROTOCOL_UPGRADE_STARTED = 51; 1427 // Event indicating the market has stopped and settled 1428 BUS_EVENT_TYPE_SETTLE_MARKET = 52; 1429 // Event indicating the result of a transaction processed by the network 1430 BUS_EVENT_TYPE_TRANSACTION_RESULT = 53; 1431 // Event indicating a snapshot was taken at this block height 1432 BUS_EVENT_TYPE_SNAPSHOT_TAKEN = 54; 1433 1434 // Event data node uses to notify that it is ready to upgrade 1435 BUS_EVENT_TYPE_PROTOCOL_UPGRADE_DATA_NODE_READY = 55; 1436 1437 // Event indicating parties had orders closed because they were distressed, but were not closed out. 1438 BUS_EVENT_TYPE_DISTRESSED_ORDERS_CLOSED = 56; 1439 // Event indicating parties had orders closed because they were distressed, but were not closed out. 1440 BUS_EVENT_TYPE_EXPIRED_ORDERS = 57; 1441 // Event indicating parties have become, or were, distressed but still have an active position. 1442 BUS_EVENT_TYPE_DISTRESSED_POSITIONS = 58; 1443 1444 // Event indicating a spot liquidity provision has been created or updated. 1445 BUS_EVENT_TYPE_SPOT_LIQUIDITY_PROVISION = 59; 1446 1447 // Event indicating a stop order has been submitted or updated. 1448 BUS_EVENT_TYPE_STOP_ORDER = 60; 1449 1450 // Event indicating the start or end of a funding period. 1451 BUS_EVENT_TYPE_FUNDING_PERIOD = 61; 1452 1453 // Event indicating a data point for a funding period has been received. 1454 BUS_EVENT_TYPE_FUNDING_PERIOD_DATA_POINT = 62; 1455 1456 // Event indicating a team has been created. 1457 BUS_EVENT_TYPE_TEAM_CREATED = 63; 1458 1459 // Event indicating a team has been updated. 1460 BUS_EVENT_TYPE_TEAM_UPDATED = 64; 1461 1462 // Event indicating a referee switched team. 1463 BUS_EVENT_TYPE_REFEREE_SWITCHED_TEAM = 65; 1464 1465 // Event indicating a referee joined a team. 1466 BUS_EVENT_TYPE_REFEREE_JOINED_TEAM = 66; 1467 1468 // Event indicating a referral program started. 1469 BUS_EVENT_TYPE_REFERRAL_PROGRAM_STARTED = 67; 1470 1471 // Event indicating a referral program has been updated. 1472 BUS_EVENT_TYPE_REFERRAL_PROGRAM_UPDATED = 68; 1473 1474 // Event indicating a referral program ended. 1475 BUS_EVENT_TYPE_REFERRAL_PROGRAM_ENDED = 69; 1476 1477 // Event indicating a set has been created. 1478 BUS_EVENT_TYPE_REFERRAL_SET_CREATED = 70; 1479 1480 // Event indicating a referee joined a set. 1481 BUS_EVENT_TYPE_REFEREE_JOINED_REFERRAL_SET = 71; 1482 1483 // Event indicating the updated activity streak for a party 1484 BUS_EVENT_TYPE_PARTY_ACTIVITY_STREAK = 72; 1485 1486 // Event indicating a volume discount program started. 1487 BUS_EVENT_TYPE_VOLUME_DISCOUNT_PROGRAM_STARTED = 73; 1488 1489 // Event indicating a volume discount program has been updated. 1490 BUS_EVENT_TYPE_VOLUME_DISCOUNT_PROGRAM_UPDATED = 74; 1491 1492 // Event indicating a volume discount program ended. 1493 BUS_EVENT_TYPE_VOLUME_DISCOUNT_PROGRAM_ENDED = 75; 1494 1495 // Event indicating the updated statistics for a referral set. 1496 BUS_EVENT_TYPE_REFERRAL_SET_STATS_UPDATED = 76; 1497 1498 // Event indicating the updated statistics for the vesting program. 1499 BUS_EVENT_TYPE_VESTING_STATS_UPDATED = 77; 1500 1501 // Event indicating the updated statistics for the volume discount. 1502 BUS_EVENT_TYPE_VOLUME_DISCOUNT_STATS_UPDATED = 78; 1503 1504 // Event indicating the fees statistics per market at end of epoch 1505 BUS_EVENT_TYPE_FEES_STATS_UPDATED = 79; 1506 1507 // Event indicating a funding period has ended and resulted in funding payment transfers. 1508 BUS_EVENT_TYPE_FUNDING_PAYMENTS = 80; 1509 1510 // Event used to report the updated paid liquidity fee statistics for the market at the end of the epoch 1511 BUS_EVENT_TYPE_PAID_LIQUIDITY_FEES_STATS_UPDATED = 81; 1512 1513 // Event used to report the summary of vesting and locked balances at the end of the epoch 1514 BUS_EVENT_TYPE_VESTING_SUMMARY = 82; 1515 1516 // Event used to link ledger entries to the transfer that triggered the fees being collected. 1517 BUS_EVENT_TYPE_TRANSFER_FEES_PAID = 83; 1518 1519 // Event indicating that a party's available transfer fee discount has changed, per asset. 1520 BUS_EVENT_TYPE_TRANSFER_FEES_DISCOUNT_UPDATED = 84; 1521 1522 // Event indicating that a party updated their margin mode on a market. 1523 BUS_EVENT_TYPE_PARTY_MARGIN_MODE_UPDATED = 85; 1524 1525 // Event indicating that a party updated their profile. 1526 BUS_EVENT_TYPE_PARTY_PROFILE_UPDATED = 86; 1527 1528 // Event indicating that teams' statistics have been updated. 1529 BUS_EVENT_TYPE_TEAMS_STATS_UPDATED = 87; 1530 1531 // Event indicating time weighted notional position has been updated. 1532 BUS_EVENT_TYPE_TIME_WEIGHTED_NOTIONAL_POSITION_UPDATED = 88; 1533 1534 // Event containing the IDs of orders cancelled by a party on a market. 1535 BUS_EVENT_TYPE_CANCELLED_ORDERS = 89; 1536 1537 // Event containing the near realtime game scores for parties and teams. 1538 BUS_EVENT_TYPE_GAME_SCORES = 90; 1539 1540 // Event use to notify for an AMM update. 1541 BUS_EVENT_TYPE_AMM = 91; 1542 1543 // Event indicating a volume rebate program started. 1544 BUS_EVENT_TYPE_VOLUME_REBATE_PROGRAM_STARTED = 92; 1545 1546 // Event indicating a volume rebate program has been updated. 1547 BUS_EVENT_TYPE_VOLUME_REBATE_PROGRAM_UPDATED = 93; 1548 1549 // Event indicating a volume rebate program ended. 1550 BUS_EVENT_TYPE_VOLUME_REBATE_PROGRAM_ENDED = 94; 1551 1552 // Event indicating the updated statistics for the volume rebate. 1553 BUS_EVENT_TYPE_VOLUME_REBATE_STATS_UPDATED = 95; 1554 1555 // Event indicating an automated purchase auction has been scheduled. 1556 BUS_EVENT_TYPE_AUTOMATED_PURCHASE_ANNOUNCED = 96; 1557 1558 // Event indicating a market related event, for example when a market opens 1559 BUS_EVENT_TYPE_MARKET = 101; 1560 // Event used to report failed transactions back to a user, this is excluded from the ALL type 1561 BUS_EVENT_TYPE_TX_ERROR = 201; 1562 } 1563 1564 // Bus event is a container for event bus events emitted by Vega 1565 message BusEvent { 1566 // Unique event ID for the message 1567 string id = 1; 1568 // The batch or block of transactions that the events relate to 1569 string block = 2; 1570 // The type of bus event. Must be one of the list below: 1571 BusEventType type = 3; 1572 oneof event { 1573 // Time update events 1574 TimeUpdate time_update = 101; 1575 // Transfer responses update events 1576 LedgerMovements ledger_movements = 102; 1577 // Position resolution events 1578 PositionResolution position_resolution = 103; 1579 // Order events 1580 Order order = 104; 1581 // Account events 1582 Account account = 105; 1583 // Party events 1584 Party party = 106; 1585 // Trade events 1586 Trade trade = 107; 1587 // Margin level update events 1588 MarginLevels margin_levels = 108; 1589 // Proposal events for governance 1590 Proposal proposal = 109; 1591 // Vote events for governance 1592 Vote vote = 110; 1593 // Market data events 1594 MarketData market_data = 111; 1595 // Node signature events 1596 vega.commands.v1.NodeSignature node_signature = 112; 1597 // Loss socialization events 1598 LossSocialization loss_socialization = 113; 1599 // Position settlement events 1600 SettlePosition settle_position = 114; 1601 // Position distressed events 1602 SettleDistressed settle_distressed = 115; 1603 // Market created events 1604 Market market_created = 116; 1605 // Asset events 1606 Asset asset = 117; 1607 // Market tick events 1608 MarketTick market_tick = 118; 1609 // Withdrawal events 1610 Withdrawal withdrawal = 119; 1611 // Deposit events 1612 Deposit deposit = 120; 1613 // Auction events 1614 AuctionEvent auction = 121; 1615 // Risk factor events 1616 RiskFactor risk_factor = 122; 1617 // Network parameter events 1618 NetworkParameter network_parameter = 123; 1619 // LiquidityProvision events 1620 LiquidityProvision liquidity_provision = 124; 1621 // Market created events 1622 Market market_updated = 125; 1623 // OracleSpec events 1624 vega.OracleSpec oracle_spec = 126; 1625 // OracleData events 1626 vega.OracleData oracle_data = 127; 1627 // Delegation balance events 1628 DelegationBalanceEvent delegation_balance = 129; 1629 // Validator score calculated 1630 ValidatorScoreEvent validator_score = 130; 1631 // Epoch update events 1632 EpochEvent epoch_event = 131; 1633 // Validator update events 1634 ValidatorUpdate validator_update = 132; 1635 // Staking event 1636 StakeLinking stake_linking = 133; 1637 // Reward payout event 1638 RewardPayoutEvent reward_payout = 134; 1639 // Checkpoint was created 1640 CheckpointEvent checkpoint = 135; 1641 // Key rotation took place 1642 KeyRotation key_rotation = 136; 1643 // State variable consensus state transition update 1644 StateVar state_var = 137; 1645 // Network limits events 1646 NetworkLimits network_limits = 138; 1647 // Transfer event 1648 Transfer transfer = 139; 1649 // Ranking event 1650 ValidatorRankingEvent ranking_event = 140; 1651 // ERC20 multi sig signer event 1652 ERC20MultiSigSignerEvent erc20_multisig_signer_event = 141; 1653 // ERC20 multi sig set threshold event 1654 ERC20MultiSigThresholdSetEvent erc20_multisig_set_threshold_event = 142; 1655 // ERC20 multi sig signer added 1656 ERC20MultiSigSignerAdded erc20_multisig_signer_added = 143; 1657 // ERC20 multi sig signer removed 1658 ERC20MultiSigSignerRemoved erc20_multisig_signer_removed = 144; 1659 // Position status for a party in a market 1660 PositionStateEvent position_state_event = 145; 1661 // Ethereum key rotation took place 1662 EthereumKeyRotation ethereum_key_rotation = 146; 1663 // Protocol upgrade proposal updates 1664 ProtocolUpgradeEvent protocol_upgrade_event = 147; 1665 // Core is starting to process a new block 1666 BeginBlock begin_block = 148; 1667 // Core finished processing a block 1668 EndBlock end_block = 149; 1669 // Core is starting a protocol upgrade 1670 ProtocolUpgradeStarted protocol_upgrade_started = 150; 1671 // Settle market event for data-node to update positions for settled markets 1672 SettleMarket settle_market = 151; 1673 // Result of a transaction processed by the network 1674 TransactionResult transaction_result = 152; 1675 // Core snapshot has been taken at the end of the block 1676 CoreSnapshotData core_snapshot_event = 153; 1677 // Core snapshot has been taken at the end of the block 1678 ProtocolUpgradeDataNodeReady protocol_upgrade_data_node_ready = 154; 1679 // Parties that had their orders closed because they were distressed 1680 DistressedOrders distressed_orders = 155; 1681 // Orders that expired for a given market 1682 ExpiredOrders expired_orders = 156; 1683 // Open positions on the market that are/were distressed 1684 DistressedPositions distressed_positions = 157; 1685 // A stop order event 1686 StopOrderEvent stop_order = 158; 1687 // Start or end of a funding period. 1688 FundingPeriod funding_period = 159; 1689 // Data point within a funding period. 1690 FundingPeriodDataPoint funding_period_data_point = 160; 1691 // Event notifying of the creation of a team.m 1692 TeamCreated team_created = 161; 1693 // Event notifying of an update to a team. 1694 TeamUpdated team_updated = 162; 1695 // Event notifying that a referee switched teams. 1696 RefereeSwitchedTeam referee_switched_team = 163; 1697 // Event notifying that a referee joined a team. 1698 RefereeJoinedTeam referee_joined_team = 164; 1699 // Event notifying that a referral program has started. 1700 ReferralProgramStarted referral_program_started = 165; 1701 // Event notifying that a referral program has been updated. 1702 ReferralProgramUpdated referral_program_updated = 166; 1703 // Event notifying that a referral program has ended. 1704 ReferralProgramEnded referral_program_ended = 167; 1705 // Event notifying a referral set has been created. 1706 ReferralSetCreated referral_set_created = 168; 1707 // Event notifying a referee has joined a referral set. 1708 RefereeJoinedReferralSet referee_joined_referral_set = 169; 1709 // Event notifying of an update to a party's activity streak 1710 PartyActivityStreak party_activity_streak = 170; 1711 // Event notifying that a volume discount program has started. 1712 VolumeDiscountProgramStarted volume_discount_program_started = 171; 1713 // Event notifying that a volume discount program has been updated. 1714 VolumeDiscountProgramUpdated volume_discount_program_updated = 172; 1715 // Event notifying that a volume discount program has ended. 1716 VolumeDiscountProgramEnded volume_discount_program_ended = 173; 1717 // Event notifying of an update to a referral set's statistics. 1718 ReferralSetStatsUpdated referral_set_stats_updated = 174; 1719 // Event notifying of an update to the vesting statistics. 1720 VestingStatsUpdated vesting_stats_updated = 175; 1721 // Event notifying of an update to the volume discount statistics. 1722 VolumeDiscountStatsUpdated volume_discount_stats_updated = 176; 1723 // Event notifying of an update the fees stats for a market. 1724 FeesStats fees_stats = 177; 1725 // Event notifying of funding payments at the end of a funding period. 1726 FundingPayments funding_payments = 178; 1727 // Event notifying of an update to the liqudity fees stats for a market. 1728 PaidLiquidityFeesStats paid_liquidity_fees_stats = 179; 1729 // Event notifying of an update to the vesting and locked balances. 1730 VestingBalancesSummary vesting_balances_summary = 180; 1731 // Event notifying of fees related to a transfer being paid. 1732 TransferFees transfer_fees = 181; 1733 // Event notifying of a party's available discounts for transfer fees, per asset. 1734 TransferFeesDiscount transfer_fees_discount = 182; 1735 // Event notifying of a party's margin mode update on a market. 1736 PartyMarginModeUpdated party_margin_mode_updated = 183; 1737 // Event notifying of a party's profile update. 1738 PartyProfileUpdated party_profile_updated = 184; 1739 // Event notifying of an update of teams' statistics. 1740 TeamsStatsUpdated teams_stats_updated = 185; 1741 // Event notifying an update of the time weighted notional position for a party in an asset 1742 TimeWeightedNotionalPositionUpdated time_weighted_notional_position_updated = 186; 1743 // Event notifying of multiple orders being cancelled for a given party, on a given market. 1744 CancelledOrders cancelled_orders = 187; 1745 // Event notifying on near realtime game scores for parties and teams. 1746 GameScores game_scores = 188; 1747 // Event notifying of AMM updates. 1748 AMM amm = 189; 1749 // Event notifying that a volume rebate program has started. 1750 VolumeRebateProgramStarted volume_rebate_program_started = 190; 1751 // Event notifying that a volume rebate program has been updated. 1752 VolumeRebateProgramUpdated volume_rebate_program_updated = 191; 1753 // Event notifying that a volume rebate program has ended. 1754 VolumeRebateProgramEnded volume_rebate_program_ended = 192; 1755 // Event notifying of an update to the volume rebate statistics. 1756 VolumeRebateStatsUpdated volume_rebate_stats_updated = 193; 1757 // Event notifying an upcoming automated purchase of a token with the sold amount. 1758 AutomatedPurchaseAnnounced automated_purchase_announced = 194; 1759 // Market tick events 1760 MarketEvent market = 1001; 1761 // Transaction error events, not included in the ALL event type 1762 TxErrorEvent tx_err_event = 2001; 1763 } 1764 // Version of bus event 1765 uint32 version = 4; 1766 string chain_id = 5; 1767 string tx_hash = 6; 1768 } 1769 1770 // Stats of all parties eligible for volume rebate. 1771 message VolumeRebateStatsUpdated { 1772 // Epoch at which the volume rebate statistics are updated. 1773 uint64 at_epoch = 1; 1774 // All parties' stats. 1775 repeated PartyVolumeRebateStats stats = 2; 1776 } 1777 1778 // Volume rebate stats for a given party. 1779 message PartyVolumeRebateStats { 1780 // Party ID. 1781 string party_id = 1; 1782 // Rebate factor applied to fees. 1783 string additional_rebate = 2; 1784 // The party's maker volume fraction. 1785 string maker_volume_fraction = 3; 1786 // The party's maker fee received over the window across all markets and assets, expressed in quantum. 1787 string maker_fees_received = 4; 1788 } 1789 1790 message VolumeRebateProgramStarted { 1791 // Volume rebate program that has started. 1792 vega.VolumeRebateProgram program = 1; 1793 // Time in Unix nanoseconds when the volume discount program started. 1794 int64 started_at = 2; 1795 // Epoch at which the volume discount program started. 1796 uint64 at_epoch = 3; 1797 } 1798 1799 message VolumeRebateProgramUpdated { 1800 // The updated volume rebate program. 1801 vega.VolumeRebateProgram program = 1; 1802 // Time in Unix nanoseconds when the volume discount program was updated. 1803 int64 updated_at = 2; 1804 // Epoch at which the volume discount program was updated. 1805 uint64 at_epoch = 3; 1806 } 1807 1808 message VolumeRebateProgramEnded { 1809 // Program update version. 1810 uint64 version = 1; 1811 // Unique ID of the volume discount program. 1812 string id = 2; 1813 // Time in Unix nanoseconds when the referral program ended. 1814 int64 ended_at = 3; 1815 // Epoch at which the referral program ended. 1816 uint64 at_epoch = 4; 1817 } 1818 1819 // Event indicating the schedule of an automated purchase auction 1820 message AutomatedPurchaseAnnounced { 1821 // Token being exchanged. 1822 string from = 1; 1823 // The source account type. 1824 vega.AccountType from_account_type = 2; 1825 // The target account type. 1826 vega.AccountType to_account_type = 3; 1827 // The identifier of the spot market where the auction is being scheduled. 1828 string market_id = 4; 1829 // Amount being exchanged. 1830 string amount = 5; 1831 }