| Field | Type | Label | Description |
| regex | string | optional | Uses a Golang RE2-syntax regex to match the field contents. |
| int_gt | int64 | optional | Field value of integer strictly greater than this value. |
| int_lt | int64 | optional | Field value of integer strictly smaller than this value. |
| msg_exists | bool | optional | Used for nested message types, requires that the message type exists. |
| human_error | string | optional | Human error specifies a user-customizable error that is visible to the user. |
| float_gt | double | optional | Field value of double strictly greater than this value. Note that this value can only take on a valid floating point value. Use together with float_epsilon if you need something more specific. |
| float_lt | double | optional | Field value of double strictly smaller than this value. Note that this value can only take on a valid floating point value. Use together with float_epsilon if you need something more specific. |
| float_epsilon | double | optional | Field value of double describing the epsilon within which any comparison should be considered to be true. For example, when using float_gt = 0.35, using a float_epsilon of 0.05 would mean that any value above 0.30 is acceptable. It can be thought of as a {float_value_condition} +- {float_epsilon}. If unset, no correction for floating point inaccuracies in comparisons will be attempted. |
| float_gte | double | optional | Floating-point value compared to which the field content should be greater or equal. |
| float_lte | double | optional | Floating-point value compared to which the field content should be smaller or equal. |
| string_not_empty | bool | optional | Used for string fields, requires the string to be not empty (i.e different from ""). |
| repeated_count_min | int64 | optional | Repeated field with at least this number of elements. |
| repeated_count_max | int64 | optional | Repeated field with at most this number of elements. |
| length_gt | int64 | optional | Field value of length greater than this value. |
| length_lt | int64 | optional | Field value of length smaller than this value. |
| length_eq | int64 | optional | Field value of integer strictly equal this value. |
| is_in_enum | bool | optional | Requires that the value is in the enum. |
| uuid_ver | int32 | optional | Ensures that a string value is in UUID format. uuid_ver specifies the valid UUID versions. Valid values are: 0-5. If uuid_ver is 0 all UUID versions are accepted. |
| Field | Type | Label | Description |
| required | bool | optional | Require that one of the oneof fields is set. |
| Extension | Type | Base | Number | Description |
| field | FieldValidator | .google.protobuf.FieldOptions | 65020 | |
| oneof | OneofValidator | .google.protobuf.OneofOptions | 65021 |
Condition describes the condition that must be validated by the
| Field | Type | Label | Description |
| operator | Condition.Operator | comparator is the type of comparison to make on the value. |
|
| value | string | value is used by the comparator. |
Filter describes the conditions under which an oracle data is considered of
interest or not.
| Field | Type | Label | Description |
| key | PropertyKey | key is the oracle data property key targeted by the filter. |
|
| conditions | Condition | repeated | conditions are the conditions that should be matched by the data to be considered of interest. |
An oracle spec describe the oracle data that a product (or a risk model)
wants to get from the oracle engine.
This message contains additional information used by the API.
| Field | Type | Label | Description |
| id | string | id is a hash generated from the OracleSpec data. |
|
| created_at | int64 | Creation Date time |
|
| updated_at | int64 | Last Updated timestamp |
|
| pub_keys | string | repeated | pubKeys is the list of authorized public keys that signed the data for this oracle. All the public keys in the oracle data should be contained in these public keys. |
| filters | Filter | repeated | filters describes which oracle data are considered of interest or not for the product (or the risk model). |
| status | OracleSpec.Status | status describes the status of the oracle spec |
An oracle spec describe the oracle data that a product (or a risk model)
wants to get from the oracle engine.
| Field | Type | Label | Description |
| pub_keys | string | repeated | pubKeys is the list of authorized public keys that signed the data for this oracle. All the public keys in the oracle data should be contained in these public keys. |
| filters | Filter | repeated | filters describes which oracle data are considered of interest or not for the product (or the risk model). |
PropertyKey describes the property key contained in an oracle data.
| Field | Type | Label | Description |
| name | string | name is the name of the property. |
|
| type | PropertyKey.Type | type is the type of the property. |
Comparator describes the type of comparison.
| Name | Number | Description |
| OPERATOR_UNSPECIFIED | 0 | The default value |
| OPERATOR_EQUALS | 1 | Verify if the property values are strictly equal or not. |
| OPERATOR_GREATER_THAN | 2 | Verify if the oracle data value is greater than the Condition value. |
| OPERATOR_GREATER_THAN_OR_EQUAL | 3 | Verify if the oracle data value is greater than or equal to the Condition value. |
| OPERATOR_LESS_THAN | 4 | Verify if the oracle data value is less than the Condition value. |
| OPERATOR_LESS_THAN_OR_EQUAL | 5 | Verify if the oracle data value is less or equal to than the Condition value. |
Status describe the status of the oracle spec
| Name | Number | Description |
| STATUS_UNSPECIFIED | 0 | The default value. |
| STATUS_ACTIVE | 1 | STATUS_ACTIVE describes an active oracle spec. |
| STATUS_DEACTIVATED | 2 | STATUS_DEACTIVATED describes an oracle spec that is not listening to data anymore. |
Type describes the type of properties that are supported by the oracle
engine.
| Name | Number | Description |
| TYPE_UNSPECIFIED | 0 | The default value. |
| TYPE_EMPTY | 1 | Any type. |
| TYPE_INTEGER | 2 | Integer type. |
| TYPE_STRING | 3 | String type. |
| TYPE_BOOLEAN | 4 | Boolean type. |
| TYPE_DECIMAL | 5 | Any floating point decimal type. |
| TYPE_TIMESTAMP | 6 | Timestamp date type. |
An auction duration is used to configure 3 auction periods:
1. `duration > 0`, `volume == 0`:
The auction will last for at least N seconds
2. `duration == 0`, `volume > 0`:
The auction will end once we can close with given traded volume
3. `duration > 0`, `volume > 0`:
The auction will take at least N seconds, but can end sooner if we can trade a certain volume
| Field | Type | Label | Description |
| duration | int64 | Duration of the auction in seconds |
|
| volume | uint64 | Target uncrossing trading volume |
Continuous trading
| Field | Type | Label | Description |
| tick_size | string | Tick size |
Discrete trading
| Field | Type | Label | Description |
| duration_ns | int64 | Duration in nanoseconds, maximum 1 month<PHONE_NUMBER>000000 ns) |
|
| tick_size | string | Tick size |
| Field | Validations |
| duration_ns |
|
Fee factors definition
| Field | Type | Label | Description |
| maker_fee | string | Maker fee |
|
| infrastructure_fee | string | Infrastructure fee |
|
| liquidity_fee | string | Liquidity fee |
Fees definition
| Field | Type | Label | Description |
| factors | FeeFactors | Fee factors |
Future product definition
| Field | Type | Label | Description |
| maturity | string | The maturity for the future |
|
| settlement_asset | string | The asset for the future |
|
| quote_name | string | Quote name of the instrument |
|
| oracle_spec_for_settlement_price | oracles.v1.OracleSpec | The oracle spec describing the settlement price oracle filter |
|
| oracle_spec_for_trading_termination | oracles.v1.OracleSpec | the oracle spec describing the trading termination oracle filter |
|
| oracle_spec_binding | OracleSpecToFutureBinding | The binding between the oracle spec and the oracle data |
Instrument definition
| Field | Type | Label | Description |
| id | string | Instrument identifier |
|
| code | string | Code for the instrument |
|
| name | string | Name of the instrument |
|
| metadata | InstrumentMetadata | A collection of instrument meta-data |
|
| future | Future | Future |
Instrument metadata definition
| Field | Type | Label | Description |
| tags | string | repeated | A list of 0 or more tags |
LiquidityMonitoringParameters contains settings used for liquidity monitoring
| Field | Type | Label | Description |
| target_stake_parameters | TargetStakeParameters | Specifies parameters related to target stake calculation |
|
| triggering_ratio | double | Specifies the triggering ratio for entering liquidity auction |
|
| auction_extension | int64 | Specifies by how many seconds an auction should be extended if leaving the auction were to trigger a liquidity auction |
| Field | Validations |
| triggering_ratio |
|
Risk model parameters for log normal
| Field | Type | Label | Description |
| mu | double | Mu param |
|
| r | double | R param |
|
| sigma | double | Sigma param |
Risk model for log normal
| Field | Type | Label | Description |
| risk_aversion_parameter | double | Risk Aversion Parameter |
|
| tau | double | Tau |
|
| params | LogNormalModelParams | Risk model parameters for log normal |
Margin Calculator definition
| Field | Type | Label | Description |
| scaling_factors | ScalingFactors | Scaling factors for margin calculation |
Market definition
| Field | Type | Label | Description |
| id | string | Unique identifier |
|
| tradable_instrument | TradableInstrument | Tradable instrument configuration |
|
| decimal_places | uint64 | Number of decimal places that a price must be shifted by in order to get a correct price denominated in the currency of the market, for example: `realPrice = price / 10^decimalPlaces` |
|
| fees | Fees | Fees configuration |
|
| opening_auction | AuctionDuration | Auction duration specifies how long the opening auction will run (minimum duration and optionally a minimum traded volume) |
|
| continuous | ContinuousTrading | Continuous |
|
| discrete | DiscreteTrading | Discrete |
|
| price_monitoring_settings | PriceMonitoringSettings | PriceMonitoringSettings for the market |
|
| liquidity_monitoring_parameters | LiquidityMonitoringParameters | LiquidityMonitoringParameters for the market |
|
| trading_mode | Market.TradingMode | Current mode of execution of the market |
|
| state | Market.State | Current state of the market |
|
| market_timestamps | MarketTimestamps | Timestamps for when the market stay changes |
Time stamps for important times about creating, enacting etc the market
| Field | Type | Label | Description |
| proposed | int64 | Time when the market is first proposed |
|
| pending | int64 | Time when the market has been voted in and is created into an opening auction |
|
| open | int64 | Time when the market has left the opening auction and is ready to accept trades |
|
| close | int64 | Time when the market is closed |
OracleSpecToFutureBinding tells on which property oracle data should be
used as settlement price and which to use the trading terminated trigger
| Field | Type | Label | Description |
| settlement_price_property | string | settlement_price_property holds the name of the property in the oracle data that should be used as settlement price. If it is set to "prices.BTC.value", then the Future will use the value of this property as settlement price. |
|
| trading_termination_property | string | the name of the property in the oracle data that signals termination of trading |
PriceMonitoringParameters contains a collection of triggers to be used for a given market
| Field | Type | Label | Description |
| triggers | PriceMonitoringTrigger | repeated |
|
PriceMonitoringSettings contains the settings for price monitoring
| Field | Type | Label | Description |
| parameters | PriceMonitoringParameters | Specifies price monitoring parameters to be used for price monitoring purposes |
|
| update_frequency | int64 | Specifies how often (expressed in seconds) the price monitoring bounds should be updated |
PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration
| Field | Type | Label | Description |
| horizon | int64 | Price monitoring projection horizon τ in seconds |
|
| probability | double | Price monitoring probability level p |
|
| auction_extension | int64 | Price monitoring auction extension duration in seconds should the price breach it's theoretical level over the specified horizon at the specified probability level |
| Field | Validations |
| horizon |
|
| probability |
|
| auction_extension |
|
Scaling Factors (for use in margin calculation)
| Field | Type | Label | Description |
| search_level | double | Search level |
|
| initial_margin | double | Initial margin level |
|
| collateral_release | double | Collateral release level |
Risk model parameters for simple modelling
| Field | Type | Label | Description |
| factor_long | double | Pre-defined risk factor value for long |
|
| factor_short | double | Pre-defined risk factor value for short |
|
| max_move_up | double | Pre-defined maximum price move up that the model considers as valid |
|
| min_move_down | double | Pre-defined minimum price move down that the model considers as valid |
|
| probability_of_trading | double | Pre-defined constant probability of trading |
| Field | Validations |
| max_move_up |
|
| min_move_down |
|
| probability_of_trading |
|
Risk model for simple modelling
| Field | Type | Label | Description |
| params | SimpleModelParams | Risk model params for simple modelling |
TargetStakeParameters contains parameters used in target stake calculation
| Field | Type | Label | Description |
| time_window | int64 | Specifies length of time window expressed in seconds for target stake calculation |
|
| scaling_factor | double | Specifies scaling factors used in target stake calculation |
| Field | Validations |
| time_window |
|
| scaling_factor |
|
Tradable Instrument definition
| Field | Type | Label | Description |
| instrument | Instrument | Instrument details |
|
| margin_calculator | MarginCalculator | Margin calculator for the instrument |
|
| log_normal_risk_model | LogNormalRiskModel | Log normal |
|
| simple_risk_model | SimpleRiskModel | Simple |
The current state of the Market
| Name | Number | Description |
| STATE_UNSPECIFIED | 0 | Default value, invalid |
| STATE_PROPOSED | 1 | The Governance proposal valid and accepted |
| STATE_REJECTED | 2 | Outcome of governance votes is to reject the market |
| STATE_PENDING | 3 | Governance vote passes/wins |
| STATE_CANCELLED | 4 | Market triggers cancellation condition or governance votes to close before market becomes Active |
| STATE_ACTIVE | 5 | Enactment date reached and usual auction exit checks pass |
| STATE_SUSPENDED | 6 | Price monitoring or liquidity monitoring trigger |
| STATE_CLOSED | 7 | Governance vote (to close) |
| STATE_TRADING_TERMINATED | 8 | Defined by the product (i.e. from a product parameter, specified in market definition, giving close date/time) |
| STATE_SETTLED | 9 | Settlement triggered and completed as defined by product |
The trading mode the market is currently running, also referred to as 'market state'
| Name | Number | Description |
| TRADING_MODE_UNSPECIFIED | 0 | Default value, this is invalid |
| TRADING_MODE_CONTINUOUS | 1 | Normal trading |
| TRADING_MODE_BATCH_AUCTION | 2 | Auction trading (FBA) |
| TRADING_MODE_OPENING_AUCTION | 3 | Opening auction |
| TRADING_MODE_MONITORING_AUCTION | 4 | Auction triggered by monitoring |
Represents an account for an asset on Vega for a particular owner or party
| Field | Type | Label | Description |
| id | string | Unique account identifier (used internally by Vega) |
|
| owner | string | The party that the account belongs to, special values include `network`, which represents the Vega network and is most commonly seen during liquidation of distressed trading positions |
|
| balance | uint64 | Balance of the asset, the balance is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places and importantly balances cannot be negative |
|
| asset | string | Asset identifier for the account |
|
| market_id | string | Market identifier for the account, if [`AccountType`](#vega.AccountType).`ACCOUNT_TYPE_GENERAL` this will be empty |
|
| type | AccountType | The account type related to this account |
AuctionIndicativeState is used to emit an event with the indicative price/volume per market during an auction
| Field | Type | Label | Description |
| market_id | string | The market identifier for which this state relates to |
|
| indicative_price | uint64 | The Indicative Uncrossing Price is the price at which all trades would occur if we uncrossed the auction now |
|
| indicative_volume | uint64 | The Indicative Uncrossing Volume is the volume available at the Indicative crossing price if we uncrossed the auction now |
|
| auction_start | int64 | The timestamp at which the auction started |
|
| auction_end | int64 | The timestamp at which the auction is meant to stop |
Represents the high, low, open, and closing prices for an interval of trading,
referred to commonly as a candlestick or candle
| Field | Type | Label | Description |
| timestamp | int64 | Timestamp for the point in time when the candle was initially created/opened, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| datetime | string | An ISO-8601 datetime with nanosecond precision for when the candle was last updated |
|
| high | uint64 | Highest price for trading during the candle interval |
|
| low | uint64 | Lowest price for trading during the candle interval |
|
| open | uint64 | Open trade price |
|
| close | uint64 | Closing trade price |
|
| volume | uint64 | Total trading volume during the candle interval |
|
| interval | Interval | Time interval for the candle - See [`Interval`](#vega.Interval) |
A deposit on to the Vega network
| Field | Type | Label | Description |
| id | string | Unique identifier for the deposit |
|
| status | Deposit.Status | Status of the deposit |
|
| party_id | string | Party identifier of the user initiating the deposit |
|
| asset | string | The Vega asset targeted by this deposit |
|
| amount | string | The amount to be deposited |
|
| tx_hash | string | The hash of the transaction from the foreign chain |
|
| credited_timestamp | int64 | Timestamp for when the Vega account was updated with the deposit |
|
| created_timestamp | int64 | Timestamp for when the deposit was created on the Vega network |
An extension of data required for the withdraw submissions
| Field | Type | Label | Description |
| receiver_address | string | The address into which the bridge will release the funds |
Represents Vega domain specific error information over gRPC/Protobuf
| Field | Type | Label | Description |
| code | int32 | A Vega API domain specific unique error code, useful for client side mappings, e.g. 10004 |
|
| message | string | A message that describes the error in more detail, should describe the problem encountered |
|
| inner | string | Any inner error information that could add more context, or be helpful for error reporting |
Ethereum configuration details
| Field | Type | Label | Description |
| network_id | string | Network identifier of this Ethereum network |
|
| chain_id | string | Chain identifier of this Ethereum network |
|
| bridge_address | string | Bridge address for this Ethereum network |
|
| confirmations | uint32 | Number of confirmations |
Represents any fees paid by a party, resulting from a trade
| Field | Type | Label | Description |
| maker_fee | uint64 | Fee amount paid to the non-aggressive party of the trade |
|
| infrastructure_fee | uint64 | Fee amount paid for maintaining the Vega infrastructure |
|
| liquidity_fee | uint64 | Fee amount paid to market makers |
Asset value information used within a transfer
| Field | Type | Label | Description |
| amount | uint64 | A signed integer amount of asset |
|
| asset | string | Asset identifier |
Represents a ledger entry on Vega
| Field | Type | Label | Description |
| from_account | string | One or more accounts to transfer from |
|
| to_account | string | One or more accounts to transfer to |
|
| amount | uint64 | An amount to transfer |
|
| reference | string | A reference for auditing purposes |
|
| type | string | Type of ledger entry |
|
| timestamp | int64 | Timestamp for the time the ledger entry was created, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
Represents a liquidity order
| Field | Type | Label | Description |
| reference | PeggedReference | The pegged reference point for the order |
|
| proportion | uint32 | The relative proportion of the commitment to be allocated at a price level |
|
| offset | int64 | The offset/amount of units away for the order |
A pair of a liquidity order and the id of the generated order by the core
| Field | Type | Label | Description |
| order_id | string | Unique identifier of the pegged order generated by the core to fulfil this liquidity order |
|
| liquidity_order | LiquidityOrder | The liquidity order from the original submission |
The equity like share of liquidity fee for each liquidity provider
| Field | Type | Label | Description |
| party | string | The liquidity provider party id |
|
| equity_like_share | string | The share own by this liquidity provider (float) |
|
| average_entry_valuation | string | The average entry valuation of the liquidity provider for the market |
An Liquidity provider commitment
| Field | Type | Label | Description |
| id | string | Unique identifier |
|
| party_id | string | Unique party identifier for the creator of the provision |
|
| created_at | int64 | Timestamp for when the order was created at, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| updated_at | int64 | Timestamp for when the order was updated at, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| market_id | string | Market identifier for the order, required field |
|
| commitment_amount | uint64 | Specified as a unitless number that represents the amount of settlement asset of the market |
|
| fee | string | Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per seeting fees and rewarding liquidity providers |
|
| sells | LiquidityOrderReference | repeated | A set of liquidity sell orders to meet the liquidity provision obligation |
| buys | LiquidityOrderReference | repeated | A set of liquidity buy orders to meet the liquidity provision obligation |
| version | string | Version of this liquidity provision order |
|
| status | LiquidityProvision.Status | Status of this liquidity provision order |
|
| reference | string | A reference shared between this liquidity provision and all it's orders |
| Field | Validations |
| market_id |
|
Represents the margin levels for a party on a market at a given time
| Field | Type | Label | Description |
| maintenance_margin | uint64 | Maintenance margin value |
|
| search_level | uint64 | Search level value |
|
| initial_margin | uint64 | Initial margin value |
|
| collateral_release_level | uint64 | Collateral release level value |
|
| party_id | string | Party identifier |
|
| market_id | string | Market identifier |
|
| asset | string | Asset identifier |
|
| timestamp | int64 | Timestamp for the time the ledger entry was created, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
Represents data generated by a market when open
| Field | Type | Label | Description |
| mark_price | uint64 | Mark price, as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| best_bid_price | uint64 | Highest price level on an order book for buy orders, as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| best_bid_volume | uint64 | Aggregated volume being bid at the best bid price |
|
| best_offer_price | uint64 | Lowest price level on an order book for offer orders |
|
| best_offer_volume | uint64 | Aggregated volume being offered at the best offer price, as an integer, for example `123456` is a correctly // formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| best_static_bid_price | uint64 | Highest price on the order book for buy orders not including pegged orders |
|
| best_static_bid_volume | uint64 | Total volume at the best static bid price excluding pegged orders |
|
| best_static_offer_price | uint64 | Lowest price on the order book for sell orders not including pegged orders |
|
| best_static_offer_volume | uint64 | Total volume at the best static offer price excluding pegged orders |
|
| mid_price | uint64 | Arithmetic average of the best bid price and best offer price, as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| static_mid_price | uint64 | Arithmetic average of the best static bid price and best static offer price |
|
| market | string | Market identifier for the data |
|
| timestamp | int64 | Timestamp at which this mark price was relevant, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| open_interest | uint64 | The sum of the size of all positions greater than 0 on the market |
|
| auction_end | int64 | Time in seconds until the end of the auction (0 if currently not in auction period) |
|
| auction_start | int64 | Time until next auction (used in FBA's) - currently always 0 |
|
| indicative_price | uint64 | Indicative price (zero if not in auction) |
|
| indicative_volume | uint64 | Indicative volume (zero if not in auction) |
|
| market_trading_mode | Market.TradingMode | The current trading mode for the market |
|
| trigger | AuctionTrigger | When a market is in an auction trading mode, this field indicates what triggered the auction |
|
| extension_trigger | AuctionTrigger | When a market auction is extended, this field indicates what caused the extension |
|
| target_stake | string | Targeted stake for the given market |
|
| supplied_stake | string | Available stake for the given market |
|
| price_monitoring_bounds | PriceMonitoringBounds | repeated | One or more price monitoring bounds for the current timestamp |
| market_value_proxy | string | the market value proxy |
|
| liquidity_provider_fee_share | LiquidityProviderFeeShare | repeated | the equity like share of liquidity fee for each liquidity provider |
Represents market depth or order book data for the specified market on Vega
| Field | Type | Label | Description |
| market_id | string | Market identifier |
|
| buy | PriceLevel | repeated | Collection of price levels for the buy side of the book |
| sell | PriceLevel | repeated | Collection of price levels for the sell side of the book |
| sequence_number | uint64 | Sequence number for the market depth data returned |
Represents the changed market depth since the last update
| Field | Type | Label | Description |
| market_id | string | Market identifier |
|
| buy | PriceLevel | repeated | Collection of updated price levels for the buy side of the book |
| sell | PriceLevel | repeated | Collection of updated price levels for the sell side of the book |
| sequence_number | uint64 | Sequence number for the market depth update data returned |
Represents a network parameter on Vega
| Field | Type | Label | Description |
| key | string | The unique key |
|
| value | string | The value for the network parameter |
An order can be submitted, amended and cancelled on Vega in an attempt to make trades with other parties
| Field | Type | Label | Description |
| id | string | Unique identifier for the order (set by the system after consensus) |
|
| market_id | string | Market identifier for the order |
|
| party_id | string | Party identifier for the order |
|
| side | Side | Side for the order, e.g. SIDE_BUY or SIDE_SELL - See [`Side`](#vega.Side) |
|
| price | uint64 | Price for the order, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| size | uint64 | Size for the order, for example, in a futures market the size equals the number of contracts |
|
| remaining | uint64 | Size remaining, when this reaches 0 then the order is fully filled and status becomes STATUS_FILLED |
|
| time_in_force | Order.TimeInForce | Time in force indicates how long an order will remain active before it is executed or expires. - See [`Order.TimeInForce`](#vega.Order.TimeInForce) |
|
| type | Order.Type | Type for the order - See [`Order.Type`](#vega.Order.Type) |
|
| created_at | int64 | Timestamp for when the order was created at, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| status | Order.Status | The current status for the order. See [`Order.Status`](#vega.Order.Status) - For detail on `STATUS_REJECTED` please check the [`OrderError`](#vega.OrderError) value given in the `reason` field |
|
| expires_at | int64 | Timestamp for when the order will expire, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`, valid only for [`Order.TimeInForce`](#vega.Order.TimeInForce)`.TIME_IN_FORCE_GTT` |
|
| reference | string | Reference given for the order, this is typically used to retrieve an order submitted through consensus - Currently set internally by the node to return a unique reference identifier for the order submission |
|
| reason | OrderError | If the Order `status` is `STATUS_REJECTED` then an [`OrderError`](#vega.OrderError) reason will be specified - The default for this field is `ORDER_ERROR_NONE` which signifies that there were no errors |
|
| updated_at | int64 | Timestamp for when the Order was last updated, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| version | uint64 | The version for the order, initial value is version 1 and is incremented after each successful amend |
|
| batch_id | uint64 | Batch identifier for the order, used internally for orders submitted during auctions to keep track of the auction batch this order falls under (required for fees calculation) |
|
| pegged_order | PeggedOrder | Pegged order details, used only if the order represents a pegged order. |
|
| liquidity_provision_id | string | Is this order created as part of a liquidity provision, will be empty if not. |
Used when cancelling an Order
| Field | Type | Label | Description |
| order | Order | The order that was cancelled |
Used when confirming an Order
| Field | Type | Label | Description |
| order | Order | The order that was confirmed |
|
| trades | Trade | repeated | 0 or more trades that were emitted |
| passive_orders_affected | Order | repeated | 0 or more passive orders that were affected |
A party represents an entity who wishes to trade on or query a Vega network
| Field | Type | Label | Description |
| id | string | A unique identifier for the party, typically represented by a public key |
| Field | Validations |
| id |
|
Pegged orders are limit orders where the price is specified in the form REFERENCE +/- OFFSET
They can be used for any limit order that is valid during continuous trading
| Field | Type | Label | Description |
| reference | PeggedReference | Which price point are we linked to |
|
| offset | int64 | Offset from the price reference |
Represents position data for a party on the specified market on Vega
| Field | Type | Label | Description |
| market_id | string | Market identifier |
|
| party_id | string | Party identifier |
|
| open_volume | int64 | Open volume for the position, value is signed +ve for long and -ve for short |
|
| realised_pnl | int64 | Realised profit and loss for the position, value is signed +ve for long and -ve for short |
|
| unrealised_pnl | int64 | Unrealised profit and loss for the position, value is signed +ve for long and -ve for short |
|
| average_entry_price | uint64 | Average entry price for the position, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| updated_at | int64 | Timestamp for the latest time the position was updated |
| Field | Type | Label | Description |
| volume | int64 | Volume for the position trade, value is signed +ve for long and -ve for short |
|
| price | uint64 | Price for the position trade, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
| Field | Type | Label | Description |
| value | uint64 | Price value, given as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
Represents a price level from market depth or order book data
| Field | Type | Label | Description |
| price | uint64 | Price for the price level, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| number_of_orders | uint64 | Number of orders at the price level |
|
| volume | uint64 | Volume at the price level |
Represents a list of valid (at the current timestamp) price ranges per associated trigger
| Field | Type | Label | Description |
| min_valid_price | uint64 | Minimum price that isn't currently breaching the specified price monitoring trigger |
|
| max_valid_price | uint64 | Maximum price that isn't currently breaching the specified price monitoring trigger |
|
| trigger | PriceMonitoringTrigger | Price monitoring trigger associated with the bounds |
|
| reference_price | double | Reference price used to calculate the valid price range |
Risk factors are used to calculate the current risk associated with orders trading on a given market
| Field | Type | Label | Description |
| market | string | Market ID that relates to this risk factor |
|
| short | double | Short Risk factor value |
|
| long | double | Long Risk factor value |
Risk results are calculated internally by Vega to attempt to maintain safe trading
| Field | Type | Label | Description |
| updated_timestamp | int64 | Timestamp for when risk factors were generated |
|
| risk_factors | RiskResult.RiskFactorsEntry | repeated | Risk factors (long and short) for each margin-able asset/currency (usually == settlement assets) in the market |
| next_update_timestamp | int64 | Timestamp for when risk factors are expected to change (or empty if risk factors are continually updated) |
|
| predicted_next_risk_factors | RiskResult.PredictedNextRiskFactorsEntry | repeated | Predicted risk factors at next change (what they would be if the change occurred now) |
| Field | Type | Label | Description |
| key | string |
|
|
| value | RiskFactor |
|
| Field | Type | Label | Description |
| key | string |
|
|
| value | RiskFactor |
|
A signature to be authenticate a transaction
and to be verified by the vega network
| Field | Type | Label | Description |
| sig | bytes | The bytes of the signature |
|
| algo | string | The algorithm used to create the signature |
|
| version | uint32 | The version of the signature used to create the signature |
A bundle of a transaction and it's signature
| Field | Type | Label | Description |
| tx | bytes | Transaction payload (proto marshalled) |
|
| sig | Signature | The signature authenticating the transaction |
Vega domain specific statistics as reported by the node the caller is connected to
| Field | Type | Label | Description |
| block_height | uint64 | Current block height as reported by the Vega blockchain |
|
| backlog_length | uint64 | Current backlog length (number of transactions) that are waiting to be included in a block |
|
| total_peers | uint64 | Total number of connected peers to this node |
|
| genesis_time | string | Genesis block date and time formatted in ISO-8601 datetime format with nanosecond precision |
|
| current_time | string | Current system date and time formatted in ISO-8601 datetime format with nanosecond precision |
|
| vega_time | string | Current Vega date and time formatted in ISO-8601 datetime format with nanosecond precision |
|
| status | ChainStatus | Status of the connection to the Vega blockchain - See [`ChainStatus`](#vega.ChainStatus) |
|
| tx_per_block | uint64 | Transactions per block |
|
| average_tx_bytes | uint64 | Average transaction size in bytes |
|
| average_orders_per_block | uint64 | Average orders per block |
|
| trades_per_second | uint64 | Trades emitted per second |
|
| orders_per_second | uint64 | Orders processed per second |
|
| total_markets | uint64 | Total markets on this Vega network |
|
| total_amend_order | uint64 | Total number of order amendments since genesis (on all markets) |
|
| total_cancel_order | uint64 | Total number of order cancellations since genesis (on all markets) |
|
| total_create_order | uint64 | Total number of order submissions since genesis (on all markets) |
|
| total_orders | uint64 | Total number of orders processed since genesis (on all markets) |
|
| total_trades | uint64 | Total number of trades emitted since genesis (on all markets) |
|
| order_subscriptions | uint32 | Current number of stream subscribers to order data |
|
| trade_subscriptions | uint32 | Current number of stream subscribers to trade data |
|
| candle_subscriptions | uint32 | Current number of stream subscribers to candle-stick data |
|
| market_depth_subscriptions | uint32 | Current number of stream subscribers to market depth data |
|
| positions_subscriptions | uint32 | Current number of stream subscribers to positions data |
|
| account_subscriptions | uint32 | Current number of stream subscribers to account data |
|
| market_data_subscriptions | uint32 | Current number of stream subscribers to market data |
|
| app_version_hash | string | The version hash of the Vega node software |
|
| app_version | string | The version of the Vega node software |
|
| chain_version | string | The version of the underlying Vega blockchain |
|
| block_duration | uint64 | Current block duration, in nanoseconds |
|
| uptime | string | Total uptime for this node formatted in ISO-8601 datetime format with nanosecond precision |
|
| chain_id | string | Unique identifier for the underlying Vega blockchain |
|
| market_depth_updates_subscriptions | uint32 | Current number of stream subscribers to market depth update data |
A timestamp in nanoseconds since epoch
See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp`
| Field | Type | Label | Description |
| value | int64 | Timestamp value |
A trade occurs when an aggressive order crosses one or more passive orders on the order book for a market on Vega
| Field | Type | Label | Description |
| id | string | Unique identifier for the trade (generated by Vega) |
|
| market_id | string | Market identifier (the market that the trade occurred on) |
|
| price | uint64 | Price for the trade, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| size | uint64 | Size filled for the trade |
|
| buyer | string | Unique party identifier for the buyer |
|
| seller | string | Unique party identifier for the seller |
|
| aggressor | Side | Direction of the aggressive party e.g. SIDE_BUY or SIDE_SELL - See [`Side`](#vega.Side) |
|
| buy_order | string | Identifier of the order from the buy side |
|
| sell_order | string | Identifier of the order from the sell side |
|
| timestamp | int64 | Timestamp for when the trade occurred, in nanoseconds since the epoch - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| type | Trade.Type | Type for the trade - See [`Trade.Type`](#vega.Trade.Type) |
|
| buyer_fee | Fee | Fee amount charged to the buyer party for the trade |
|
| seller_fee | Fee | Fee amount charged to the seller party for the trade |
|
| buyer_auction_batch | uint64 | Auction batch number that the buy side order was placed in |
|
| seller_auction_batch | uint64 | Auction batch number that the sell side order was placed in |
| Field | Type | Label | Description |
| trades | Trade | repeated | A set of one or more trades |
Represents a transaction to be sent to Vega
| Field | Type | Label | Description |
| input_data | bytes | One of the set of Vega commands (proto marshalled) |
|
| nonce | uint64 | A random number used to provide uniqueness and prevent against replay attack |
|
| block_height | uint64 | The block height associated to the transaction, this should always be current block height of the node at the time of sending the Tx and block height is used as a mechanism for replay protection |
|
| address | bytes | The address of the sender |
|
| pub_key | bytes | The public key of the sender |
Represents a financial transfer within Vega
| Field | Type | Label | Description |
| owner | string | Party identifier for the owner of the transfer |
|
| amount | FinancialAmount | A financial amount (of an asset) to transfer |
|
| type | TransferType | The type of transfer, gives the reason for the transfer |
|
| min_amount | uint64 | A minimum amount |
Represents the balance for an account during a transfer
| Field | Type | Label | Description |
| account | Account | The account relating to the transfer |
|
| balance | uint64 | The balance relating to the transfer |
Represents a request to transfer from one set of accounts to another
| Field | Type | Label | Description |
| from_account | Account | repeated | One or more accounts to transfer from |
| to_account | Account | repeated | One or more accounts to transfer to |
| amount | uint64 | An amount to transfer for the asset |
|
| min_amount | uint64 | A minimum amount |
|
| asset | string | Asset identifier |
|
| reference | string | A reference for auditing purposes |
Represents the response from a transfer
| Field | Type | Label | Description |
| transfers | LedgerEntry | repeated | One or more ledger entries representing the transfers |
| balances | TransferBalance | repeated | One or more account balances |
Withdrawal external details
| Field | Type | Label | Description |
| erc20 | Erc20WithdrawExt | ERC20 withdrawal details |
A withdrawal from the Vega network
| Field | Type | Label | Description |
| id | string | Unique identifier for the withdrawal |
|
| party_id | string | Unique party identifier of the user initiating the withdrawal |
|
| amount | uint64 | The amount to be withdrawn |
|
| asset | string | The asset we want to withdraw funds from |
|
| status | Withdrawal.Status | The status of the withdrawal |
|
| ref | string | The reference which is used by the foreign chain to refer to this withdrawal |
|
| expiry | int64 | The time until when the withdrawal is valid |
|
| tx_hash | string | The hash of the foreign chain for this transaction |
|
| created_timestamp | int64 | Timestamp for when the network started to process this withdrawal |
|
| withdrawn_timestamp | int64 | Timestamp for when the withdrawal was finalised by the network |
|
| ext | WithdrawExt | Foreign chain specifics |
Various collateral/account types as used by Vega
| Name | Number | Description |
| ACCOUNT_TYPE_UNSPECIFIED | 0 | Default value |
| ACCOUNT_TYPE_INSURANCE | 1 | Insurance pool accounts contain insurance pool funds for a market |
| ACCOUNT_TYPE_SETTLEMENT | 2 | Settlement accounts exist only during settlement or mark-to-market |
| ACCOUNT_TYPE_MARGIN | 3 | Margin accounts contain margin funds for a party and each party will have multiple margin accounts, one for each market they have traded in Margin account funds will alter as margin requirements on positions change |
| ACCOUNT_TYPE_GENERAL | 4 | General accounts contains general funds for a party. A party will have multiple general accounts, one for each asset they want to trade with General accounts are where funds are initially deposited or withdrawn from, it is also the account where funds are taken to fulfil fees and initial margin requirements |
| ACCOUNT_TYPE_FEES_INFRASTRUCTURE | 5 | Infrastructure accounts contain fees earned by providing infrastructure on Vega |
| ACCOUNT_TYPE_FEES_LIQUIDITY | 6 | Liquidity accounts contain fees earned by providing liquidity on Vega markets |
| ACCOUNT_TYPE_FEES_MAKER | 7 | This account is created to hold fees earned by placing orders that sit on the book and are then matched with an incoming order to create a trade - These fees reward parties who provide the best priced liquidity that actually allows trading to take place |
| ACCOUNT_TYPE_LOCK_WITHDRAW | 8 | This account is created to lock funds to be withdrawn by parties |
| ACCOUNT_TYPE_BOND | 9 | This account is created to maintain liquidity providers funds commitments |
| ACCOUNT_TYPE_EXTERNAL | 10 | External account represents an external source (deposit/withdrawal) |
| ACCOUNT_TYPE_GLOBAL_INSURANCE | 11 | Global insurance account for the asset |
| ACCOUNT_TYPE_GLOBAL_REWARD | 12 | Global reward account for the asset |
Auction triggers indicate what condition triggered an auction (if market is in auction mode)
| Name | Number | Description |
| AUCTION_TRIGGER_UNSPECIFIED | 0 | Default value for AuctionTrigger, no auction triggered |
| AUCTION_TRIGGER_BATCH | 1 | Batch auction |
| AUCTION_TRIGGER_OPENING | 2 | Opening auction |
| AUCTION_TRIGGER_PRICE | 3 | Price monitoring trigger |
| AUCTION_TRIGGER_LIQUIDITY | 4 | Liquidity monitoring trigger |
The Vega blockchain status as reported by the node the caller is connected to
| Name | Number | Description |
| CHAIN_STATUS_UNSPECIFIED | 0 | Default value, always invalid |
| CHAIN_STATUS_DISCONNECTED | 1 | Blockchain is disconnected |
| CHAIN_STATUS_REPLAYING | 2 | Blockchain is replaying historic transactions |
| CHAIN_STATUS_CONNECTED | 3 | Blockchain is connected and receiving transactions |
The status of the deposit
| Name | Number | Description |
| STATUS_UNSPECIFIED | 0 | Default value, always invalid |
| STATUS_OPEN | 1 | The deposit is being processed by the network |
| STATUS_CANCELLED | 2 | The deposit has been cancelled by the network |
| STATUS_FINALIZED | 3 | The deposit has been finalised and accounts have been updated |
Represents a set of time intervals that are used when querying for candle-stick data
| Name | Number | Description |
| INTERVAL_UNSPECIFIED | 0 | Default value, always invalid |
| INTERVAL_I1M | 60 | 1 minute. |
| INTERVAL_I5M | 300 | 5 minutes. |
| INTERVAL_I15M | 900 | 15 minutes. |
| INTERVAL_I1H | 3600 | 1 hour. |
| INTERVAL_I6H | 21600 | 6 hours. |
| INTERVAL_I1D | 86400 | 1 day. |
Status of a liquidity provision order
| Name | Number | Description |
| STATUS_UNSPECIFIED | 0 | The default value |
| STATUS_ACTIVE | 1 | The liquidity provision is active |
| STATUS_STOPPED | 2 | The liquidity provision was stopped by the network |
| STATUS_CANCELLED | 3 | The liquidity provision was cancelled by the liquidity provider |
| STATUS_REJECTED | 4 | The liquidity provision was invalid and got rejected |
| STATUS_UNDEPLOYED | 5 | The liquidity provision is valid and accepted by network, but orders aren't deployed |
| STATUS_PENDING | 6 | The liquidity provision is valid and accepted by network but have never been deployed. I when it's possible to deploy them for the first time margin check fails, then they will be cancelled without any penalties. |
Status values for an order
See resulting status in [What order types are available to trade on Vega?](https://docs.testnet.vega.xyz/docs/trading-questions/#what-order-types-are-available-to-trade-on-vega) for more detail.
| Name | Number | Description |
| STATUS_UNSPECIFIED | 0 | Default value, always invalid |
| STATUS_ACTIVE | 1 | Used for active unfilled or partially filled orders |
| STATUS_EXPIRED | 2 | Used for expired GTT orders |
| STATUS_CANCELLED | 3 | Used for orders cancelled by the party that created the order |
| STATUS_STOPPED | 4 | Used for unfilled FOK or IOC orders, and for orders that were stopped by the network |
| STATUS_FILLED | 5 | Used for closed fully filled orders |
| STATUS_REJECTED | 6 | Used for orders when not enough collateral was available to fill the margin requirements |
| STATUS_PARTIALLY_FILLED | 7 | Used for closed partially filled IOC orders |
| STATUS_PARKED | 8 | Order has been removed from the order book and has been parked, this applies to pegged orders only |
Time In Force for an order
See [What order types are available to trade on Vega?](https://docs.testnet.vega.xyz/docs/trading-questions/#what-order-types-are-available-to-trade-on-vega) for more detail
| Name | Number | Description |
| TIME_IN_FORCE_UNSPECIFIED | 0 | Default value for TimeInForce, can be valid for an amend |
| TIME_IN_FORCE_GTC | 1 | Good until cancelled |
| TIME_IN_FORCE_GTT | 2 | Good until specified time |
| TIME_IN_FORCE_IOC | 3 | Immediate or cancel |
| TIME_IN_FORCE_FOK | 4 | Fill or kill |
| TIME_IN_FORCE_GFA | 5 | Good for auction |
| TIME_IN_FORCE_GFN | 6 | Good for normal |
Type values for an order
| Name | Number | Description |
| TYPE_UNSPECIFIED | 0 | Default value, always invalid |
| TYPE_LIMIT | 1 | Used for Limit orders |
| TYPE_MARKET | 2 | Used for Market orders |
| TYPE_NETWORK | 3 | Used for orders where the initiating party is the network (with distressed parties) |
OrderError codes are returned in the `[Order](#vega.Order).reason` field - If there is an issue
with an order during its life-cycle, it will be marked with `status.ORDER_STATUS_REJECTED`
| Name | Number | Description |
| ORDER_ERROR_UNSPECIFIED | 0 | Default value, no error reported |
| ORDER_ERROR_INVALID_MARKET_ID | 1 | Order was submitted for a market that does not exist |
| ORDER_ERROR_INVALID_ORDER_ID | 2 | Order was submitted with an invalid identifier |
| ORDER_ERROR_OUT_OF_SEQUENCE | 3 | Order was amended with a sequence number that was not previous version + 1 |
| ORDER_ERROR_INVALID_REMAINING_SIZE | 4 | Order was amended with an invalid remaining size (e.g. remaining greater than total size) |
| ORDER_ERROR_TIME_FAILURE | 5 | Node was unable to get Vega (blockchain) time |
| ORDER_ERROR_REMOVAL_FAILURE | 6 | Failed to remove an order from the book |
| ORDER_ERROR_INVALID_EXPIRATION_DATETIME | 7 | An order with `TimeInForce.TIME_IN_FORCE_GTT` was submitted or amended with an expiration that was badly formatted or otherwise invalid |
| ORDER_ERROR_INVALID_ORDER_REFERENCE | 8 | Order was submitted or amended with an invalid reference field |
| ORDER_ERROR_EDIT_NOT_ALLOWED | 9 | Order amend was submitted for an order field that cannot not be amended (e.g. order identifier) |
| ORDER_ERROR_AMEND_FAILURE | 10 | Amend failure because amend details do not match original order |
| ORDER_ERROR_NOT_FOUND | 11 | Order not found in an order book or store |
| ORDER_ERROR_INVALID_PARTY_ID | 12 | Order was submitted with an invalid or missing party identifier |
| ORDER_ERROR_MARKET_CLOSED | 13 | Order was submitted for a market that has closed |
| ORDER_ERROR_MARGIN_CHECK_FAILED | 14 | Order was submitted, but the party did not have enough collateral to cover the order |
| ORDER_ERROR_MISSING_GENERAL_ACCOUNT | 15 | Order was submitted, but the party did not have an account for this asset |
| ORDER_ERROR_INTERNAL_ERROR | 16 | Unspecified internal error |
| ORDER_ERROR_INVALID_SIZE | 17 | Order was submitted with an invalid or missing size (e.g. 0) |
| ORDER_ERROR_INVALID_PERSISTENCE | 18 | Order was submitted with an invalid persistence for its type |
| ORDER_ERROR_INVALID_TYPE | 19 | Order was submitted with an invalid type field |
| ORDER_ERROR_SELF_TRADING | 20 | Order was stopped as it would have traded with another order submitted from the same party |
| ORDER_ERROR_INSUFFICIENT_FUNDS_TO_PAY_FEES | 21 | Order was submitted, but the party did not have enough collateral to cover the fees for the order |
| ORDER_ERROR_INCORRECT_MARKET_TYPE | 22 | Order was submitted with an incorrect or invalid market type |
| ORDER_ERROR_INVALID_TIME_IN_FORCE | 23 | Order was submitted with invalid time in force |
| ORDER_ERROR_GFN_ORDER_DURING_AN_AUCTION | 24 | A GFN order has got to the market when it is in auction mode |
| ORDER_ERROR_GFA_ORDER_DURING_CONTINUOUS_TRADING | 25 | A GFA order has got to the market when it is in continuous trading mode |
| ORDER_ERROR_CANNOT_AMEND_TO_GTT_WITHOUT_EXPIRYAT | 26 | Attempt to amend order to GTT without ExpiryAt |
| ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT | 27 | Attempt to amend ExpiryAt to a value before CreatedAt |
| ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT | 28 | Attempt to amend to GTC without an ExpiryAt value |
| ORDER_ERROR_CANNOT_AMEND_TO_FOK_OR_IOC | 29 | Amending to FOK or IOC is invalid |
| ORDER_ERROR_CANNOT_AMEND_TO_GFA_OR_GFN | 30 | Amending to GFA or GFN is invalid |
| ORDER_ERROR_CANNOT_AMEND_FROM_GFA_OR_GFN | 31 | Amending from GFA or GFN is invalid |
| ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION | 32 | IOC orders are not allowed during auction |
| ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION | 33 | FOK orders are not allowed during auction |
| ORDER_ERROR_MUST_BE_LIMIT_ORDER | 34 | Pegged orders must be LIMIT orders |
| ORDER_ERROR_MUST_BE_GTT_OR_GTC | 35 | Pegged orders can only have TIF GTC or GTT |
| ORDER_ERROR_WITHOUT_REFERENCE_PRICE | 36 | Pegged order must have a reference price |
| ORDER_ERROR_BUY_CANNOT_REFERENCE_BEST_ASK_PRICE | 37 | Buy pegged order cannot reference best ask price |
| ORDER_ERROR_OFFSET_MUST_BE_LESS_OR_EQUAL_TO_ZERO | 38 | Pegged order offset must be <= 0 |
| ORDER_ERROR_OFFSET_MUST_BE_LESS_THAN_ZERO | 39 | Pegged order offset must be < 0 |
| ORDER_ERROR_OFFSET_MUST_BE_GREATER_OR_EQUAL_TO_ZERO | 40 | Pegged order offset must be >= 0 |
| ORDER_ERROR_SELL_CANNOT_REFERENCE_BEST_BID_PRICE | 41 | Sell pegged order cannot reference best bid price |
| ORDER_ERROR_OFFSET_MUST_BE_GREATER_THAN_ZERO | 42 | Pegged order offset must be > zero |
| ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE | 43 | The party has an insufficient balance, or does not have a general account to submit the order (no deposits made for the required asset) |
| ORDER_ERROR_CANNOT_AMEND_PEGGED_ORDER_DETAILS_ON_NON_PEGGED_ORDER | 44 | Cannot amend a non pegged orders details |
| ORDER_ERROR_UNABLE_TO_REPRICE_PEGGED_ORDER | 45 | We are unable to re-price a pegged order because a market price is unavailable |
| ORDER_ERROR_UNABLE_TO_AMEND_PRICE_ON_PEGGED_ORDER | 46 | It is not possible to amend the price of an existing pegged order |
| ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS | 47 | An FOK, IOC, or GFN order was rejected because it resulted in trades outside the price bounds |
A pegged reference defines which price point a pegged order is linked to - meaning
the price for a pegged order is calculated from the value of the reference price point
| Name | Number | Description |
| PEGGED_REFERENCE_UNSPECIFIED | 0 | Default value for PeggedReference, no reference given |
| PEGGED_REFERENCE_MID | 1 | Mid price reference |
| PEGGED_REFERENCE_BEST_BID | 2 | Best bid price reference |
| PEGGED_REFERENCE_BEST_ASK | 3 | Best ask price reference |
A side relates to the direction of an order, to Buy, or Sell
| Name | Number | Description |
| SIDE_UNSPECIFIED | 0 | Default value, always invalid |
| SIDE_BUY | 1 | Buy order |
| SIDE_SELL | 2 | Sell order |
Type values for a trade
| Name | Number | Description |
| TYPE_UNSPECIFIED | 0 | Default value, always invalid |
| TYPE_DEFAULT | 1 | Normal trading between two parties |
| TYPE_NETWORK_CLOSE_OUT_GOOD | 2 | Trading initiated by the network with another party on the book, which helps to zero-out the positions of one or more distressed parties |
| TYPE_NETWORK_CLOSE_OUT_BAD | 3 | Trading initiated by the network with another party off the book, with a distressed party in order to zero-out the position of the party |
Transfers can occur between parties on Vega, these are the types that indicate why a transfer took place
| Name | Number | Description |
| TRANSFER_TYPE_UNSPECIFIED | 0 | Default value, always invalid |
| TRANSFER_TYPE_LOSS | 1 | Loss |
| TRANSFER_TYPE_WIN | 2 | Win |
| TRANSFER_TYPE_CLOSE | 3 | Close |
| TRANSFER_TYPE_MTM_LOSS | 4 | Mark to market loss |
| TRANSFER_TYPE_MTM_WIN | 5 | Mark to market win |
| TRANSFER_TYPE_MARGIN_LOW | 6 | Margin too low |
| TRANSFER_TYPE_MARGIN_HIGH | 7 | Margin too high |
| TRANSFER_TYPE_MARGIN_CONFISCATED | 8 | Margin was confiscated |
| TRANSFER_TYPE_MAKER_FEE_PAY | 9 | Pay maker fee |
| TRANSFER_TYPE_MAKER_FEE_RECEIVE | 10 | Receive maker fee |
| TRANSFER_TYPE_INFRASTRUCTURE_FEE_PAY | 11 | Pay infrastructure fee |
| TRANSFER_TYPE_INFRASTRUCTURE_FEE_DISTRIBUTE | 12 | Receive infrastructure fee |
| TRANSFER_TYPE_LIQUIDITY_FEE_PAY | 13 | Pay liquidity fee |
| TRANSFER_TYPE_LIQUIDITY_FEE_DISTRIBUTE | 14 | Receive liquidity fee |
| TRANSFER_TYPE_BOND_LOW | 15 | Bond too low |
| TRANSFER_TYPE_BOND_HIGH | 16 | Bond too high |
| TRANSFER_TYPE_WITHDRAW_LOCK | 17 | Lock amount for withdraw |
| TRANSFER_TYPE_WITHDRAW | 18 | Actual withdraw from system |
| TRANSFER_TYPE_DEPOSIT | 19 | Deposit funds |
| TRANSFER_TYPE_BOND_SLASHING | 20 | Bond slashing |
| TRANSFER_TYPE_STAKE_REWARD | 21 | Stake reward |
The status of the withdrawal
| Name | Number | Description |
| STATUS_UNSPECIFIED | 0 | Default value, always invalid |
| STATUS_OPEN | 1 | The withdrawal is open and being processed by the network |
| STATUS_CANCELLED | 2 | The withdrawal have been cancelled |
| STATUS_FINALIZED | 3 | The withdrawal went through and is fully finalised, the funds are removed from the Vega network and are unlocked on the foreign chain bridge, for example, on the Ethereum network |
The Vega representation of an external asset
| Field | Type | Label | Description |
| id | string | Internal identifier of the asset |
|
| details | AssetDetails | The definition of the external source for this asset |
The Vega representation of an external asset
| Field | Type | Label | Description |
| name | string | Name of the asset (e.g: Great British Pound) |
|
| symbol | string | Symbol of the asset (e.g: GBP) |
|
| total_supply | string | Total circulating supply for the asset |
|
| decimals | uint64 | Number of decimal / precision handled by this asset |
|
| min_lp_stake | string | Min stake required for this asset from liquidity providers |
|
| builtin_asset | BuiltinAsset | A built-in asset |
|
| erc20 | ERC20 | An Ethereum ERC20 asset |
A Vega internal asset
| Field | Type | Label | Description |
| max_faucet_amount_mint | string | Maximum amount that can be requested by a party through the built-in asset faucet at a time |
An ERC20 token based asset, living on the ethereum network
| Field | Type | Label | Description |
| contract_address | string | The address of the contract for the token, on the ethereum network |
Future product configuration
| Field | Type | Label | Description |
| maturity | string | Future product maturity (ISO8601/RFC3339 timestamp) |
|
| settlement_asset | string | Product settlement asset identifier |
|
| quote_name | string | Product quote name |
|
| oracle_spec_for_settlement_price | oracles.v1.OracleSpecConfiguration | The oracle spec describing the oracle data of settlement price |
|
| oracle_spec_for_trading_termination | oracles.v1.OracleSpecConfiguration | The oracle spec describing the oracle data of trading termination |
|
| oracle_spec_binding | OracleSpecToFutureBinding | The binding between the oracle spec and the settlement price |
| Field | Validations |
| maturity |
|
| settlement_asset |
|
| quote_name |
|
Governance data
| Field | Type | Label | Description |
| proposal | Proposal | The governance proposal |
|
| yes | Vote | repeated | All "yes" votes in favour of the proposal above |
| no | Vote | repeated | All "no" votes against the proposal above |
| yes_party | GovernanceData.YesPartyEntry | repeated | All latest YES votes by party (guaranteed to be unique), where key (string) is the party ID (public key) and value (Vote) is the vote cast by the given party |
| no_party | GovernanceData.NoPartyEntry | repeated | All latest NO votes by party (guaranteed to be unique), where key (string) is the party ID (public key) and value (Vote) is the vote cast by the given party |
| Field | Type | Label | Description |
| key | string |
|
|
| value | Vote |
|
| Field | Type | Label | Description |
| key | string |
|
|
| value | Vote |
|
Instrument configuration
| Field | Type | Label | Description |
| name | string | Instrument name |
|
| code | string | Instrument code |
|
| future | FutureProduct | Future |
| Field | Validations |
| name |
|
| code |
|
New asset on Vega
| Field | Type | Label | Description |
| changes | AssetDetails | The configuration of the new asset |
| Field | Validations |
| changes |
|
New market on Vega
| Field | Type | Label | Description |
| changes | NewMarketConfiguration | The configuration of the new market |
|
| liquidity_commitment | NewMarketCommitment | The commitment from the party creating the NewMarket proposal |
| Field | Validations |
| changes |
|
A commitment of liquidity to be made by the party which proposes a market
| Field | Type | Label | Description |
| commitment_amount | uint64 | Specified as a unitless number that represents the amount of settlement asset of the market |
|
| fee | string | Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per seeting fees and rewarding liquidity providers |
|
| sells | LiquidityOrder | repeated | A set of liquidity sell orders to meet the liquidity provision obligation |
| buys | LiquidityOrder | repeated | A set of liquidity buy orders to meet the liquidity provision obligation |
| reference | string | A reference to be associated to all orders created from this commitment |
Configuration for a new market on Vega
| Field | Type | Label | Description |
| instrument | InstrumentConfiguration | New market instrument configuration |
|
| decimal_places | uint64 | Decimal places used for the new market |
|
| metadata | string | repeated | Optional new market meta data, tags |
| price_monitoring_parameters | PriceMonitoringParameters | Price monitoring parameters |
|
| liquidity_monitoring_parameters | LiquidityMonitoringParameters | Liquidity monitoring parameters |
|
| simple | SimpleModelParams | Simple risk model parameters, valid only if MODEL_SIMPLE is selected |
|
| log_normal | LogNormalRiskModel | Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected |
|
| continuous | ContinuousTrading | Continuous trading |
|
| discrete | DiscreteTrading | Discrete trading |
| Field | Validations |
| instrument |
|
| decimal_places |
|
Governance proposal
| Field | Type | Label | Description |
| id | string | Unique proposal identifier |
|
| reference | string | Proposal reference |
|
| party_id | string | Party identifier of the author (the party submitting the proposal) |
|
| state | Proposal.State | Proposal state - See (Proposal.State)[#vega.Proposal.State] definition |
|
| timestamp | int64 | Proposal timestamp for date and time (in nanoseconds) when proposal was submitted to the network |
|
| terms | ProposalTerms | Proposal configuration and the actual change that is meant to be executed when proposal is enacted |
|
| reason | ProposalError | A reason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses |
|
| error_details | string | The detailed error associated to the reason. |
| Field | Validations |
| party_id |
|
| state |
|
| terms |
|
Terms for a governance proposal on Vega
| Field | Type | Label | Description |
| closing_timestamp | int64 | Timestamp (Unix time in seconds) when voting closes for this proposal, constrained by `minCloseInSeconds` and `maxCloseInSeconds` network parameters |
|
| enactment_timestamp | int64 | Timestamp (Unix time in seconds) when proposal gets enacted (if passed), constrained by `minEnactInSeconds` and `maxEnactInSeconds` network parameters |
|
| validation_timestamp | int64 | Validation timestamp (Unix time in seconds) |
|
| update_market | UpdateMarket | Proposal change for modifying an existing market on Vega |
|
| new_market | NewMarket | Proposal change for creating new market on Vega |
|
| update_network_parameter | UpdateNetworkParameter | Proposal change for updating Vega network parameters |
|
| new_asset | NewAsset | Proposal change for creating new assets on Vega |
| Field | Validations |
| closing_timestamp |
|
| enactment_timestamp |
|
Update an existing market on Vega
Update network configuration on Vega
| Field | Type | Label | Description |
| changes | NetworkParameter | The network parameter to update |
| Field | Validations |
| changes |
|
Governance vote
| Field | Type | Label | Description |
| party_id | string | Voter's party identifier |
|
| value | Vote.Value | Actual vote |
|
| proposal_id | string | Identifier of the proposal being voted on |
|
| timestamp | int64 | Vote timestamp for date and time (in nanoseconds) when vote was submitted to the network |
|
| total_governance_token_balance | uint64 | Total number of governance token for the party that casted the vote |
|
| total_governance_token_weight | string | The weight of this vote based on the total of governance token |
| Field | Validations |
| party_id |
|
| value |
|
| proposal_id |
|
Proposal state transition:
Open ->
- Passed -> Enacted.
- Passed -> Failed.
- Declined
Rejected
Proposal can enter Failed state from any other state
| Name | Number | Description |
| STATE_UNSPECIFIED | 0 | Default value, always invalid |
| STATE_FAILED | 1 | Proposal enactment has failed - even though proposal has passed, its execution could not be performed |
| STATE_OPEN | 2 | Proposal is open for voting |
| STATE_PASSED | 3 | Proposal has gained enough support to be executed |
| STATE_REJECTED | 4 | Proposal wasn't accepted (proposal terms failed validation due to wrong configuration or failing to meet network requirements) |
| STATE_DECLINED | 5 | Proposal didn't get enough votes (either failing to gain required participation or majority level) |
| STATE_ENACTED | 6 | Proposal enacted |
| STATE_WAITING_FOR_NODE_VOTE | 7 | Waiting for node validation of the proposal |
A list of possible errors that can cause a proposal to be in state rejected or failed
| Name | Number | Description |
| PROPOSAL_ERROR_UNSPECIFIED | 0 | Default value |
| PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON | 1 | The specified close time is too early base on network parameters |
| PROPOSAL_ERROR_CLOSE_TIME_TOO_LATE | 2 | The specified close time is too late based on network parameters |
| PROPOSAL_ERROR_ENACT_TIME_TOO_SOON | 3 | The specified enact time is too early based on network parameters |
| PROPOSAL_ERROR_ENACT_TIME_TOO_LATE | 4 | The specified enact time is too late based on network parameters |
| PROPOSAL_ERROR_INSUFFICIENT_TOKENS | 5 | The proposer for this proposal as insufficient tokens |
| PROPOSAL_ERROR_INVALID_INSTRUMENT_SECURITY | 6 | The instrument quote name and base name were the same |
| PROPOSAL_ERROR_NO_PRODUCT | 7 | The proposal has no product |
| PROPOSAL_ERROR_UNSUPPORTED_PRODUCT | 8 | The specified product is not supported |
| PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT_TIMESTAMP | 9 | Invalid future maturity timestamp (expect RFC3339) |
| PROPOSAL_ERROR_PRODUCT_MATURITY_IS_PASSED | 10 | The product maturity is past |
| PROPOSAL_ERROR_NO_TRADING_MODE | 11 | The proposal has no trading mode |
| PROPOSAL_ERROR_UNSUPPORTED_TRADING_MODE | 12 | The proposal has an unsupported trading mode |
| PROPOSAL_ERROR_NODE_VALIDATION_FAILED | 13 | The proposal failed node validation |
| PROPOSAL_ERROR_MISSING_BUILTIN_ASSET_FIELD | 14 | A field is missing in a builtin asset source |
| PROPOSAL_ERROR_MISSING_ERC20_CONTRACT_ADDRESS | 15 | The contract address is missing in the ERC20 asset source |
| PROPOSAL_ERROR_INVALID_ASSET | 16 | The asset identifier is invalid or does not exist on the Vega network |
| PROPOSAL_ERROR_INCOMPATIBLE_TIMESTAMPS | 17 | Proposal terms timestamps are not compatible (Validation < Closing < Enactment) |
| PROPOSAL_ERROR_NO_RISK_PARAMETERS | 18 | No risk parameters were specified |
| PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_KEY | 19 | Invalid key in update network parameter proposal |
| PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_VALUE | 20 | Invalid valid in update network parameter proposal |
| PROPOSAL_ERROR_NETWORK_PARAMETER_VALIDATION_FAILED | 21 | Validation failed for network parameter proposal |
| PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_SMALL | 22 | Opening auction duration is less than the network minimum opening auction time |
| PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_LARGE | 23 | Opening auction duration is more than the network minimum opening auction time |
| PROPOSAL_ERROR_MARKET_MISSING_LIQUIDITY_COMMITMENT | 24 | Market proposal is missing a liquidity commitment |
| PROPOSAL_ERROR_COULD_NOT_INSTANTIATE_MARKET | 25 | Market proposal market could not be instantiate in execution |
| PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT | 26 | Market proposal market contained invalid product definition |
| PROPOSAL_ERROR_MISSING_COMMITMENT_AMOUNT | 27 | Market proposal is missing commitment amount |
| PROPOSAL_ERROR_INVALID_FEE_AMOUNT | 28 | Market proposal have invalid fee |
| PROPOSAL_ERROR_INVALID_SHAPE | 29 | Market proposal have invalid shape |
| PROPOSAL_ERROR_INVALID_RISK_PARAMETER | 30 | Market proposal invalid risk parameter |
| PROPOSAL_ERROR_MAJORITY_THRESHOLD_NOT_REACHED | 31 | Proposal was declined because vote didn't reach the majority thershold required |
| PROPOSAL_ERROR_PARTICIPATION_THRESHOLD_NOT_REACHED | 32 | Proposal declined because the participation threshold was not reached |
| PROPOSAL_ERROR_INVALID_ASSET_DETAILS | 33 | Asset proposal invalid asset details |
Vote value
| Name | Number | Description |
| VALUE_UNSPECIFIED | 0 | Default value, always invalid |
| VALUE_NO | 1 | A vote against the proposal |
| VALUE_YES | 2 | A vote in favour of the proposal |
OracleData describes an oracle data that has been broadcast.
| Field | Type | Label | Description |
| pub_keys | string | repeated | pubKeys is the list of authorized public keys that signed the data for this oracle. All the public keys in the oracle data should be contained in these public keys. |
| data | Property | repeated | data holds all the properties of the oracle data |
| matched_spec_ids | string | repeated | matched_specs_ids lists all the oracle specs that matched this oracle data. |
| broadcast_at | int64 | broadcast_at is the time at which the data was broadcast for the first time. |
Property describes one property of an oracle spec with a key with its value.
| Field | Type | Label | Description |
| name | string | name is the name of the property. |
|
| value | string | value is the value of the property. |
A command to submit an instruction to delegate some stake to a node
| Field | Type | Label | Description |
| node_id | string | The ID for the node to delegate to |
|
| amount | uint64 | The amount of stake to delegate |
| Field | Validations |
| node_id |
|
A liquidity provision submitted for a given market
| Field | Type | Label | Description |
| market_id | string | Market identifier for the order, required field |
|
| commitment_amount | uint64 | Specified as a unitless number that represents the amount of settlement asset of the market |
|
| fee | string | Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per seeting fees and rewarding liquidity providers |
|
| sells | vega.LiquidityOrder | repeated | A set of liquidity sell orders to meet the liquidity provision obligation |
| buys | vega.LiquidityOrder | repeated | A set of liquidity buy orders to meet the liquidity provision obligation |
| reference | string | A reference to be added to every order created out of this liquidityProvisionSubmission |
| Field | Validations |
| market_id |
|
An order amendment is a request to amend or update an existing order on Vega
| Field | Type | Label | Description |
| order_id | string | Order identifier, this is required to find the order and will not be updated, required field |
|
| market_id | string | Market identifier, this is required to find the order and will not be updated |
|
| price | vega.Price | Amend the price for the order, if the Price value is set, otherwise price will remain unchanged - See [`Price`](#vega.Price) |
|
| size_delta | int64 | Amend the size for the order by the delta specified: - To reduce the size from the current value set a negative integer value - To increase the size from the current value, set a positive integer value - To leave the size unchanged set a value of zero |
|
| expires_at | vega.Timestamp | Amend the expiry time for the order, if the Timestamp value is set, otherwise expiry time will remain unchanged - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| time_in_force | vega.Order.TimeInForce | Amend the time in force for the order, set to TIME_IN_FORCE_UNSPECIFIED to remain unchanged - See [`TimeInForce`](#api.VegaTimeResponse).`timestamp` |
|
| pegged_offset | google.protobuf.Int64Value | Amend the pegged order offset for the order |
|
| pegged_reference | vega.PeggedReference | Amend the pegged order reference for the order - See [`PeggedReference`](#vega.PeggedReference) |
| Field | Validations |
| order_id |
|
An order cancellation is a request to cancel an existing order on Vega
| Field | Type | Label | Description |
| order_id | string | Unique identifier for the order (set by the system after consensus), required field |
|
| market_id | string | Market identifier for the order, required field |
An order submission is a request to submit or create a new order on Vega
| Field | Type | Label | Description |
| market_id | string | Market identifier for the order, required field |
|
| price | uint64 | Price for the order, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places, , required field for limit orders, however it is not required for market orders |
|
| size | uint64 | Size for the order, for example, in a futures market the size equals the number of contracts, cannot be negative |
|
| side | vega.Side | Side for the order, e.g. SIDE_BUY or SIDE_SELL, required field - See [`Side`](#vega.Side) |
|
| time_in_force | vega.Order.TimeInForce | Time in force indicates how long an order will remain active before it is executed or expires, required field - See [`Order.TimeInForce`](#vega.Order.TimeInForce) |
|
| expires_at | int64 | Timestamp for when the order will expire, in nanoseconds since the epoch, required field only for [`Order.TimeInForce`](#vega.Order.TimeInForce)`.TIME_IN_FORCE_GTT` - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| type | vega.Order.Type | Type for the order, required field - See [`Order.Type`](#vega.Order.Type) |
|
| reference | string | Reference given for the order, this is typically used to retrieve an order submitted through consensus, currently set internally by the node to return a unique reference identifier for the order submission |
|
| pegged_order | vega.PeggedOrder | Used to specify the details for a pegged order - See [`PeggedOrder`](#vega.PeggedOrder) |
| Field | Validations |
| market_id |
|
| size |
|
A command to submit a new proposal for the
vega network governance
| Field | Type | Label | Description |
| reference | string | Proposal reference |
|
| terms | vega.ProposalTerms | Proposal configuration and the actual change that is meant to be executed when proposal is enacted |
| Field | Validations |
| terms |
|
| Field | Type | Label | Description |
| node_id | string |
|
|
| amount | uint64 | optional, if not specified = ALL |
|
| method | UndelegateSubmission.Method |
|
| Field | Validations |
| node_id |
|
A command to submit a new vote for a governance
proposal.
| Field | Type | Label | Description |
| proposal_id | string | The ID of the proposal to vote for. |
|
| value | vega.Vote.Value | The actual value of the vote |
| Field | Validations |
| proposal_id |
|
Represents the submission request to withdraw funds for a party on Vega
| Field | Type | Label | Description |
| amount | uint64 | The amount to be withdrawn |
|
| asset | string | The asset we want to withdraw |
|
| ext | vega.WithdrawExt | Foreign chain specifics |
| Name | Number | Description |
| METHOD_UNSPECIFIED | 0 | |
| METHOD_NOW | 1 | |
| METHOD_AT_END_OF_EPOCH | 2 | |
| METHOD_IN_ANGER | 3 |
A message to notify when a new validator is being added to the Vega network
| Field | Type | Label | Description |
| id | Identifier | The identifier of the validator |
A Bitcoin deposit into Vega
| Field | Type | Label | Description |
| vega_asset_id | string | The Vega network internal identifier of the asset |
|
| source_btc_address | string | The BTC wallet initiating the deposit |
|
| target_party_id | string | The Vega party identifier (pub-key) which is the target of the deposit |
An event from the Bitcoin network
| Field | Type | Label | Description |
| index | uint64 | The index of the transaction |
|
| block | uint64 | The block in which the transaction happened |
|
| deposit | BTCDeposit | Deposit BTC asset |
|
| withdrawal | BTCWithdrawal | Withdraw BTC asset |
A Bitcoin withdrawal from Vega
| Field | Type | Label | Description |
| vega_asset_id | string | The vega network internal identifier of the asset |
|
| source_party_id | string | The party identifier (pub-key) initiating the withdrawal |
|
| target_btc_address | string | Target Bitcoin wallet address |
|
| reference_nonce | string | The nonce reference of the transaction |
Used as a wrapper for a Bitcoin address (wallet)
| Field | Type | Label | Description |
| address | string | A Bitcoin address |
A deposit for a Vega built-in asset
| Field | Type | Label | Description |
| vega_asset_id | string | A Vega network internal asset identifier |
|
| party_id | string | A Vega party identifier (pub-key) |
|
| amount | uint64 | The amount to be deposited |
An event related to a Vega built-in asset
| Field | Type | Label | Description |
| deposit | BuiltinAssetDeposit | Built-in asset deposit |
|
| withdrawal | BuiltinAssetWithdrawal | Built-in asset withdrawal |
A withdrawal for a Vega built-in asset
| Field | Type | Label | Description |
| vega_asset_id | string | A Vega network internal asset identifier |
|
| party_id | string | A Vega network party identifier (pub-key) |
|
| amount | uint64 | The amount to be withdrawn |
An asset deny-listing for an ERC20 token
| Field | Type | Label | Description |
| vega_asset_id | string | The Vega network internal identifier of the asset |
An asset allow-listing for an ERC20 token
| Field | Type | Label | Description |
| vega_asset_id | string | The Vega network internal identifier of the asset |
An asset deposit for an ERC20 token
| Field | Type | Label | Description |
| vega_asset_id | string | The vega network internal identifier of the asset |
|
| source_ethereum_address | string | The Ethereum wallet that initiated the deposit |
|
| target_party_id | string | The Vega party identifier (pub-key) which is the target of the deposit |
|
| amount | string | The amount to be deposited |
An event related to an ERC20 token
| Field | Type | Label | Description |
| index | uint64 | Index of the transaction |
|
| block | uint64 | The block in which the transaction was added |
|
| asset_list | ERC20AssetList | List an ERC20 asset |
|
| asset_delist | ERC20AssetDelist | De-list an ERC20 asset |
|
| deposit | ERC20Deposit | Deposit ERC20 asset |
|
| withdrawal | ERC20Withdrawal | Withdraw ERC20 asset |
An asset withdrawal for an ERC20 token
| Field | Type | Label | Description |
| vega_asset_id | string | The Vega network internal identifier of the asset |
|
| target_ethereum_address | string | The target Ethereum wallet address |
|
| reference_nonce | string | The reference nonce used for the transaction |
Used as a wrapper for an Ethereum address (wallet/contract)
| Field | Type | Label | Description |
| address | string | An Ethereum address |
Used as a wrapper type on any possible network address supported by Vega
| Field | Type | Label | Description |
| ethereum_address | EthereumAddress | Ethereum network |
|
| bitcoin_address | BitcoinAddress | Bitcoin network |
A message to notify when a validator is being removed from the Vega network
| Field | Type | Label | Description |
| id | Identifier | The identifier of the validator |
An event related to validator management with foreign networks
| Field | Type | Label | Description |
| source_id | string | The source identifier of the event |
|
| add | AddValidator | Add a new validator |
|
| rm | RemoveValidator | Remove an existing validator |
An event forwarded to the Vega network to provide information on events happening on other networks
| Field | Type | Label | Description |
| tx_id | string | The identifier of the transaction in which the events happened, usually a hash |
|
| nonce | uint64 | Arbitrary one-time integer used to prevent replay attacks |
|
| builtin | vega.BuiltinAssetEvent | Built-in asset event |
|
| erc20 | vega.ERC20Event | Ethereum ERC20 event |
|
| btc | vega.BTCEvent | Bitcoin BTC event |
|
| validator | vega.ValidatorEvent | Validator event |
Used to Register a node as a validator during network start-up
| Field | Type | Label | Description |
| pub_key | bytes | Public key, required field |
|
| chain_pub_key | bytes | Public key for the blockchain, required field |
|
| 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 |
| Field | Validations |
| pub_key |
|
| chain_pub_key |
|
| info_url |
|
| country |
|
Represents a signature from a validator, to be used by a foreign chain in order to recognise a decision taken by the Vega network
| Field | Type | Label | Description |
| id | string | The identifier of the resource being signed |
|
| sig | bytes | The signature |
|
| kind | NodeSignatureKind | The kind of resource being signed |
Used when a node votes for validating a given resource exists or is valid,
for example, an ERC20 deposit is valid and exists on ethereum
| Field | Type | Label | Description |
| pub_key | bytes | Public key, required field |
|
| reference | string | Reference, required field |
| Field | Validations |
| pub_key |
|
| reference |
|
The kind of the signature created by a node, for example, allow-listing a new asset, withdrawal etc
| Name | Number | Description |
| NODE_SIGNATURE_KIND_UNSPECIFIED | 0 | Represents an unspecified or missing value from the input |
| NODE_SIGNATURE_KIND_ASSET_NEW | 1 | Represents a signature for a new asset allow-listing |
| NODE_SIGNATURE_KIND_ASSET_WITHDRAWAL | 2 | Represents a signature for an asset withdrawal |
An auction event indicating a change in auction state, for example starting or ending an auction
| Field | Type | Label | Description |
| market_id | string | Market identifier 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 | the 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 |
A bus event is a container for event bus events emitted by Vega
| Field | Type | Label | Description |
| id | string | A unique event identifier for the message |
|
| block | string | The batch (or block) of transactions that the events relate to |
|
| type | BusEventType | The type of bus event (one of the list below) |
|
| time_update | TimeUpdate | Time update events - See [TimeUpdate](#vega.TimeUpdate) |
|
| transfer_responses | TransferResponses | Transfer responses update events - See [TransferResponses](#vega.TransferResponses) |
|
| position_resolution | PositionResolution | Position resolution events - See [PositionResolution](#vega.PositionResolution) |
|
| 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 - See [LossSocialization](#vega.LossSocialization) |
|
| settle_position | SettlePosition | Position settlement events - See [SettlePosition](#vega.SettlePosition) |
|
| settle_distressed | SettleDistressed | Position distressed events - See [SettleDistressed](#vega.SettleDistressed) |
|
| market_created | vega.Market | Market created events |
|
| asset | vega.Asset | Asset events |
|
| market_tick | MarketTick | Market tick events - See [MarketTick](#vega.MarketTick) |
|
| withdrawal | vega.Withdrawal | Withdrawal events |
|
| deposit | vega.Deposit | Deposit events |
|
| auction | AuctionEvent | Auction events - See [AuctionEvent](#vega.AuctionEvent) |
|
| 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 | oracles.v1.OracleSpec | OracleSpec events |
|
| oracle_data | oracles.v1.OracleData | OracleData events |
|
| delegation_balance | DelegationBalanceEvent | Delegation balance events |
|
| pending_delegation_balance | PendingDelegationBalanceEvent | Pending delegation balance events |
|
| epoch_event | EpochEvent | Epoch update events - See [Epoch](#vega.Epoch) |
|
| validator_update | ValidatorUpdate | Validator update events |
|
| staking_event | StakingEvent | Staking event |
|
| market | MarketEvent | Market tick events - See [MarketEvent](#vega.MarketEvent) |
|
| tx_err_event | TxErrorEvent | Transaction error events, not included in the ALL event type |
DelegationBalanceEvent - updates on the delegation balance of a party to a node in the current epoch in effect
| Field | Type | Label | Description |
| party | string |
|
|
| node_id | string |
|
|
| amount | uint64 |
|
Epoch details
| Field | Type | Label | Description |
| seq | uint64 | Sequence number that increases by one each epoch |
|
| start_time | int64 | What time did this epoch start |
|
| expire_time | int64 | What time should this epoch end |
|
| end_time | int64 | What time did it actually end |
A loss socialization event contains details on the amount of wins unable to be distributed
| Field | Type | Label | Description |
| market_id | string | Market identifier for the event |
|
| party_id | string | Party identifier (public key) for the event |
|
| amount | int64 | Amount distributed |
MarketEvent - the common denominator for all market events
interface has a method to return a string for logging
| Field | Type | Label | Description |
| market_id | string | Market identifier for the event |
|
| payload | string | Payload is a unique information string |
A market ticket event contains the time value for when a particular market was last processed on Vega
| Field | Type | Label | Description |
| id | string | Market identifier for the event |
|
| time | int64 | Timestamp containing latest update from Vega blockchain aka Vega-time |
PendingDelegationBalanceEvent - updates on the delegation/undelegation balance of a party to a node for the next epoch
| Field | Type | Label | Description |
| party | string |
|
|
| node_id | string |
|
|
| delegation_amount | uint64 |
|
|
| undelegation_amount | uint64 |
|
A position resolution event contains information on distressed trades
| Field | Type | Label | Description |
| market_id | string | Market identifier for the event |
|
| distressed | int64 | Number of distressed traders |
|
| closed | int64 | Number of close outs |
|
| mark_price | uint64 | Mark price, as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
A settle distressed event contains information on distressed trading parties who are closed out
| Field | Type | Label | Description |
| market_id | string | Market identifier for the event |
|
| party_id | string | Party identifier (public key) for the event |
|
| margin | uint64 | Margin value as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| price | uint64 | Price as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
A settle position event contains position settlement information for a party
| Field | Type | Label | Description |
| market_id | string | Market identifier for the event |
|
| party_id | string | Party identifier (public key) for the event |
|
| price | uint64 | Price of settlement as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
|
| trade_settlements | TradeSettlement | repeated | A collection of 1 or more trade settlements |
StakingEvent - 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
| Field | Type | Label | Description |
| id | string | The internal ID for this staking event |
|
| type | StakingEvent.Type | The type of event |
|
| ts | int64 | The timestamps at which the event was emitted by ethereum |
|
| party | string | The party to whom the event is directed at. |
|
| amount | string | The amount of stake deposited or removed |
A time update event contains the latest time update from Vega blockchain
| Field | Type | Label | Description |
| timestamp | int64 | Timestamp containing latest update from Vega blockchain aka Vega-time |
A trade settlement is part of the settle position event
| Field | Type | Label | Description |
| size | int64 | Size of trade settlement |
|
| price | uint64 | Price of settlement as an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places |
A transfer responses event contains a collection of transfer information
| Field | Type | Label | Description |
| responses | vega.TransferResponse | repeated | One or more entries containing internal transfer information |
| Field | Type | Label | Description |
| party_id | string | Unique party identifier for the related party |
|
| err_msg | string | An error message describing what went wrong |
|
| order_submission | vega.commands.v1.OrderSubmission |
|
|
| order_amendment | vega.commands.v1.OrderAmendment |
|
|
| order_cancellation | vega.commands.v1.OrderCancellation |
|
|
| proposal | vega.commands.v1.ProposalSubmission |
|
|
| vote_submission | vega.commands.v1.VoteSubmission |
|
|
| liquidity_provision_submission | vega.commands.v1.LiquidityProvisionSubmission |
|
|
| withdraw_submission | vega.commands.v1.WithdrawSubmission |
|
A validator update event contains information about validator node
| Field | Type | Label | Description |
| pub_key | string | 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 |
An (event) 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_TRANSFER_RESPONSES | 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_PENDING_DELEGATION_BALANCE | 30 | Event indicating that an delegation balance of a party to a node for next epoch has changed |
| 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_STAKING_EVENT | 33 | Event indicating a new staking event have been processed by the network |
| 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 |
| Name | Number | Description |
| TYPE_UNSPECIFIED | 0 | Default value |
| TYPE_DEPOSIT | 1 | Indicate of a stake deposit instruction |
| TYPE_REMOVE | 2 | Indicate of a stake remove instruction |
Command to submit new Oracle data from third party providers
| Field | Type | Label | Description |
| source | OracleDataSubmission.OracleSource | The source from which the data is coming from |
|
| payload | bytes | The data provided by the third party provider |
The supported Oracle sources
| Name | Number | Description |
| ORACLE_SOURCE_UNSPECIFIED | 0 | The default value |
| ORACLE_SOURCE_OPEN_ORACLE | 1 | Support for Open Oracle standard |
| Field | Type | Label | Description |
| nonce | uint64 | A random number used to provided uniqueness and prevents against replay attack. |
|
| block_height | uint64 | The block height associated to the transaction. This should always be current height of the node at the time of sending the Tx. BlockHeight is used as a mechanism for replay protection. |
|
| order_submission | OrderSubmission | User commands |
|
| order_cancellation | OrderCancellation |
|
|
| order_amendment | OrderAmendment |
|
|
| withdraw_submission | WithdrawSubmission |
|
|
| proposal_submission | ProposalSubmission |
|
|
| vote_submission | VoteSubmission |
|
|
| liquidity_provision_submission | LiquidityProvisionSubmission |
|
|
| delegate_submission | DelegateSubmission |
|
|
| undelegate_submission | UndelegateSubmission |
|
|
| node_registration | NodeRegistration | Validator commands |
|
| node_vote | NodeVote |
|
|
| node_signature | NodeSignature |
|
|
| chain_event | ChainEvent |
|
|
| oracle_data_submission | OracleDataSubmission | Oracles |
A signature to be authenticate a transaction and to be verified by the vega
network.
| Field | Type | Label | Description |
| value | string | The bytes of the signature (hex-encoded). |
|
| algo | string | The algorithm used to create the signature. |
|
| version | uint32 | The version of the signature used to create the signature. |
Represents a transaction to be sent to Vega.
| Field | Type | Label | Description |
| input_data | bytes | One of the set of Vega commands (proto marshalled). |
|
| signature | Signature | The signature of the inputData. |
|
| address | string | The address of the sender (hex-encoded). Not supported yet. |
|
| pub_key | string | The public key of the sender (hex-encoded). |
|
| version | uint32 | A version of the transaction, to be used in the future in case we want to implement changes to the Transaction format. |
Request to subscribe to a stream of (Accounts)[#vega.Account]
| Field | Type | Label | Description |
| market_id | string | Market identifier |
|
| party_id | string | Party identifier |
|
| asset | string | Asset identifier |
|
| type | vega.AccountType | Account type to subscribe to, required field |
| Field | Type | Label | Description |
| account | vega.Account |
|
Request for an asset given an asset identifier
| Field | Type | Label | Description |
| id | string | Asset identifier, required field |
| Field | Validations |
| id |
|
Response for an asset given an asset identifier
| Field | Type | Label | Description |
| asset | vega.Asset | An asset record, if found |
Request for a list of all assets enabled on Vega
Response for a list of all assets enabled on Vega
| Field | Type | Label | Description |
| assets | vega.Asset | repeated | A list of 0 or more assets |
Request for a list of candles for a market at an interval
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field. |
|
| since_timestamp | int64 | Timestamp to retrieve candles since, in nanoseconds since the epoch, required field - See [`VegaTimeResponse`](#api.VegaTimeResponse).`timestamp` |
|
| interval | vega.Interval | Time interval for the candles, required field |
| Field | Validations |
| market_id |
|
| since_timestamp |
|
Response for a list of candles for a market at an interval
| Field | Type | Label | Description |
| candles | vega.Candle | repeated | A list of 0 or more candles |
Request to subscribe to a stream of (Candles)[#vega.Candle]
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
|
| interval | vega.Interval | Time interval for the candles, required field. |
| Field | Validations |
| market_id |
|
| Field | Type | Label | Description |
| candle | vega.Candle |
|
A request to get a specific deposit by identifier
| Field | Type | Label | Description |
| id | string | The identifier of the deposit |
| Field | Validations |
| id |
|
A response for a deposit
| Field | Type | Label | Description |
| deposit | vega.Deposit | The deposit matching the identifier from the request |
A request to get a list of deposit from a given party
| Field | Type | Label | Description |
| party_id | string | The party to get the deposits for |
| Field | Validations |
| party_id |
|
The response for a list of deposits
| Field | Type | Label | Description |
| deposits | vega.Deposit | repeated | The list of deposits for the specified party |
The request to get all information required to bundle the call to finalise the withdrawal on the erc20 bridge
| Field | Type | Label | Description |
| withdrawal_id | string | The identifier of the withdrawal |
| Field | Validations |
| withdrawal_id |
|
The response with all information required to bundle the call to finalise the withdrawal on the erc20 bridge
function withdraw_asset(address asset_source, uint256 asset_id, uint256 amount, uint256 expiry, uint256 nonce, bytes memory signatures)
| Field | Type | Label | Description |
| asset_source | string | The address of asset on ethereum |
|
| amount | string | The amount to be withdrawn |
|
| expiry | int64 | The expiry / until what time the request is valid |
|
| nonce | string | The nonce, which is actually the internal reference for the withdrawal |
|
| signatures | string | The signatures bundle as hex encoded data, forward by 0x e.g: 0x + sig1 + sig2 + ... + sixN |
Request to fetch the estimated fee if an order were to trade immediately
| Field | Type | Label | Description |
| order | vega.Order | Order to estimate fees for the following fields in the order are required: MarketID (used to specify the fee factors) Price (the price at which the order could trade) Size (the size at which the order could eventually trade) |
Response to a EstimateFeeRequest, containing the estimated fees for a given order
| Field | Type | Label | Description |
| fee | vega.Fee | Summary of the estimated fees for this order if it were to trade now |
Request to fetch the estimated MarginLevels if an order were to trade immediately
| Field | Type | Label | Description |
| order | vega.Order | Order to estimate fees for |
Response to a EstimateMarginRequest, containing the estimated marginLevels for a given order
| Field | Type | Label | Description |
| margin_levels | vega.MarginLevels | Summary of the estimated margins for this order if it were to trade now |
Request for a list of infrastructure fee accounts
| Field | Type | Label | Description |
| asset | string | Asset identifier, required field - Set to an empty string to return all accounts - Set to an asset ID to return a single infrastructure fee account for a given asset |
Response for a list of infrastructure fee accounts
| Field | Type | Label | Description |
| accounts | vega.Account | repeated | A list of 0 or more infrastructure fee accounts |
Request for a list of network parameter proposals
| Field | Type | Label | Description |
| select_in_state | OptionalProposalState | Optional proposal state |
Response for a list of network parameter proposals
| Field | Type | Label | Description |
| data | vega.GovernanceData | repeated | A list of 0 or more governance data |
Request for a list of new asset proposals
| Field | Type | Label | Description |
| select_in_state | OptionalProposalState | Optional proposal state |
Response for a list of new asset proposals
| Field | Type | Label | Description |
| data | vega.GovernanceData | repeated | A list of 0 or more governance data |
Request for a list of new market proposals
| Field | Type | Label | Description |
| select_in_state | OptionalProposalState | Optional proposal state |
Response for a list of new market proposals
| Field | Type | Label | Description |
| data | vega.GovernanceData | repeated | A list of 0 or more governance data |
Request to specify the identifier of the resource we want to retrieve aggregated signatures for
| Field | Type | Label | Description |
| id | string | Resource identifier, required field |
| Field | Validations |
| id |
|
Response to specify the identifier of the resource we want to retrieve aggregated signatures for
| Field | Type | Label | Description |
| signatures | vega.commands.v1.NodeSignature | repeated | A list of 0 or more signatures |
Request for a governance proposal given a proposal identifier
| Field | Type | Label | Description |
| proposal_id | string | Proposal identifier, required field |
| Field | Validations |
| proposal_id |
|
Response for a governance proposal given a proposal identifier
| Field | Type | Label | Description |
| data | vega.GovernanceData | Governance data, if found |
Request for a governance proposal given a proposal reference
| Field | Type | Label | Description |
| reference | string | Proposal reference. Required field |
| Field | Validations |
| reference |
|
Response for a governance proposal given a proposal reference
| Field | Type | Label | Description |
| data | vega.GovernanceData | Governance data, if found |
Request for a list of proposals for a party
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
|
| select_in_state | OptionalProposalState | Optional proposal state |
| Field | Validations |
| party_id |
|
Response for a list of proposals for a party
| Field | Type | Label | Description |
| data | vega.GovernanceData | repeated | A list of 0 or more governance data |
Request for a list of proposals
| Field | Type | Label | Description |
| select_in_state | OptionalProposalState | Optional proposal state |
Response for a list of proposals
| Field | Type | Label | Description |
| data | vega.GovernanceData | repeated | A list of 0 or more governance data |
Request for a list of update market proposals
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
|
| select_in_state | OptionalProposalState | Proposal state |
| Field | Validations |
| market_id |
|
Response for a list of update market proposals
| Field | Type | Label | Description |
| data | vega.GovernanceData | repeated | A list of 0 or more governance data |
Request for the current time of the vega network
Response for the current consensus coordinated time on the Vega network, referred to as "VegaTime"
| Field | Type | Label | Description |
| timestamp | int64 | Timestamp representation of current VegaTime as represented in Nanoseconds since the epoch, for example `1580473859111222333` corresponds to `2020-01-31T12:30:59.111222333Z` |
Request for a list of votes for a party
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
| Field | Validations |
| party_id |
|
Response for a list of votes for a party
| Field | Type | Label | Description |
| votes | vega.Vote | repeated | A list of 0 or more votes |
A request to get the height of the very last block processed
by tendermint
A response with the height of the last block processed by
tendermint
| Field | Type | Label | Description |
| height | uint64 |
|
Request for the latest trade that occurred on Vega for a given market
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
| Field | Validations |
| market_id |
|
Response for the latest trade that occurred on Vega for a given market
| Field | Type | Label | Description |
| trade | vega.Trade | A trade, if found |
A message requesting for the list of liquidity provision orders for markets
One of the two filters is required (or both)
| Field | Type | Label | Description |
| market | string | The target market for the liquidity provision orders |
|
| party | string | The party which submitted the liquidity provision orders |
A response containing all of the Vega liquidity provision orders
| Field | Type | Label | Description |
| liquidity_provisions | vega.LiquidityProvision | repeated |
|
Request for margin levels for a party
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
|
| market_id | string | Market identifier |
| Field | Validations |
| party_id |
|
Response for margin levels for a party
| Field | Type | Label | Description |
| margin_levels | vega.MarginLevels | repeated | A list of 0 or more margin levels |
Request to subscribe to a stream of MarginLevels data matching the given party identifier
Optionally, the list can be additionally filtered by market
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
|
| market_id | string | Market identifier |
| Field | Validations |
| party_id |
|
| Field | Type | Label | Description |
| margin_levels | vega.MarginLevels |
|
Request for a list of accounts for a market
| Field | Type | Label | Description |
| market_id | string | Market identifier |
|
| asset | string | Asset identifier |
Response for a list of accounts for a market
| Field | Type | Label | Description |
| accounts | vega.Account | repeated | A list of 0 or more accounts |
Request for a market given a market identifier
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
| Field | Validations |
| market_id |
|
Response for a market given a market identifier
| Field | Type | Label | Description |
| market | vega.Market | A market, if found |
Request for market data for a market
| Field | Type | Label | Description |
| market_id | string | Market identifier |
| Field | Validations |
| market_id |
|
Response for market data for a market
| Field | Type | Label | Description |
| market_data | vega.MarketData | Market data, if found |
Request for the market depth/order book price levels on a market
Optionally, a maximum depth can be set to limit the number of levels returned
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
|
| max_depth | uint64 | Max depth limits the number of levels returned. Default is 0, which returns all levels |
| Field | Validations |
| market_id |
|
Response for the market depth/order book price levels on a market
| Field | Type | Label | Description |
| market_id | string | Market identifier |
|
| buy | vega.PriceLevel | repeated | Zero or more price levels for the buy side of the market depth data |
| sell | vega.PriceLevel | repeated | Zero or more price levels for the sell side of the market depth data |
| last_trade | vega.Trade | Last trade recorded on Vega at the time of retrieving the `MarketDepthResponse` |
|
| sequence_number | uint64 | Sequence number incremented after each update |
Request to subscribe to a stream of (MarketDepth)[#vega.MarketDepth] data
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field. |
| Field | Validations |
| market_id |
|
| Field | Type | Label | Description |
| market_depth | vega.MarketDepth |
|
Request to subscribe to a stream of (MarketDepth Update)[#vega.MarketDepthUpdate] data
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
| Field | Validations |
| market_id |
|
| Field | Type | Label | Description |
| update | vega.MarketDepthUpdate |
|
Request for market data
Response for market data
| Field | Type | Label | Description |
| markets_data | vega.MarketData | repeated | A list of 0 or more market data |
Request to subscribe to a stream of MarketsData
Optionally, the list can be additionally filtered by market
| Field | Type | Label | Description |
| market_id | string | Market identifier |
| Field | Type | Label | Description |
| market_data | vega.MarketData |
|
Request for a list of markets on Vega
Response for a list of markets on Vega
| Field | Type | Label | Description |
| markets | vega.Market | repeated | A list of 0 or more markets |
A message requesting for the list of all network parameters
A response containing all of the vega network parameters
| Field | Type | Label | Description |
| network_parameters | vega.NetworkParameter | repeated |
|
Request to subscribe to a stream of one or more event types from the Vega event bus
| Field | Type | Label | Description |
| type | vega.events.v1.BusEventType | repeated | One or more types of event, required field |
| market_id | string | Market identifier, optional field |
|
| party_id | string | Party identifier, optional field |
|
| batch_size | int64 | Batch size, optional field - If not specified, any events received will be sent immediately. If the client is not ready for the next data-set, data may be dropped a number of times, and eventually the stream is closed. if specified, the first batch will be sent when ready. To receive the next set of events, the client must write an `ObserveEventBatch` message on the stream to flush the buffer. If no message is received in 5 seconds, the stream is closed. Default: 0, send any and all events when they are available. |
Response to a subscribed stream of events from the Vega event bus
| Field | Type | Label | Description |
| events | vega.events.v1.BusEvent | repeated | One or more events |
Request to obsever all event related to governance
All events related to governance
| Field | Type | Label | Description |
| data | vega.GovernanceData |
|
Request to subscribe to a stream of governance proposals for a party
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
| Field | Validations |
| party_id |
|
| Field | Type | Label | Description |
| data | vega.GovernanceData |
|
Request to subscribe to a stream of governance votes for a party
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
| Field | Validations |
| party_id |
|
| Field | Type | Label | Description |
| vote | vega.Vote |
|
Request to subscribe to a stream of governance votes for a proposal
| Field | Type | Label | Description |
| proposal_id | string | Proposal identifier, required field |
| Field | Validations |
| proposal_id |
|
| Field | Type | Label | Description |
| vote | vega.Vote |
|
Optional proposal state
| Field | Type | Label | Description |
| value | vega.Proposal.State | Proposal state value |
A request to all oracle data broadcast to a given spec
| Field | Type | Label | Description |
| id | string | The id to get the oracle spec for |
| Field | Validations |
| id |
|
The response for a list of all oracle data broadcast to a given spec
| Field | Type | Label | Description |
| oracle_data | oracles.v1.OracleData | repeated | The list of oracle data broadcast to a given spec |
A request to get a specific oracle spec by identifier
| Field | Type | Label | Description |
| id | string | The id to get the oracle spec for |
| Field | Validations |
| id |
|
A response for a oracle spec
| Field | Type | Label | Description |
| oracle_spec | oracles.v1.OracleSpec | The withdrawal matching the identifier from the request |
A request to get a specific oracle spec by identifier
The response for a list of withdrawals
| Field | Type | Label | Description |
| oracle_specs | oracles.v1.OracleSpec | repeated | The list of oracle specs |
Request for an order with the specified order identifier
Optionally, return a specific version of the order with the `version` field
| Field | Type | Label | Description |
| order_id | string | Order identifier, required field |
|
| version | uint64 | Version of the order: - Set `version` to 0 for most recent version of the order - Set `1` for original version of the order - Set `2` for first amendment, `3` for second amendment, etc |
| Field | Validations |
| order_id |
|
| Field | Type | Label | Description |
| order | vega.Order |
|
Request for an order on a market given an order identifier
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
|
| order_id | string | Order identifier, required field |
| Field | Validations |
| market_id |
|
| order_id |
|
Response for an order on a market given an order identifier
| Field | Type | Label | Description |
| order | vega.Order | An order, if found |
Request for an order given an order reference
| Field | Type | Label | Description |
| reference | string | Unique reference, required field |
| Field | Validations |
| reference |
|
Response for an order given an order reference
| Field | Type | Label | Description |
| order | vega.Order | An order, if found |
Request for a list of all versions of an order given the specified order identifier
| Field | Type | Label | Description |
| order_id | string | Order identifier, required field |
|
| pagination | Pagination | Pagination controls |
| Field | Validations |
| order_id |
|
Response to a request for a list of all versions of an order
| Field | Type | Label | Description |
| orders | vega.Order | repeated | A list of 0 or more orders (list will contain the same order but with different versions, if it has been amended) |
Request for a list of orders for a market
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
|
| pagination | Pagination | Optional pagination controls |
| Field | Validations |
| market_id |
|
Response for a list of orders for a market
| Field | Type | Label | Description |
| orders | vega.Order | repeated | A list of 0 or more orders |
Request for a list of orders for a party
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
|
| pagination | Pagination | Pagination controls |
| Field | Validations |
| party_id |
|
Response for a list of orders for a party
| Field | Type | Label | Description |
| orders | vega.Order | repeated | A list of 0 or more orders |
Request to subscribe to a stream of (Orders)[#vega.Order]
| Field | Type | Label | Description |
| market_id | string | Market identifier |
|
| party_id | string | Party identifier |
A stream of orders
| Field | Type | Label | Description |
| orders | vega.Order | repeated | A list of 0 or more orders |
Pagination controls
| Field | Type | Label | Description |
| skip | uint64 | Skip the number of records specified, default is 0 |
|
| limit | uint64 | Limit the number of returned records to the value specified, default is 50 |
|
| descending | bool | Descending reverses the order of the records returned, default is true, if false the results will be returned in ascending order |
Request for a list of all parties
Response to a request for a list of parties
| Field | Type | Label | Description |
| parties | vega.Party | repeated | A list of 0 or more parties |
Request for a list of accounts for a party
| Field | Type | Label | Description |
| party_id | string | Party identifier |
|
| market_id | string | Market identifier |
|
| type | vega.AccountType | Account type, required field |
|
| asset | string | Asset identifier |
Response for a list of accounts for a party
| Field | Type | Label | Description |
| accounts | vega.Account | repeated | A list of 0 or more accounts |
Request for a party given a party identifier
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
| Field | Validations |
| party_id |
|
Response for a party given a party identifier
| Field | Type | Label | Description |
| party | vega.Party | A party, if found |
Request for a list of positions for a party
Optionally, if a market identifier is set, the results will be filtered for that market only
| Field | Type | Label | Description |
| party_id | string | Party identifier, required field |
|
| market_id | string | Market identifier |
| Field | Validations |
| party_id |
|
Response for a list of positions for a party
| Field | Type | Label | Description |
| positions | vega.Position | repeated | A list of 0 or more positions |
Request to subscribe to a stream of (Positions)[#vega.Position]
| Field | Type | Label | Description |
| party_id | string | Party identifier, optional field |
|
| market_id | string | Market identifier, optional field |
| Field | Type | Label | Description |
| position | vega.Position |
|
Request to amend an existing order
| Field | Type | Label | Description |
| amendment | vega.commands.v1.OrderAmendment | An order amendment |
Response for preparing an order amendment
| Field | Type | Label | Description |
| blob | bytes | Blob is an encoded representation of the order amendment ready to sign using the Vega Wallet and then submit as a transaction. |
Request to cancel an existing order
| Field | Type | Label | Description |
| cancellation | vega.commands.v1.OrderCancellation | An order cancellation |
Response for preparing an order cancellation
| Field | Type | Label | Description |
| blob | bytes | Blob is an encoded representation of the order cancellation ready to sign using the Vega Wallet and then submit as a transaction |
Request to prepare liquiditity provision
| Field | Type | Label | Description |
| submission | vega.commands.v1.LiquidityProvisionSubmission | Submission, required field |
| Field | Validations |
| submission |
|
Response to a liquidity provision request
| Field | Type | Label | Description |
| blob | bytes | A blob is an encoded representation of the liquidity provision message ready to sign using the Vega Wallet and then submit as a transaction |
Request to prepare a governance proposal
| Field | Type | Label | Description |
| submission | vega.commands.v1.ProposalSubmission |
|
Response to prepare a governance proposal
| Field | Type | Label | Description |
| blob | bytes | A blob is an encoded representation of the proposal ready to sign using the Vega Wallet and then submit as a transaction |
|
| submission | vega.commands.v1.ProposalSubmission | A copy of the prepared proposal |
Request to submit a new order
| Field | Type | Label | Description |
| submission | vega.commands.v1.OrderSubmission | An order submission |
Response for preparing an order submission
| Field | Type | Label | Description |
| blob | bytes | Blob is an encoded representation of the order submission ready to sign using the Vega Wallet and then submit as a transaction |
|
| submit_id | string | Submission identifier (order reference) |
Request to prepare a governance vote
| Field | Type | Label | Description |
| submission | vega.commands.v1.VoteSubmission | Vote, required field |
| Field | Validations |
| submission |
|
Response to prepare a governance vote
| Field | Type | Label | Description |
| blob | bytes | A blob is an encoded representation of the vote ready to sign using the Vega Wallet and then submit as a transaction |
|
| submission | vega.commands.v1.VoteSubmission | A copy of the prepared vote |
Request for preparing a withdrawal
| Field | Type | Label | Description |
| withdraw | vega.commands.v1.WithdrawSubmission | An asset withdrawal |
Response for preparing a withdrawal
| Field | Type | Label | Description |
| blob | bytes | Blob is an encoded representation of the withdrawal ready to sign using the Vega Wallet and then submit as a transaction |
Request for a new event sent by the blockchain queue to be propagated on Vega
| Field | Type | Label | Description |
| evt | vega.commands.v1.ChainEvent | Chain event |
|
| pub_key | string | Public key |
|
| signature | bytes | Signature |
Response for a new event sent by the blockchain queue to be propagated on Vega
| Field | Type | Label | Description |
| success | bool | Success will be true if the event was accepted by the node, **Important** - success does not mean that the event is confirmed by consensus |
A a request for statistics about the Vega network
| Field | Type | Label | Description |
| statistics | vega.Statistics |
|
Request for submitting a transaction on Vega
| Field | Type | Label | Description |
| tx | vega.SignedBundle | A bundle of signed payload and signature, to form a transaction that will be submitted to the Vega blockchain |
|
| type | SubmitTransactionRequest.Type | Type of transaction request, for example ASYNC, meaning the transaction will be submitted and not block on a response |
Response for submitting a transaction on Vega
| Field | Type | Label | Description |
| success | bool | Success will be true if the transaction was accepted by the node, **Important** - success does not mean that the event is confirmed by consensus |
Request for submitting a transaction v2 on Vega
| Field | Type | Label | Description |
| tx | vega.commands.v1.Transaction | A bundle of signed payload and signature, to form a transaction that will be submitted to the Vega blockchain |
|
| type | SubmitTransactionV2Request.Type | Type of transaction request, for example ASYNC, meaning the transaction will be submitted and not block on a response |
Response for submitting a transaction v2 on Vega
| Field | Type | Label | Description |
| success | bool | Success will be true if the transaction was accepted by the node, **Important** - success does not mean that the event is confirmed by consensus |
Request for a list of trades on a market
| Field | Type | Label | Description |
| market_id | string | Market identifier, required field |
|
| pagination | Pagination | Pagination controls |
| Field | Validations |
| market_id |
|
Response for a list of trades on a market
| Field | Type | Label | Description |
| trades | vega.Trade | repeated | A list of 0 or more trades |
Request for a list of trades related to an order
| Field | Type | Label | Description |
| order_id | string | Order identifier, required field |
Response for a list of trades related to an order
| Field | Type | Label | Description |
| trades | vega.Trade | repeated | A list of 0 or more trades |
Request for a list of trades relating to the given party
Optionally, the list can be additionally filtered for trades by market
| Field | Type | Label | Description |
| party_id | string | Party identifier. Required field |
|
| market_id | string | Market identifier |
|
| pagination | Pagination | Pagination controls |
Response for a list of trades relating to a party
| Field | Type | Label | Description |
| trades | vega.Trade | repeated | A list of 0 or more trades |
Request to subscribe to a stream of (Trades)[#vega.Trade]
| Field | Type | Label | Description |
| market_id | string | Market identifier |
|
| party_id | string | Party identifier |
A stream of trades
| Field | Type | Label | Description |
| trades | vega.Trade | repeated | A list of 0 or more trades |
| Field | Type | Label | Description |
| response | vega.TransferResponse |
|
A request to get a specific withdrawal by identifier
| Field | Type | Label | Description |
| id | string | The identifier of the withdrawal |
| Field | Validations |
| id |
|
A response for a withdrawal
| Field | Type | Label | Description |
| withdrawal | vega.Withdrawal | The withdrawal matching the identifier from the request |
A request to get a list of withdrawal from a given party
| Field | Type | Label | Description |
| party_id | string | The party to get the withdrawals for |
| Field | Validations |
| party_id |
|
The response for a list of withdrawals
| Field | Type | Label | Description |
| withdrawals | vega.Withdrawal | repeated | The list of withdrawals for the specified party |
Blockchain transaction type
| Name | Number | Description |
| TYPE_UNSPECIFIED | 0 | |
| TYPE_ASYNC | 1 | The transaction will be submitted without waiting for response |
| TYPE_SYNC | 2 | The transaction will be submitted, and blocking until the tendermint mempool return a response |