trading_data.proto
path data-node/api/v2/trading_data.proto
package datanode.api.v2
Messages
AMMConnection
Name | Type | Description |
---|
edges | repeated AMMEdge | Page of AMM data and the corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
AMMEdge
Name | Type | Description |
---|
node | vega.events.v1.AMM | AMM pool data. |
cursor | string | Cursor that can be used to fetch further pages. |
AccountBalance
Represents the current balance of an account for an asset on Vega, for a particular owner or party
Name | Type | Description |
---|
owner | string | Party that owns the account.
Special values include `network` - represents the Vega network and is
most commonly seen during liquidation of a distressed trading position. |
balance | string | Asset balance represented as an integer, for example `123456` is a correctly
formatted price of `1.23456` assuming market configured to 5 decimal places.
Balances cannot be negative. |
asset | string | Asset ID for the account. |
market_id | string | Market ID for the account, this field will be empty if the asset is in a general account. |
type | vega.AccountType | Account type of this account. |
parent_party_id | optional string | Parent party ID of the account.
This field is optional and is used in cases where the account is derived from another party's account. |
AccountEdge
Account data item with the corresponding cursor.
Name | Type | Description |
---|
node | AccountBalance | Account balance data. |
cursor | string | Cursor that can be used to fetch further pages with reference to this account. |
AccountFilter
Account filter is used to filter account data.
An account is defined as a set of asset ID, type, party ID, and market ID.
- Every account has an associated asset and type.
- Certain account types such as the global reward pool for example, do not have an associated party.
These are denoted by the special party ID 'network'.
- Certain account types do not have an associated market such as the general party accounts, for example.
These are denoted by the special market ID '' (an empty string).
Name | Type | Description |
---|
asset_id | string | Restrict accounts to those holding balances in this asset ID. |
party_ids | repeated string | Restrict accounts to those owned by the parties in this list. Pass an empty list for no filter. |
market_ids | repeated string | Restrict accounts to those connected to the markets in this list. Pass an empty list for no filter. |
account_types | repeated vega.AccountType | Restrict accounts to those connected to any of the types in this list. Pass an empty list for no filter. |
AccountSnapshotPage
'Initial image' snapshot containing current account balances - may be sent over several response messages
Name | Type | Description |
---|
accounts | repeated AccountBalance | List of account balances. |
last_page | bool | Indicator if the current page is the last one or not. |
AccountUpdates
List of account updates in the last block
AccountsConnection
Page of accounts data and corresponding page information.
Name | Type | Description |
---|
edges | repeated AccountEdge | Page of accounts data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
AggregatedBalance
AggregatedBalance data contains the balance of the set of requested accounts combined with corresponding
party ID, market ID and account type details
Name | Type | Description |
---|
timestamp | int64 | Timestamp in Unix nanoseconds of the block in which the balance exists. |
balance | string | Balance of the set of requested accounts at the time above. |
party_id | optional string | If grouping by party, the party ID. |
asset_id | optional string | If grouping by asset, the asset ID. |
market_id | optional string | If grouping by market, the market ID |
account_type | optional vega.AccountType | If grouping by account type, the account type. |
AggregatedBalanceConnection
Page of aggregated balance objects and corresponding page information
Name | Type | Description |
---|
edges | repeated AggregatedBalanceEdge | Page of aggregated balance data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
AggregatedBalanceEdge
Aggregated balance data with the corresponding cursor.
Name | Type | Description |
---|
node | AggregatedBalance | Balance of the set of requested accounts. |
cursor | string | Cursor that can be used to fetch further pages. |
AggregatedLedgerEntriesConnection
Page of aggregated ledger entries data and corresponding page information.
AggregatedLedgerEntriesEdge
Represents the aggregated ledger entry data with corresponding cursor for it
Name | Type | Description |
---|
node | AggregatedLedgerEntry | 'AggregatedLedgerEntry' data. |
cursor | string | Cursor that can be used to fetch further pages. |
AggregatedLedgerEntry
Represents an aggregated view of ledger entry data, sender and receiver accounts,
details and balances for both sides after the transfer has been made
Name | Type | Description |
---|
timestamp | int64 | Timestamp in Unix nanoseconds of the block in which the result is referring to. |
quantity | string | Amount of ledger entries for the set of requested accounts at the time above. |
transfer_type | vega.TransferType | Transfer type. |
asset_id | optional string | Asset ID for the asset associated with the entry. |
from_account_type | vega.AccountType | Type of account sent from. |
to_account_type | vega.AccountType | Type of account received to. |
from_account_party_id | optional string | Sender's party ID. |
to_account_party_id | optional string | Receiver's party ID. |
from_account_market_id | optional string | Sender market ID. |
to_account_market_id | optional string | Receiver market ID. |
from_account_balance | string | Sender account balance after the transfer. |
to_account_balance | string | Receiver account balance after the transfer. |
transfer_id | string | Transfer ID associated with the ledger entry. |
AssetEdge
Assets data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Asset | Asset data returned. |
cursor | string | Cursor that can be used to fetch further pages. |
AssetsConnection
Page of asset data and corresponding page information
Name | Type | Description |
---|
edges | repeated AssetEdge | Page of assets data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
Candle
Represents the high, low, open, and closing prices for an interval of trading,
referred to commonly as a candlestick or candle
Name | Type | Description |
---|
start | int64 | Timestamp in Unix nanoseconds for the point in time when the candle was initially created/opened. |
last_update | int64 | Timestamp in Unix nanoseconds for the point in time when the candle was last updated. |
high | string | Highest price for trading during the candle interval. |
low | string | Lowest price for trading during the candle interval. |
open | string | Open trade price. |
close | string | Closing trade price. |
volume | uint64 | Total trading volume during the candle interval. |
notional | uint64 | Total notional value traded during the candle interval. This value is determined by multiplying price, using market decimal places, by size, using position decimal places.
The number of decimal places needed to convert this value to a decimal is market decimal places plus position decimal places. |
CandleDataConnection
Page of candles data and corresponding page information
Name | Type | Description |
---|
edges | repeated CandleEdge | Page of candle data items and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
CandleEdge
Candle data with the corresponding cursor.
Name | Type | Description |
---|
node | Candle | Candlestick data, i.e. high, low, open, and closing prices for an interval of trading. |
cursor | string | Cursor that can be used to fetch further pages. |
Checkpoint
Actual data regarding a checkpoint
Name | Type | Description |
---|
hash | string | Hash of the checkpoint. |
block_hash | string | Block hash at which the checkpoint is made. |
at_block | uint64 | Block number at which the checkpoint is made. |
CheckpointEdge
Checkpoint data with the corresponding cursor.
Name | Type | Description |
---|
node | Checkpoint | Data relating to a single checkpoint generated by the Vega network. |
cursor | string | Cursor that can be used to fetch further pages. |
CheckpointsConnection
Page of checkpoints data and corresponding page information
Name | Type | Description |
---|
edges | repeated CheckpointEdge | Page of checkpoints data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
CollateralIncreaseEstimate
Estimates the additional funds needed to support the specified position
Name | Type | Description |
---|
worst_case | string | Estimate assuming slippage cap is applied |
best_case | string | Estimate assuming no slippage |
CoreSnapshotConnection
Page of core snapshot data and corresponding page information.
Name | Type | Description |
---|
edges | repeated CoreSnapshotEdge | Page of core snapshot data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
CoreSnapshotEdge
Core snapshot data with the corresponding cursor.
DateRange
Date range for queries that can return historical data
Timestamps should be provided as unix time in Unix nanoseconds and are inclusive.
Name | Type | Description |
---|
start_timestamp | optional int64 | Timestamp in Unix nanoseconds indicating the start of the date range. |
end_timestamp | optional int64 | Timestamp in Unix nanoseconds indicating the end of the date range. |
DelegationEdge
Delegation data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Delegation | How much a party is delegating to a node and when. |
cursor | string | Cursor that can be used to fetch further pages. |
DelegationsConnection
Page of delegations data and corresponding page information
Name | Type | Description |
---|
edges | repeated DelegationEdge | Page of delegations data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
DepositEdge
Deposits data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Deposit | Data associated with a single deposit made on the Vega network. |
cursor | string | Cursor that can be used to fetch further pages. |
DepositsConnection
Page of deposits data received and corresponding page information
Name | Type | Description |
---|
edges | repeated DepositEdge | Page of deposits data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
ERC20MultiSigSignerAddedBundle
Signature bundle data to be added
Name | Type | Description |
---|
new_signer | string | Ethereum address of the signer to be removed. |
submitter | string | Ethereum address of the submitter. |
nonce | string | Nonce used in the signing operation. |
timestamp | int64 | Unixnano timestamp for when the validator was added. |
signatures | string | Bundle of signatures from current validators to sign in the new signer. |
epoch_seq | string | Epoch in which the validator was added. |
chain_id | string | ID of the EVM chain this signature bundle is valid for. |
ERC20MultiSigSignerAddedBundleEdge
Signature bundle data that is to be added with the corresponding cursor.
ERC20MultiSigSignerAddedConnection
Page of signature data items to be added and corresponding page information
ERC20MultiSigSignerAddedEdge
Signature data that is to be added with the corresponding cursor.
ERC20MultiSigSignerRemovedBundle
Signature bundle data to be removed
Name | Type | Description |
---|
old_signer | string | Ethereum address of the signer to be removed. |
submitter | string | Ethereum address of the submitter. |
nonce | string | Nonce used in the signing operation. |
timestamp | int64 | Unixnano timestamp for when the validator was added. |
signatures | string | Bundle of signatures from current validators to sign in the new signer. |
epoch_seq | string | Epoch in which the validator was removed. |
chain_id | string | ID of the EVM chain this signature bundle is valid for. |
ERC20MultiSigSignerRemovedBundleEdge
Signature bundle data to be removed, with the corresponding cursor.
ERC20MultiSigSignerRemovedConnection
Page of signature data items to be removed and corresponding page information.
ERC20MultiSigSignerRemovedEdge
Signature data to be removed with the corresponding cursor.
EpochRewardSummaryConnection
Page of rewards summary data for epoch and corresponding page information
Name | Type | Description |
---|
edges | repeated EpochRewardSummaryEdge | Page of rewards summary data for epochs and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
EpochRewardSummaryEdge
Rewards summary data for epoch with the corresponding cursor.
Name | Type | Description |
---|
node | vega.EpochRewardSummary | Rewards summary data for epoch. |
cursor | string | Cursor that can be used to fetch further pages. |
EstimateAMMBoundsRequest
Name | Type | Description |
---|
base_price | string | Base price of the AMM pool, the price is an integer, for example `123456` is a correctly
formatted price of `1.23456` assuming market configured to 5 decimal places. |
upper_price | optional string | Upper price of the AMM pool, the price is an integer, for example `123456` is a correctly
formatted price of `1.23456` assuming market configured to 5 decimal places. |
lower_price | optional string | Lower price of the AMM pool, the price is an integer, for example `123456` is a correctly
formatted price of `1.23456` assuming market configured to 5 decimal places. |
leverage_at_upper_price | optional string | Leverage at the upper price of the AMM pool. |
leverage_at_lower_price | optional string | Leverage at the lower price of the AMM pool. |
commitment_amount | string | Amount of the asset that the party is willing to commit to the AMM pool. |
market_id | string | Market ID to estimate the AMM for. |
EstimateAMMBoundsResponse
Name | Type | Description |
---|
position_size_at_upper | string | Theoretical volume at the top of the upper bound. |
position_size_at_lower | string | Theoretical volume at the top of the lower bound. |
loss_on_commitment_at_upper | string | Loss of commitment at the upper bound. |
loss_on_commitment_at_lower | string | Loss of commitment at the lower bound. |
liquidation_price_at_upper | string | Estimated price above upper bound at which the commitment will be lost. |
liquidation_price_at_lower | string | Estimated price below the lower bound at which the commitment will be lost. |
EstimateFeeRequest
Request to fetch the estimated fee if an order were to trade immediately
Name | Type | Description |
---|
market_id | string | Market ID, used to specify the fee factors. |
price | string | Price at which the potential order is expected to trade. |
size | uint64 | Size at which the potential order is expected to trade. |
EstimateFeeResponse
Response that is received from EstimateFeeRequest, contains the estimated fees for a given order
Name | Type | Description |
---|
fee | vega.Fee | Summary of the estimated fees for this order if it were to trade now. |
EstimateMarginRequest
Request to fetch the estimated MarginLevels if an order were to trade immediately
Name | Type | Description |
---|
market_id | string | Market ID for the order. |
party_id | string | Party ID of the order. |
side | vega.Side | Order side - indicator for Seller or Buyer side. |
type | vega.Order.Type | Type of the order. |
size | uint64 | Size of order. |
price | string | Price of the asset. |
EstimateMarginResponse
Response to an estimate margin request, containing the estimated margin levels for a given order
Name | Type | Description |
---|
margin_levels | vega.MarginLevels | Summary of the estimated margins for this order if it were to trade now. |
EstimatePositionRequest
Request for the estimated margin level, margin account balance change, and liquidation price for the specified position.
Name | Type | Description |
---|
market_id | string | Market ID to estimate position for. |
open_volume | int64 | Open volume. This field is a signed integer scaled to the market's position decimal places.
A negative number denotes a short position. |
average_entry_price | string | Average entry price corresponding to the open volume. The price is an unsigned integer. For example `123456` is a correctly
formatted price of `1.23456` assuming market configured to 5 decimal places. |
orders | repeated OrderInfo | Open and/or hypothetical orders. |
margin_account_balance | string | Margin account balance. Needs to scaled by asset decimal places. |
general_account_balance | string | General account balance. Needs to scaled by asset decimal places. |
order_margin_account_balance | string | Order margin account balance. Needs to be scaled by asset decimal places. |
margin_mode | vega.MarginMode | Margin mode for the party, cross margin or isolated margin. |
margin_factor | optional string | Margin factor to be used along with isolated margin mode |
include_required_position_margin_in_available_collateral | optional bool | Whether the estimated position margin increase should be included in available collateral for liquidation price calculation in isolated margin mode. |
scale_liquidation_price_to_market_decimals | optional bool | Whether the liquidation price estimates should be scaled to market decimal places or by asset decimal places. If not set, asset decimal places are used. |
EstimatePositionResponse
Response for the estimated margin level, margin account balance change, and liquidation price for the specified position.
Name | Type | Description |
---|
margin | MarginEstimate | Margin level range estimate for the specified position. |
collateral_increase_estimate | CollateralIncreaseEstimate | Estimated margin account balance increase. |
liquidation | LiquidationEstimate | Liquidation price range estimate for the specified position. Only populated if available collateral was specified in the request. |
EstimateTransferFeeRequest
Request an estimation of transfer fee and discount
Name | Type | Description |
---|
from_account | string | Sender's ID. |
from_account_type | vega.AccountType | Type of account sent from. |
to_account | string | Receiver's ID. |
amount | string | Amount to be transferred. |
asset_id | string | Asset ID for the asset associated with the transaction. |
from_amm_key | optional string | AMM public key, if assets are being transferred from an AMM key to the AMM owner's public key.
The `from_account` must be the owner of this AMM key. |
EstimateTransferFeeResponse
Results of estimation of transfer fee and the fee discount
Name | Type | Description |
---|
fee | string | Estimated fee for the transfer. |
discount | string | Discount applied to the fee. |
EthereumKeyRotationEdge
Ethereum key rotation data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.events.v1.EthereumKeyRotation | Data relating to an Ethereum key rotation performed by a node on the Vega network. |
cursor | string | Cursor that can be used to fetch further pages. |
EthereumKeyRotationsConnection
Page of Ethereum key rotations data and corresponding page information
ExportLedgerEntriesRequest
Request that is sent when exporting ledger entries to csv
Name | Type | Description |
---|
party_id | string | Restrict exported ledger entries to those relating to the given party ID. |
asset_id | optional string | Restrict exported ledger entries to those relating to the given asset ID. |
date_range | optional DateRange | Date range to export ledger entries for. |
ExportNetworkHistoryRequest
Request to export network history data in CSV format
Name | Type | Description |
---|
from_block | int64 | Block to begin exporting from. Must be the first block of a history segment,
which by default are 1000 blocks each; in that case - 1, 1001, 2001 etc. are valid values.
This can be checked by first calling the API to list all network history segments. |
to_block | int64 | Last block to export up to and including. Must be the last block of a history segment
which by default are 1000 blocks each; in that case - 1000, 2000, 3000 etc. are valid values.
This can be checked by first calling the API to list all network history segments. |
table | Table | Table to export data from. |
FeesStatsForParty
Name | Type | Description |
---|
asset_id | string | Settlement asset of the market. |
total_rewards_received | string | Total referral rewards received by referrer of the referral set. |
referees_discount_applied | string | Total referral discounts applied to referee fees. |
volume_discount_applied | string | Total volume discounts applied to referee fees. |
total_maker_fees_received | string | Total maker fees received by the maker side. |
FundingPayment
A funding payment for a party on a perpetual market
Name | Type | Description |
---|
party_id | string | Party that received the funding payment. |
market_id | string | Market that produced the funding payment. |
funding_period_seq | uint64 | Funding period sequence this payment was calculated from. |
timestamp | int64 | Timestamp, in Unix nanoseconds, at which this funding payment occurred. |
amount | string | Funding payment amount, where a positive value indicates an earned payment received and a negative value a loss. |
FundingPaymentConnection
Page of funding payment data and corresponding page information.
Name | Type | Description |
---|
edges | repeated FundingPaymentEdge | Page of funding payment data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
FundingPaymentEdge
Funding payment data with the corresponding cursor.
Name | Type | Description |
---|
node | FundingPayment | Funding payment data. |
cursor | string | Cursor that can be used to fetch further pages. |
FundingPeriodConnection
Page of funding period data and corresponding page information.
Name | Type | Description |
---|
edges | repeated FundingPeriodEdge | Page of funding period data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
FundingPeriodDataPointConnection
Page of funding period data points and corresponding page information.
FundingPeriodDataPointEdge
Funding period data point with the corresponding cursor.
FundingPeriodEdge
Funding period data with the corresponding cursor.
Game
Data relating to a game.
Name | Type | Description |
---|
id | string | Unique ID of the game |
epoch | uint64 | Epoch at which the last game metrics were captured. |
participants | uint64 | The number of participants in the game. |
team | TeamGameEntities | Team entities that are participating in the game |
individual | IndividualGameEntities | Individual entities that are participating in the game |
reward_asset_id | string | ID of the asset rewarded for involvement in the game. |
GameEdge
Game information and corresponding cursor.
Name | Type | Description |
---|
node | Game | Game data. |
cursor | string | Cursor that can be used to fetch further pages. |
GamePartyScoresConnection
Page of party game scores data and corresponding page information.
GamePartyScoresEdge
Name | Type | Description |
---|
node | vega.events.v1.GamePartyScore | Data associated with an order submitted to a Vega node. |
cursor | string | Cursor that can be used to fetch further pages. |
GamePartyScoresFilter
Name | Type | Description |
---|
game_ids | repeated string | Restrict game scores to those in the given games. |
team_ids | repeated string | Restrict game scores to the parties in the given teams. |
party_ids | repeated string | Restrict game scores to those relating to the given parties. |
epoch_from | optional uint64 | Restrict game scores to those from a given epoch. |
epoch_to | optional uint64 | Restrict game scores to those up to a given epoch. |
GameTeamScoresConnection
Page of team game scores data and corresponding page information.
GameTeamScoresEdge
Name | Type | Description |
---|
node | vega.events.v1.GameTeamScore | Data associated with an order submitted to a Vega node. |
cursor | string | Cursor that can be used to fetch further pages. |
GameTeamScoresFilter
Name | Type | Description |
---|
game_ids | repeated string | Restrict game scores to the given ones. |
team_ids | repeated string | Restrict game scores to those for the given teams. |
epoch_from | optional uint64 | Restrict game scores to those from a given epoch. |
epoch_to | optional uint64 | Restrict game scores to those up to a given epoch. |
GamesConnection
Page of games data and corresponding page information.
Name | Type | Description |
---|
edges | repeated GameEdge | Page of games data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
GetActiveNetworkHistoryPeerAddressesRequest
Request to get the addresses of active network history peers
GetActiveNetworkHistoryPeerAddressesResponse
Response containing the addresses of active network history peers
Name | Type | Description |
---|
ip_addresses | repeated string | List of IP addresses for the active peers. |
GetAssetRequest
Request for obtaining asset
Name | Type | Description |
---|
asset_id | string | Asset ID to get data for. |
GetAssetResponse
Response from getting an asset
Name | Type | Description |
---|
asset | vega.Asset | Asset information that is returned. |
GetBalanceHistoryRequest
Request that is used when querying balance history
Name | Type | Description |
---|
filter | AccountFilter | Account filter contains values that can be set in order to limit balance history data to them. |
group_by | repeated AccountField | By default the net balances of all the accounts specified by the filter are returned.
If a list of fields is given in group_by, split out those balances by the supplied criteria. |
pagination | optional Pagination | |
date_range | optional DateRange | |
GetBalanceHistoryResponse
Response that is received when querying for balance history
GetCurrentReferralProgramRequest
Request to get the current referral program
GetCurrentReferralProgramResponse
Response containing the current referral program
Name | Type | Description |
---|
current_referral_program | ReferralProgram | Referral program currently activated on the network. |
GetCurrentVolumeDiscountProgramRequest
Request to get the current referral program
GetCurrentVolumeDiscountProgramResponse
Response containing the current referral program
Name | Type | Description |
---|
current_volume_discount_program | VolumeDiscountProgram | Volume discount program currently activated on the network. |
GetDepositRequest
Request to get data about a specific deposit by ID
Name | Type | Description |
---|
id | string | Deposit ID to return data for. |
GetDepositResponse
Response that is received from getting deposit data
Name | Type | Description |
---|
deposit | vega.Deposit | Deposit matching the ID from the request. |
GetERC20ListAssetBundleRequest
Request for listing the signature bundle to an ERC-20 token in the collateral bridge
Name | Type | Description |
---|
asset_id | string | Asset ID of the asset bundle requested. |
GetERC20ListAssetBundleResponse
Response from listing the signature bundle to an ERC-20 token in the collateral bridge
Name | Type | Description |
---|
asset_source | string | Address of the asset on Ethereum. |
vega_asset_id | string | Asset ID for the underlying Vega asset. |
nonce | string | Nonce that uniquely identifies this signature bundle and prevents resubmission. |
signatures | string | Signatures bundle as hex encoded data, prefixed with `0x`
e.g: `0x + sig1 + sig2 + ... + sixN`. |
GetERC20SetAssetLimitsBundleRequest
Request for the signature bundle to update the token limits i.e. maxLifetimeDeposit and withdrawThreshold for a given ERC20 token that is already allowlisted in the collateral bridge
Name | Type | Description |
---|
proposal_id | string | Proposal ID of the asset update proposal. |
GetERC20SetAssetLimitsBundleResponse
Response for the signature bundle to update the token limits i.e. maxLifetimeDeposit and withdrawThreshold for a given ERC20 token that is already allowlisted in the collateral bridge
Name | Type | Description |
---|
asset_source | string | Address of the asset on Ethereum. |
vega_asset_id | string | Asset ID for the underlying Vega asset. |
nonce | string | Nonce that uniquely identifies this signature bundle and prevents resubmission. |
lifetime_limit | string | Lifetime limit deposit for this asset. |
threshold | string | Withdrawal threshold for this asset. |
signatures | string | Signatures bundle as hex encoded data, prefixed with `0x`
e.g: `0x + sig1 + sig2 + ... + sixN`. |
GetERC20WithdrawalApprovalRequest
Request to get all information required to bundle the call to finalise the withdrawal on the erc20 bridge
Name | Type | Description |
---|
withdrawal_id | string | Withdrawal ID to retrieve. |
GetERC20WithdrawalApprovalResponse
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)
Name | Type | Description |
---|
asset_source | string | Address of asset on the bridged EVM chain. |
amount | string | Amount to be withdrawn. |
nonce | string | Nonce that uniquely identifies this signature bundle and prevents resubmission. |
signatures | string | Signatures bundle as hex encoded data, prefixed with `0x`
e.g: 0x + sig1 + sig2 + ... + sixN. |
target_address | string | Address, prefixed with `0x`, that will receive the withdrawn assets. |
creation | int64 | Creation timestamps. |
source_chain_id | string | Chain ID of the bridged EVM chain. |
GetEpochRequest
Request to fetch epoch data
Provide either the epoch ID or the block height to get the epoch for. If both are provided, the epoch ID will be used.
If both are omitted, the current epoch will be returned.
Name | Type | Description |
---|
id | optional uint64 | Epoch ID. If provided, returns the epoch with the given ID. |
block | optional uint64 | Block height. If provided, returns the epoch that the given block is in. |
GetEpochResponse
Response from getting epoch
Name | Type | Description |
---|
epoch | vega.Epoch | Data specific to a single epoch on the Vega network. This includes the epoch number,
start and end times, and the nodes that participated in the epoch. |
GetFeesStatsForPartyRequest
Request that is sent to retrieve fees statistics for a given party.
Name | Type | Description |
---|
party_id | string | Restrict fees statistics to those for the given party. |
asset_id | optional string | Restrict fees statistics to those related to the given asset. |
from_epoch | optional uint64 | Epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`. |
to_epoch | optional uint64 | Epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch. |
GetFeesStatsForPartyResponse
Response that is sent when requesting fees statistics for a given party.
GetFeesStatsRequest
Request that is sent to retrieve fees statistics.
Name | Type | Description |
---|
market_id | optional string | Restrict fee statistics to those related to the given market. |
asset_id | optional string | Restrict fee statistics to those related to the given asset. |
epoch_seq | optional uint64 | Epoch to get referral fee statistics for. If not set, the last complete epoch is used. |
party_id | optional string | Restrict fee statistics to those for the given party. |
epoch_from | optional uint64 | Restrict fee statistics to epoch range starting with epoch from. |
epoch_to | optional uint64 | Restrict fee statistics to epoch range ending with epoch to. |
GetFeesStatsResponse
Response that is sent when requesting fees statistics.
GetGovernanceDataRequest
Request to get governance data
Name | Type | Description |
---|
proposal_id | optional string | Proposal ID to get governance data for, if provided. |
reference | optional string | Reference to get proposal data for, if provided. |
GetGovernanceDataResponse
Response from getting governance data
Name | Type | Description |
---|
data | vega.GovernanceData | Governance data content, i.e. proposal and votes for and against. |
GetLastTradeRequest
Request for the latest trade that occurred on Vega for a given market
Name | Type | Description |
---|
market_id | string | Market ID to retrieve the last trade for. |
GetLastTradeResponse
Response for the latest trade that occurred on Vega for a given market
Name | Type | Description |
---|
trade | vega.Trade | Information about the trade, if one is found. |
GetLatestMarketDataRequest
Request that is sent when listing the latest market data for a given market
Name | Type | Description |
---|
market_id | string | Market ID to retrieve market data for. |
GetLatestMarketDataResponse
Response that is received when listing the latest market data for a given market
Name | Type | Description |
---|
market_data | vega.MarketData | Market data that was requested. |
GetLatestMarketDepthRequest
Request that is sent when requesting latest market depth data
Name | Type | Description |
---|
market_id | string | Market ID to request market depth for, required field. |
max_depth | optional uint64 | Maximum market depth. |
GetLatestMarketDepthResponse
Response that is received when latest market depth data is queried
Name | Type | Description |
---|
market_id | string | Market ID of the depth levels returned. |
buy | repeated vega.PriceLevel | Zero or more price levels for the buy side of the market depth data. |
sell | repeated vega.PriceLevel | Zero or more price levels for the sell side of the market depth data. |
last_trade | vega.Trade | Last trade recorded on Vega. |
sequence_number | uint64 | Sequence number incremented after each update. |
GetMarketDataHistoryByIDRequest
Request that is sent for getting Market Data History
Name | Type | Description |
---|
market_id | string | Market ID to request data history for. |
start_timestamp | optional int64 | Timestamp in Unix nanoseconds indicating the start of the date range. |
end_timestamp | optional int64 | Timestamp in Unix nanoseconds indicating the end of the date range. |
pagination | optional Pagination | Pagination control. |
GetMarketDataHistoryByIDResponse
Response that is received when querying Market Data History
Name | Type | Description |
---|
market_data | MarketDataConnection | Page of market data history with the corresponding page information. |
GetMarketRequest
Request for getting a market by ID
Name | Type | Description |
---|
market_id | string | Market ID of the market to retrieve data for. |
GetMarketResponse
Response from getting a market by ID
Name | Type | Description |
---|
market | vega.Market | Information about the market requested. |
GetMostRecentNetworkHistorySegmentRequest
Request to get the most recent history segment
GetMostRecentNetworkHistorySegmentResponse
Response from getting most recent history segment
Name | Type | Description |
---|
segment | HistorySegment | Data relating to a history segment created by a Vega data node. |
swarm_key_seed | string | Key seed for the swarm section. |
GetNetworkDataRequest
Request to get network data
GetNetworkDataResponse
Response from getting network data
Name | Type | Description |
---|
node_data | vega.NodeData | Summary of information with respect to nodes on the Vega network. |
GetNetworkHistoryBootstrapPeersRequest
Request to get the nodes network history bootstrap peers
GetNetworkHistoryBootstrapPeersResponse
Response containing the nodes network history bootstrap peers
Name | Type | Description |
---|
bootstrap_peers | repeated string | List of peers that can be used to bootstrap a Vega data node. |
GetNetworkHistoryStatusRequest
Request to get the status of network history
GetNetworkHistoryStatusResponse
Response containing the status of network history
Name | Type | Description |
---|
ipfs_address | string | IPFS address of the data node currently connected to. |
swarm_key | string | Swarm key used by the IPFS swarm. |
swarm_key_seed | string | Swarm key seed used by the IPFS swarm. |
connected_peers | repeated string | List of peers connected to the IPFS swarm. |
GetNetworkLimitsRequest
Request that is used to query current network limits
GetNetworkLimitsResponse
Response received when querying the current network limits
GetNetworkParameterRequest
Request for a single network parameter
Name | Type | Description |
---|
key | string | Key identifying the network parameter. |
GetNetworkParameterResponse
Response that is received when getting a network parameter
GetNodeRequest
Request to get node data
Name | Type | Description |
---|
id | string | Node ID to get data for. |
GetNodeResponse
Response from getting node
Name | Type | Description |
---|
node | vega.Node | Data specific to a single node on the Vega network. |
GetOracleSpecRequest
Request to get a specific oracle spec by its ID
Name | Type | Description |
---|
oracle_spec_id | string | Oracle spec ID to request data for. |
GetOracleSpecResponse
Response for a oracle spec
Name | Type | Description |
---|
oracle_spec | vega.OracleSpec | External data spec matching the ID. |
GetOrderRequest
Request that is sent when executing the query for getting a single order
Name | Type | Description |
---|
order_id | string | Order ID to retrieve order information for. |
version | optional int32 | Historic version number of the order to return. If not set, the most current version will be returned. |
GetOrderResponse
Response received from the query for getting a single order
Name | Type | Description |
---|
order | vega.Order | Order details, if one was found. |
GetPartyActivityStreakRequest
Request to get a party's activity streaks across epochs
Name | Type | Description |
---|
party_id | string | Party ID to get the activity streak for. |
epoch | optional uint64 | Epoch to get the activity streak for. If not set, the last complete epoch is used. |
GetPartyActivityStreakResponse
Response when getting a party's activity streaks across epochs
GetPartyRequest
Request to get party by ID
Name | Type | Description |
---|
party_id | string | Party ID to retrieve party information for. |
GetPartyResponse
Response from getting party by ID
Name | Type | Description |
---|
party | vega.Party | Data for the party requested. |
GetPartyVestingStatsRequest
Request sent to get statistics about the vesting rewards for a party
Name | Type | Description |
---|
party_id | string | Party ID to query the vesting stats for. |
GetPartyVestingStatsResponse
Vesting reward statistics for a given party
Name | Type | Description |
---|
party_id | string | Party ID. |
reward_bonus_multiplier | string | Reward bonus multiplier. |
epoch_seq | uint64 | Epoch for which this information is valid. |
quantum_balance | string | The balance of the party, in quantum. |
summed_reward_bonus_multiplier | string | Bonus multiplier applied on the reward, summed across all derived accounts. |
summed_quantum_balance | string | The balance of the party and derived keys, in quantum. |
GetProtocolUpgradeStatusRequest
Request to get protocol upgrade status
GetProtocolUpgradeStatusResponse
Response from getting protocol upgrade status
Name | Type | Description |
---|
ready | bool | Indicator if the upgrade is ready or not. |
GetReferralSetStatsRequest
Request to get a referral set's stats
Name | Type | Description |
---|
referral_set_id | optional string | Restrict referral set statistics to those for the given referral set. |
at_epoch | optional uint64 | Epoch to get referral set statistics for. If not set, the last complete epoch is used. |
referee | optional string | Restrict referral set statistics to those for the given referee. |
pagination | optional Pagination | Pagination controls. |
GetReferralSetStatsResponse
Response containing the volume discount statistics for the given epoch.
GetRiskFactorsRequest
Request to get risk factor
Name | Type | Description |
---|
market_id | string | Market ID to get the risk factor for. |
GetRiskFactorsResponse
Response that is received from getting a risk factor
Name | Type | Description |
---|
risk_factor | vega.RiskFactor | Risk factor emitted by the risk model for a given market. |
GetStakeRequest
Request to get stake
Name | Type | Description |
---|
party_id | string | Party ID for which the stake information is requested. |
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
GetStakeResponse
Response that is received from requesting stake information
Name | Type | Description |
---|
current_stake_available | string | Current stake available information. |
stake_linkings | StakesConnection | Paged list of stake data with corresponding page information. |
GetStopOrderRequest
Request that is sent when executing the query for getting a single stop order.
Name | Type | Description |
---|
order_id | string | Order ID to retrieve order information for. |
GetStopOrderResponse
Response received from the query for getting a single stop order.
GetTimeWeightedNotionalPositionRequest
Request to retrieve the time weighted notional position for a party and asset.
If no epoch is given, the time weighted notional position at the end of the most recently completed epoch will be returned.
If an epoch is given, the time weighted notional position achieved by the end of the given epoch will be returned.
Name | Type | Description |
---|
asset_id | string | Asset ID to filter for. |
party_id | string | Party ID to filter for. |
game_id | string | Game ID to filter for. |
at_epoch | optional uint64 | Epoch to filter for. |
GetTimeWeightedNotionalPositionResponse
Response containing the time weighted notional position for a party and asset.
GetTotalTransferFeeDiscountRequest
Get total transfer fee discount available
Name | Type | Description |
---|
party_id | string | ID of party eligible for the discount. |
asset_id | string | ID of asset associated with the discount. |
GetTotalTransferFeeDiscountResponse
Returns total transfer fee discount available
Name | Type | Description |
---|
total_discount | string | Total per party per asset discount available. |
GetTransferRequest
Request that is sent for getting a transfer by ID
Name | Type | Description |
---|
transfer_id | string | Transfer ID to request data for. |
GetTransferResponse
Response that is received when querying transfers by ID
Name | Type | Description |
---|
transfer_node | TransferNode | Transfer and its fees requested by ID. |
GetVegaTimeRequest
Request to get the current time of the Vega network
GetVegaTimeResponse
Response for the current consensus coordinated time on the Vega network, referred to as "VegaTime"
Name | Type | Description |
---|
timestamp | int64 | Timestamp representation of current VegaTime as represented in Unix nanoseconds, for example
`1580473859111222333` corresponds to `2020-01-31T12:30:59.111222333Z`. |
GetVestingBalancesSummaryRequest
Request sent to list the vesting and locked balances for a party
Name | Type | Description |
---|
party_id | string | Party ID to query vesting balances for. |
asset_id | optional string | Optional asset ID, all asset balances returned if not set. |
GetVestingBalancesSummaryResponse
List of vesting and locked balances for a party.
GetVolumeDiscountStatsRequest
Request to get the volume discount statistics for a given epoch.
Name | Type | Description |
---|
at_epoch | optional uint64 | Epoch to get volume discount statistics for. If not set, last epoch is used. |
party_id | optional string | Restrict volume discount statistics to those for the given party. |
pagination | optional Pagination | Pagination controls. |
GetVolumeDiscountStatsResponse
Response containing the volume discount statistics for the given epoch.
GetWithdrawalRequest
Request to get a specific withdrawal by ID
Name | Type | Description |
---|
id | string | Withdrawal ID to retrieve data for. |
GetWithdrawalResponse
Response for a withdrawal request
Name | Type | Description |
---|
withdrawal | vega.Withdrawal | Withdrawal matching the ID from the request. |
GovernanceDataConnection
Page of governance data and corresponding page information
Name | Type | Description |
---|
edges | repeated GovernanceDataEdge | Page of governance data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
GovernanceDataEdge
Governance data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.GovernanceData | Governance data content, i.e. proposal and votes for and against. |
cursor | string | Cursor that can be used to fetch further pages. |
HistorySegment
Describes a network history segment
Name | Type | Description |
---|
from_height | int64 | Starting height of the history segment. |
to_height | int64 | Ending height of the history segment. |
history_segment_id | string | History segment ID. |
previous_history_segment_id | string | Previous history segment ID. |
database_version | int64 | Database schema version of the history segment. |
chain_id | string | Chain ID of the history segment. |
IndividualGameEntities
List of individuals that are participating in a game
IndividualGameEntity
Data relating to an individual participating in a game.
This can be used for both team members who are participating in a team game,
or individuals participating in an individual entity game.
Name | Type | Description |
---|
individual | string | Party ID of the individual participating |
rank | uint64 | Rank of the individual either in the game or within their team. |
volume | string | Volume traded by the individual |
reward_metric | vega.DispatchMetric | Reward metric applied to the individual |
reward_earned | string | Reward earned by the individual during the epoch |
total_rewards_earned | string | Total rewards earned by the individual for the game |
reward_earned_quantum | string | Rewards earned by the individual in quantum value |
total_rewards_earned_quantum | string | Total rewards earned by the individual in quantum value |
InfoRequest
Request that is sent when querying node information
InfoResponse
Response that is received from the node information query
Name | Type | Description |
---|
version | string | Semver formatted version of the data node. |
commit_hash | string | Commit hash from which the data node was built. |
IntervalToCandleId
Maps an interval for a given market to its corresponding candle ID
Name | Type | Description |
---|
interval | string | Interval for the candle. |
candle_id | string | Unique ID of the candle. |
KeyRotationConnection
Page of key rotations data and corresponding page information
Name | Type | Description |
---|
edges | repeated KeyRotationEdge | Page of key rotation data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
KeyRotationEdge
Key rotation data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.events.v1.KeyRotation | Data relating to a key rotation that was performed by a node on the Vega network. |
cursor | string | Cursor that can be used to fetch further pages. |
LedgerEntryFilter
Ledger entry filter sets filters on returned set of ledger entries.
Name | Type | Description |
---|
close_on_account_filters | bool | Determines whether an entry must have accounts matching both the account_from_filter
and the account_to_filter. If set to 'true', entries must have matches in both filters.
If set to `false`, entries matching only the account_from_filter or the account_to_filter will also be included. |
from_account_filter | AccountFilter | Used to set values for filtering sender accounts. Party must be provided in this filter or 'to' account filter, or both. |
to_account_filter | AccountFilter | Used to set values for filtering receiver accounts. Party must be provided in this filter or 'from' account filter, or both. |
transfer_types | repeated vega.TransferType | List of transfer types that is used for filtering sender and receiver accounts. |
transfer_id | optional string | List ledger entries that are associated with a specific transfer ID. If provided, all other filters are ignored |
LiquidationEstimate
Liquidation estimate for both worst and best case possible.
Name | Type | Description |
---|
worst_case | LiquidationPrice | Liquidation price estimate assuming slippage cap is applied. |
best_case | LiquidationPrice | Liquidation price estimate assuming no slippage. |
LiquidationPrice
Liquidation price estimate for either only the current open volume and position given some or all buy orders get filled, or position given some or all sell orders get filled.
Name | Type | Description |
---|
open_volume_only | string | Liquidation price for current open volume ignoring any active orders. |
including_buy_orders | string | Liquidation price assuming buy orders start getting filled. |
including_sell_orders | string | Liquidation price assuming sell orders start getting filled. |
LiquidityProvider
Liquidity provider information.
Name | Type | Description |
---|
party_id | string | Party ID of the liquidity provider. |
market_id | string | ID of the market the liquidity provider is active in. |
fee_share | vega.LiquidityProviderFeeShare | Information used for calculating an LP's fee share, such as the equity like share,
average entry valuation and liquidity score for the liquidity provider for the specified market. |
sla | vega.LiquidityProviderSLA | Information about LP's SLA performance. |
LiquidityProviderConnection
Page of liquidity provider data and corresponding page information.
LiquidityProviderEdge
Liquidity provider data with the corresponding cursor.
Name | Type | Description |
---|
node | LiquidityProvider | Liquidity provider information returned by the API. |
cursor | string | Cursor that can be used to fetch further data. |
LiquidityProvision
Liquidity provider commitment. For API purposes this can report a pending liquidity provision,
the current live provision or both in the event that an update has been accepted on the network, but has yet
to go live and thus there is still a pending provision that will become active in the next epoch.
LiquidityProvisionWithPendingEdge
Liquidity provision data with the corresponding cursor.
Name | Type | Description |
---|
node | LiquidityProvision | Data corresponding to a liquidity provider's commitment. |
cursor | string | Cursor that can be used to fetch further pages. |
LiquidityProvisionsConnection
Page of liquidity provisions data and corresponding page information
LiquidityProvisionsEdge
Liquidity provision data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.LiquidityProvision | Data corresponding to a liquidity provider's commitment. |
cursor | string | Cursor that can be used to fetch further pages. |
LiquidityProvisionsWithPendingConnection
Page of liquidity provisions data and corresponding page information
ListAMMsRequest
Name | Type | Description |
---|
id | optional string | AMM ID to filter for. If party ID or market ID is provided, the ID filter is ignored. |
party_id | optional string | Party ID to filter for. |
market_id | optional string | Market ID to filter for. If party ID is provided, the market filter is ignored |
amm_party_id | optional string | Party's underlying AMM sub-account to filter for. A party's AMM sub-account will remain the
same regardless of the AMM. |
status | optional vega.events.v1.AMM.Status | Filter for AMMs with the given status. This filter will be ignored if any of the other
filters have been set. |
pagination | optional Pagination | Pagination controls. |
ListAMMsResponse
Name | Type | Description |
---|
amms | AMMConnection | Page of AMM data and corresponding page information. |
ListAccountsRequest
Request that is sent when listing accounts.
Name | Type | Description |
---|
filter | AccountFilter | Account filter contains all filter conditions and values that can be applied to the listing. |
pagination | optional Pagination | Optional pagination control. |
include_derived_parties | optional bool | Whether to return all derived parties from AMMs for the given party.
If used, party ID is required. |
ListAccountsResponse
Response that is received from listing accounts query.
Name | Type | Description |
---|
accounts | AccountsConnection | Page of accounts data and corresponding page information. |
ListAllLiquidityProvisionsRequest
Request for listing liquidity provisions
Name | Type | Description |
---|
market_id | optional string | Restrict liquidity provisions to those placed on the given market. |
party_id | optional string | Restrict liquidity provisions to those placed by the given party. |
reference | optional string | Restrict liquidity provisions to those with the given order reference. |
live | optional bool | Whether to include live liquidity provisions. If not set, live orders will not be included. |
pagination | optional Pagination | Pagination controls. |
ListAllLiquidityProvisionsResponse
Response from listing liquidity provisions
ListAllNetworkHistorySegmentsRequest
Request to list all the nodes history segments
ListAllNetworkHistorySegmentsResponse
Response with a list of all the nodes history segments
Name | Type | Description |
---|
segments | repeated HistorySegment | Page of history segments data and corresponding page information. |
ListAllPositionsRequest
Request to list positions, given the position filter is supplied.
ListAllPositionsResponse
Response to query for listing of positions, given the filter is supplied
Name | Type | Description |
---|
positions | PositionConnection | Page of positions data and corresponding page information. |
ListAssetsRequest
Request for listing assets data
Name | Type | Description |
---|
asset_id | optional string | Optional asset ID to list data for. |
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
ListAssetsResponse
Response from listing assets
Name | Type | Description |
---|
assets | AssetsConnection | Page of assets data and corresponding page information. |
ListBalanceChangesRequest
Request to use when querying balances changes.
Name | Type | Description |
---|
filter | AccountFilter | Limit the accounts considered according to the filter supplied. |
pagination | optional Pagination | Pagination controls. |
date_range | optional DateRange | Date range over which to query. If a cursor is not provided in the pagination controls,
the date range must be provided with a start or end date, or both.
The date range is inclusive of the start date and exclusive of the end date.
The date range must be no more than 1 year in duration.
Dates before 2020-01-01 will not be accepted. |
ListBalanceChangesResponse
Response that is received from querying balances changes.
ListCandleDataRequest
Request that is used when listing candles for a market at an interval
Name | Type | Description |
---|
candle_id | string | Candle ID to retrieve candle data for. |
from_timestamp | int64 | Timestamp in Unix nanoseconds to retrieve candles from. |
to_timestamp | int64 | Timestamp in Unix nanoseconds to retrieve candles to. |
pagination | optional Pagination | Pagination controls. |
ListCandleDataResponse
Response for list of candles for a market at an interval
Name | Type | Description |
---|
candles | CandleDataConnection | Page of candle data and corresponding page information. |
ListCandleIntervalsRequest
Request that is used to fetch a list of supported intervals for the given market along with the corresponding candle ID
Name | Type | Description |
---|
market_id | string | Unique ID for the market to list candle intervals for. |
ListCandleIntervalsResponse
List of mapped pairs `interval` -> `candle ID` for a given market
ListCheckpointsRequest
Request to get all checkpoints. Currently no fields, probably will be expanded to allow filtering data
Name | Type | Description |
---|
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
ListCheckpointsResponse
Response message containing all checkpoints requested
Name | Type | Description |
---|
checkpoints | CheckpointsConnection | Page of checkpoints data and corresponding page information. |
ListCoreSnapshotsRequest
Request type for ListCoreSnapshots; fetches a paginated list of the core snapshots.
Name | Type | Description |
---|
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
ListCoreSnapshotsResponse
Response from a ListCoreSnapshots RPC call; a paginated list of the core snapshots.
Name | Type | Description |
---|
core_snapshots | CoreSnapshotConnection | Page of core snapshot data and corresponding page information. |
ListDelegationsRequest
Request for listing delegations
Name | Type | Description |
---|
party_id | optional string | Restrict delegations to those made by the given party ID. |
node_id | optional string | Restrict delegations to those made to the given node ID. |
epoch_id | optional string | Return delegations made in the given epoch. If not set, delegations for the current epoch will be returned. |
pagination | optional Pagination | Pagination controls. |
ListDelegationsResponse
Response from listing delegations
Name | Type | Description |
---|
delegations | DelegationsConnection | Page of delegations data and corresponding page information. |
ListDepositsRequest
Request to list all deposits for a given party
Name | Type | Description |
---|
party_id | string | Restrict deposits to those made by the given party ID. |
pagination | optional Pagination | Pagination controls. |
date_range | optional DateRange | Date range of the requested data, if provided. |
ListDepositsResponse
Response from listing deposits
Name | Type | Description |
---|
deposits | DepositsConnection | Page of deposits data and corresponding page information. |
ListERC20MultiSigSignerAddedBundlesRequest
Request for adding a signature bundle to the signer list of a multisig contract for a particular validator
Name | Type | Description |
---|
node_id | string | Node ID of the validator for which a signature bundle is required. |
submitter | string | Ethereum address of the validator that will submit the bundle. |
epoch_seq | string | Epoch in which the bundle was generated, i.e. the epoch in which the node was promoted to consensus validator. |
pagination | Pagination | Pagination controls. |
chain_id | optional string | Filter signature bundles to those related to the contract on the given chain ID. |
ListERC20MultiSigSignerAddedBundlesResponse
Response from adding a signature bundle to the signer list of a multisig contract for a particular validator
Name | Type | Description |
---|
bundles | ERC20MultiSigSignerAddedConnection | Page of bundles for that validator - it may have been added multiple times if removed in between - and corresponding page information. |
ListERC20MultiSigSignerRemovedBundlesRequest
Request for removing a signature bundle from the signer list of the multisig contract for a particular validator
Name | Type | Description |
---|
node_id | string | Node ID of the validator of which a signature bundle is required. |
submitter | string | Ethereum address of the validator that will submit the bundle. |
epoch_seq | string | Epoch in which the bundle was generated, i.e. the epoch in which the node was demoted from a consensus validator. |
pagination | Pagination | Pagination controls. |
chain_id | optional string | Filter signature bundles to those related to the contract on the given chain ID. |
ListERC20MultiSigSignerRemovedBundlesResponse
Response when removing a signature bundle from the signer list of the multisig contract for a particular validator
ListEntitiesRequest
Request to list all entities that were created by the given transaction hash
Name | Type | Description |
---|
transaction_hash | string | Transaction hash to match against |
ListEntitiesResponse
Response from listing entities that were created for a given transaction hash
ListEpochRewardSummariesRequest
Request to get summary of reward per epoch for a given range of epochs
Name | Type | Description |
---|
filter | RewardSummaryFilter | Limit the results considered according to the filter supplied. |
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
ListEpochRewardSummariesResponse
Return message with reward details in for a single party
ListEthereumKeyRotationsRequest
Request to list ethereum key rotations for nodes, optionally filtered by node
Name | Type | Description |
---|
node_id | optional string | Node ID to get the rotation for, if provided. |
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
ListEthereumKeyRotationsResponse
Response message containing Ethereum key rotations
ListFundingPaymentsRequest
Request to list a a party's funding payments
Name | Type | Description |
---|
party_id | string | Party ID to get funding payment for. |
market_id | optional string | Restrict funding payments returned to those generated by the given market. |
pagination | optional Pagination | Pagination controls. |
ListFundingPaymentsResponse
Response from listing funding payments
Name | Type | Description |
---|
funding_payments | FundingPaymentConnection | Page of funding period data and corresponding page information. |
ListFundingPeriodDataPointsRequest
ListFundingPeriodDataPointsResponse
Response from listing funding period data points.
ListFundingPeriodsRequest
Request to list a perpetual market's funding periods
Name | Type | Description |
---|
market_id | string | Market ID to get funding periods for. |
date_range | optional DateRange | Restrict the funding periods to those within the given date range. |
pagination | optional Pagination | Pagination controls. |
ListFundingPeriodsResponse
Response from listing funding periods
Name | Type | Description |
---|
funding_periods | FundingPeriodConnection | Page of funding period data and corresponding page information. |
ListGamePartyScoresRequest
Request that is sent when executing a query for a list of party game scores.
ListGamePartyScoresResponse
Response received from the query for getting a list of game scores for teams.
ListGameTeamScoresRequest
Request that is sent when executing a query for a list of team game scores.
ListGameTeamScoresResponse
Response received from the query for getting a list of game scores for teams.
ListGamesRequest
Request to retrieve games data.
Name | Type | Description |
---|
game_id | optional string | Game ID to filter for. |
epoch_from | optional uint64 | Oldest epoch to retrieve game data from, inclusive. The maximum range of epochs that can be fetched at once is 30.
If not provided, defaults to the 'to' epoch minus 29, or the first epoch available if not enough epochs have passed.
If the 'to' epoch is not specified, it will be set to the chosen 'from' epoch + 29. |
epoch_to | optional uint64 | Most recent epoch to retrieve game data to, inclusive. If not provided, defaults to the latest epoch. The maximum range of epochs that can be fetched at once is 30.
If no 'from' epoch is provided, or the 'from' epoch is out of range, i.e., the 'to' epoch - 'from' epoch > 29,
the 'from' epoch will be set to the 'to' epoch - 29. |
entity_scope | optional vega.EntityScope | Entity scope to filter games for, i.e. team games or individual games only |
pagination | optional Pagination | Pagination controls. |
team_id | optional string | Team ID to filter for. This filter will only be applied if entity scope is not specified
in the request, or the entity scope is set to teams. |
party_id | optional string | Party ID to filter for. This filter will apply regardless of the entity scope.
If the entity scope filter is teams, then the party ID filter will apply to team members. |
ListGamesResponse
Response containing games data.
Name | Type | Description |
---|
games | GamesConnection | Page of games data and corresponding page information. |
ListGovernanceDataRequest
Request to list governance data
Name | Type | Description |
---|
proposal_state | optional vega.Proposal.State | Restrict proposals to those with the given state. |
proposal_type | optional ListGovernanceDataRequest.Type | Restrict proposals to those with the given type. |
proposer_party_id | optional string | Restrict proposals to those proposed by the given party ID. |
proposal_reference | optional string | Restrict proposals to those with the given reference. |
pagination | optional Pagination | Pagination controls. |
ListGovernanceDataResponse
Response from listing governance data
ListKeyRotationsRequest
Request to list all key rotations
Name | Type | Description |
---|
node_id | optional string | Node ID to get key rotations for, if provided. |
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
ListKeyRotationsResponse
Response message containing Vega key rotations
Name | Type | Description |
---|
rotations | KeyRotationConnection | Page of key rotations data and corresponding page information. |
ListLatestMarketDataRequest
Request that is sent when listing the latest market data for every market
ListLatestMarketDataResponse
Response that is received when listing the latest market data for every market
ListLedgerEntriesRequest
Request that is sent when listing ledger entries.
Name | Type | Description |
---|
filter | LedgerEntryFilter | Ledger entry filter that contains all values and conditions according to which
the listing of ledger entries is filtered.You must provide at least one party in
'from' account filter, or 'to' account filter. |
pagination | optional Pagination | Optional pagination control. |
date_range | optional DateRange | Date range for which to list ledger entries.
If not set, the date range is restricted to the last 5 days.
If a start and end date is provided, but the range is more than 5 days, the end date will be restricted to 5 days from the start.
If a start date is provided, but no end date, the end date will be set to 5 days from the start.
If an end date is provided, but no start date, the start date will be set to 5 days before the end. |
ListLedgerEntriesResponse
Response that is received when listing ledger entries
ListLiquidityProvidersRequest
Request for listing active liquidity providers for a given market.
Either market ID or party ID or both, must be provided.
Name | Type | Description |
---|
market_id | optional string | Market ID to retrieve liquidity providers for. If omitted, you must provide a party ID. |
party_id | optional string | Party ID to retrieve data for. If omitted, you must provide a market ID. |
pagination | optional Pagination | Pagination controls. |
ListLiquidityProvidersResponse
Response for listing liquidity providers.
ListLiquidityProvisionsRequest
Request for listing liquidity provisions
Name | Type | Description |
---|
market_id | optional string | Restrict liquidity provisions to those placed on the given market. |
party_id | optional string | Restrict liquidity provisions to those placed by the given party. |
reference | optional string | Restrict liquidity provisions to those with the given order reference. |
live | optional bool | Whether to include live liquidity provisions. If not set, live orders will not be included. |
pagination | optional Pagination | Pagination controls. |
ListLiquidityProvisionsResponse
Response from listing liquidity provisions
ListMarginLevelsRequest
Request for listing margin levels
Name | Type | Description |
---|
party_id | string | Party ID for which to list the margin levels |
market_id | string | Market ID for which to list the margin levels |
pagination | Pagination | Pagination control |
ListMarginLevelsResponse
Response from listing margin levels
Name | Type | Description |
---|
margin_levels | MarginConnection | Page of margin levels data and corresponding page information. |
ListMarketsRequest
Request for listing markets
Name | Type | Description |
---|
pagination | optional Pagination | Pagination control. |
include_settled | optional bool | Whether to include settled markets. If not set, settled markets will be included. |
ListMarketsResponse
Response from listing markets
Name | Type | Description |
---|
markets | MarketConnection | Page of markets and corresponding page information. |
ListNetworkParametersRequest
Message requesting for the list of all network parameters
Name | Type | Description |
---|
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
ListNetworkParametersResponse
Response containing all of the Vega network parameters
ListNodeSignaturesRequest
Request to specify the ID of the resource to retrieve aggregated signatures for
Name | Type | Description |
---|
id | string | Resource ID to list signatures for. |
pagination | optional Pagination | Optional pagination information to limit the data that is returned. |
ListNodeSignaturesResponse
Response to specify the ID of the resource to retrieve aggregated signatures for
ListNodesRequest
Request to list nodes
Name | Type | Description |
---|
epoch_seq | optional uint64 | Return the node list for the given epoch. If not set, the node list for the current epoch will be returned. |
pagination | optional Pagination | Pagination controls. |
ListNodesResponse
Response from listing nodes
Name | Type | Description |
---|
nodes | NodesConnection | Page of node data and corresponding page information. |
ListOracleDataRequest
Request to get all seen oracle data
Name | Type | Description |
---|
oracle_spec_id | optional string | Oracle spec ID to list data for. |
pagination | optional Pagination | Pagination controls. |
ListOracleDataResponse
Response to get all seen oracle data
Name | Type | Description |
---|
oracle_data | OracleDataConnection | Page of seen oracle data and corresponding page information. |
ListOracleSpecsRequest
Request to get all active oracle specs
ListOracleSpecsResponse
Response to get all active oracle specs
Name | Type | Description |
---|
oracle_specs | OracleSpecsConnection | Page of active oracle specs and corresponding page information. |
ListOrderVersionsRequest
Request that is sent when listing possible order versions
Name | Type | Description |
---|
order_id | string | Order ID to list versions for. |
pagination | optional Pagination | Optional pagination control. |
ListOrderVersionsResponse
Response that is received when listing possible order versions
Name | Type | Description |
---|
orders | OrderConnection | Page of order versions and corresponding page information. |
ListOrdersRequest
Request that is sent when executing a query for a list of orders
Name | Type | Description |
---|
pagination | optional Pagination | Optional pagination control. |
filter | optional OrderFilter | Order filter contains all filtering conditions and values that are applied to the orders listing. |
ListOrdersResponse
Response that is received from the query to list orders
Name | Type | Description |
---|
orders | OrderConnection | Page of orders data and corresponding page information. |
ListPaidLiquidityFeesRequest
Paid liquidity fees request.
Name | Type | Description |
---|
market_id | optional string | Restrict fee data to those fees generated in the given market. |
asset_id | optional string | Restrict fee statistics to those paid in the given asset. |
epoch_seq | optional uint64 | Epoch to get paid liquidity fee statistics for. If omitted, the last complete epoch is used. |
party_ids | repeated string | Restrict fee data to those fees paid to the given parties. |
pagination | optional Pagination | Pagination controls. |
include_derived_parties | optional bool | Whether to return all derived parties from AMMs for the given party. If used, party ID is required. |
epoch_from | optional uint64 | Restrict paid liquidity fees to those from a given epoch. |
epoch_to | optional uint64 | Restrict paid liquidity fees to those up to a given epoch. |
ListPaidLiquidityFeesResponse
Paid liquidity fees response.
ListPartiesProfilesRequest
Request to list profiles by party ID.
Name | Type | Description |
---|
parties | repeated string | Restrict the returned profiles to only the given party IDs. If not set,
all parties' profiles will be returned. |
pagination | Pagination | Pagination control. |
ListPartiesProfilesResponse
Response from listing parties' profiles.
ListPartiesRequest
Request to list parties by ID
Name | Type | Description |
---|
party_id | string | Restrict the returned party to only the given party ID. If not set, all parties will be returned. |
pagination | Pagination | Pagination control. |
ListPartiesResponse
Response from listing parties
Name | Type | Description |
---|
parties | PartyConnection | Page of parties data and corresponding page information. |
ListPartyMarginModesRequest
Request to retrieve party margin modes.
Name | Type | Description |
---|
market_id | optional string | Market ID to filter for. |
party_id | optional string | Party ID to filter for. |
pagination | optional Pagination | Pagination controls. |
ListPartyMarginModesResponse
Response containing party margin modes.
Name | Type | Description |
---|
party_margin_modes | PartyMarginModesConnection | Page of party margin modes data and corresponding page information. |
ListPositionsRequest
Request used to list all positions for a party.
Optionally, if a market ID is set, the results will be filtered for that market only.
Name | Type | Description |
---|
party_id | string | Party ID to list positions for, required field. |
market_id | string | Market ID to filter for. If empty, no markets will be filtered. |
pagination | optional Pagination | Pagination controls. |
ListPositionsResponse
Response for a list of positions for a party
Name | Type | Description |
---|
positions | PositionConnection | Page of positions data and corresponding page information. |
ListProtocolUpgradeProposalsRequest
Request type for ListProtocolUpgradeProposals; fetches a paginated list of protocol upgrade proposals
ListProtocolUpgradeProposalsResponse
Response type from a ListProtocolUpgradeProposals RPC call; a paginated list of protocol upgrade proposals
ListReferralSetRefereesRequest
Request to retrieve information about a referral set's referees
Name | Type | Description |
---|
referral_set_id | optional string | Referral set ID to retrieve information for |
pagination | optional Pagination | Pagination controls. |
referrer | optional string | Referrer to filter by. If referrer set ID is provided, this field is ignored. |
referee | optional string | Referee to filter by. If referrer set ID or referrer is provided, this field is ignored. |
aggregation_epochs | optional uint32 | Epochs to aggregate party volume and rewards over. If omitted, 30 epochs will be used. |
ListReferralSetRefereesResponse
Response containing information about a referral set's referees
ListReferralSetsRequest
Request to retrieve information about a referral set or sets
Name | Type | Description |
---|
referral_set_id | optional string | Referral set ID to retrieve information for |
pagination | optional Pagination | Pagination controls. |
referrer | optional string | Referrer to filter by. If referrer set ID is provided, this field is ignored. |
referee | optional string | Referee to filter by. If referrer set ID or referrer is provided, this field is ignored. |
ListReferralSetsResponse
Response containing information about a referral set or sets
Name | Type | Description |
---|
referral_sets | ReferralSetConnection | Page of referral set data and corresponding page information. |
ListRewardSummariesRequest
Request to get reward details for a party
Name | Type | Description |
---|
party_id | optional string | Restrict the reward summary to rewards paid to the given parties. |
asset_id | optional string | Restrict the reward summary to rewards paid in the given assets. |
pagination | optional Pagination | Pagination controls. |
include_derived_parties | optional bool | Whether to return rewards for all derived parties from AMMs for the given party.
If used, party ID is required. |
ListRewardSummariesResponse
Response from listing reward details in for a single party
ListRewardsRequest
Request to get reward details for a party
Name | Type | Description |
---|
party_id | string | Restrict rewards data to those that were received by the given party. |
asset_id | optional string | Restrict rewards data to those that were paid with the given asset ID. |
pagination | optional Pagination | Pagination control. |
from_epoch | optional uint64 | Restrict rewards data to those that were paid after and including the given epoch ID. |
to_epoch | optional uint64 | Restrict rewards data to those that were paid up to and including the given epoch ID. |
team_id | optional string | Filter for rewards paid if the party is a member of the given team |
game_id | optional string | Filter for rewards paid if the party participated in the given game |
include_derived_parties | optional bool | Whether to return all derived parties from AMMs for the given party. |
market_id | optional string | Filter the rewards by market ID. |
ListRewardsResponse
Response for listing reward details for a single party
Name | Type | Description |
---|
rewards | RewardsConnection | Page of rewards data and corresponding page information. |
ListStopOrdersRequest
Request that is sent when executing a query for a list of stop orders.
ListStopOrdersResponse
Response that is received from the query to list stop orders.
Name | Type | Description |
---|
orders | StopOrderConnection | Page of stop orders data and corresponding page information. |
ListSuccessorMarketsRequest
Request for listing successor markets.
Name | Type | Description |
---|
market_id | string | Market ID that is a member of the succession line. This can be the original market
or any subsequent child market that succeeded it. |
include_full_history | bool | Flag to indicate whether or not to include the full succession line, or only list
the children of the given market ID. If true, the full succession line is included. |
pagination | Pagination | Pagination control. |
ListSuccessorMarketsResponse
Response from a list successor markets request.
Request to list all team members' statistics.
Name | Type | Description |
---|
team_id | string | Restrict team statistics to those with the given team ID. |
party_id | optional string | Restrict team members' statistics to those with the given party ID. |
aggregation_epochs | optional uint64 | Defines the number of past epochs to aggregate data from. By default, it takes
the last 10 epochs. |
pagination | optional Pagination | Pagination controls. |
Response for the list team members' statistics request containing the statistics.
ListTeamRefereeHistoryRequest
Request that is sent when listing the referee history for a given team.
Name | Type | Description |
---|
referee | string | Party ID to list referee history for. |
pagination | optional Pagination | Pagination controls. |
ListTeamRefereeHistoryResponse
Response that is sent when listing the referee history for a given team.
ListTeamRefereesRequest
Request that is sent when listing the referees for a given team.
Name | Type | Description |
---|
team_id | string | Team ID to list referees for. |
pagination | optional Pagination | Pagination controls. |
ListTeamRefereesResponse
Response that is sent when listing the referees for a given team.
Name | Type | Description |
---|
team_referees | TeamRefereeConnection | Page of team referee data and corresponding page information. |
ListTeamsRequest
Request to list all teams
Name | Type | Description |
---|
team_id | optional string | Restrict teams to those with the given team ID. |
party_id | optional string | Restrict teams to those where the given party is a referrer or a referee. |
pagination | optional Pagination | Pagination controls. |
ListTeamsResponse
Response for the list teams request containing the team information.
Name | Type | Description |
---|
teams | TeamConnection | Page of team data and corresponding page information. |
ListTeamsStatisticsRequest
Request to list all teams' statistics.
Name | Type | Description |
---|
team_id | optional string | Restrict team statistics to those with the given team ID. |
aggregation_epochs | optional uint64 | Defines the number of past epochs to aggregate data from. By default, it takes
the last 10 epochs. |
pagination | optional Pagination | Pagination controls. |
ListTeamsStatisticsResponse
Response for the list teams' statistics request containing the statistics.
ListTradesRequest
Request to list trades
Name | Type | Description |
---|
market_ids | repeated string | Restrict trades to those that occurred on the given markets. |
order_ids | repeated string | Restrict trades to those that were caused by the given orders. |
party_ids | repeated string | Restrict trades to those that were caused by orders placed by the given parties. |
pagination | optional Pagination | Pagination control. |
date_range | optional DateRange | Restrict trades to those made during the given date range. If not set, all trades will be returned. |
ListTradesResponse
Response from listing trades
Name | Type | Description |
---|
trades | TradeConnection | Page of trades data and corresponding page information. |
ListTransfersRequest
Request that is sent to list transfers
Name | Type | Description |
---|
pubkey | optional string | Restrict transfer to those where the given public key is a sender or receiver. |
direction | TransferDirection | Restrict transfers to those in the given direction from the supplied public key.
When is_reward is true, and pubkey is set, then direction MUST be TRANSFER_DIRECTION_DIRECTION_FROM. |
pagination | optional Pagination | Pagination controls. |
is_reward | optional bool | Restrict transfers to those related to reward transfers. |
from_epoch | optional uint64 | Epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`. |
to_epoch | optional uint64 | Epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch. |
status | optional vega.events.v1.Transfer.Status | Status to filter on. |
scope | optional ListTransfersRequest.Scope | Dispatch strategy's scope to filter for. |
game_id | optional string | Game ID to filter on |
from_account_type | optional vega.AccountType | Account type to filter on for transfers from account |
to_account_type | optional vega.AccountType | Account type to filter on for transfers to account |
ListTransfersResponse
Response that is received when listing transfers
Name | Type | Description |
---|
transfers | TransferConnection | Page of transfers data and corresponding page information. |
ListVotesRequest
Request that is used to list governance votes
Name | Type | Description |
---|
party_id | optional string | Party for which the votes are requested. |
proposal_id | optional string | Proposal ID to list votes for. |
pagination | optional Pagination | Optional pagination control. |
ListVotesResponse
Response that is received when listing Votes
Name | Type | Description |
---|
votes | VoteConnection | Page of votes data received and corresponding page information. |
ListWithdrawalsRequest
List all withdrawals for a given party
Name | Type | Description |
---|
party_id | string | Restrict withdrawals to those made by this party ID. |
pagination | optional Pagination | Pagination controls. |
date_range | optional DateRange | Date range of the requested data, if provided. |
ListWithdrawalsResponse
Response from listing withdrawals data
Name | Type | Description |
---|
withdrawals | WithdrawalsConnection | Page of withdrawals data and corresponding page information. |
MarginConnection
Page of margins data and corresponding page information.
Name | Type | Description |
---|
edges | repeated MarginEdge | Page of margins data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
MarginEdge
Margin data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.MarginLevels | Margin levels data that satisfy a list margin levels request. |
cursor | string | Cursor that can be used to fetch further pages. |
MarginEstimate
Margin level estimate for both worst and best case possible.
Name | Type | Description |
---|
worst_case | vega.MarginLevels | Margin level estimate assuming slippage cap is applied. |
best_case | vega.MarginLevels | Margin level estimate assuming no slippage. |
MarketConnection
Page of markets and corresponding page information.
Name | Type | Description |
---|
edges | repeated MarketEdge | Page of markets and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
MarketDataConnection
Page of market data items and corresponding page information
Name | Type | Description |
---|
edges | repeated MarketDataEdge | Page of market data items and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
MarketDataEdge
Market data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.MarketData | Data generated by a market when open. |
cursor | string | Cursor that can be used to fetch further pages. |
MarketEdge
Market information with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Market | Information about the market. |
cursor | string | Cursor that can be used to fetch further pages. |
NetworkParameterConnection
Page of network parameters and corresponding page information
Name | Type | Description |
---|
edges | repeated NetworkParameterEdge | Page of network parameters data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
NetworkParameterEdge
Network parameter with the corresponding cursor.
Name | Type | Description |
---|
node | vega.NetworkParameter | Name and associated value of a network parameter. |
cursor | string | Cursor that can be used to fetch further pages. |
NodeBasic
Represents a basic node without any epoch specific details like delegations, staking, rewards etc.
Name | Type | Description |
---|
id | string | Unique ID identifying the node. |
pub_key | string | Node operator's public key. |
tm_pub_key | string | Tendermint public key of the node. |
ethereum_address | string | Ethereum public key of the node. |
info_url | string | URL that provides more information about the node. |
location | string | Country code for the location of the node. |
status | vega.NodeStatus | Node status. |
name | string | Node name. |
avatar_url | string | Avatar URL. |
NodeEdge
Node data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Node | Data specific to a single node on the Vega network. |
cursor | string | Cursor that can be used to fetch further pages. |
NodeSignatureEdge
Nodes signature edge with the corresponding cursor.
NodeSignaturesConnection
Page of node signatures and corresponding page information.
Name | Type | Description |
---|
edges | repeated NodeSignatureEdge | Page of node signatures and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
NodesConnection
Page of node data and corresponding page information
Name | Type | Description |
---|
edges | repeated NodeEdge | Page of node data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
ObserveAccountsRequest
Request that is sent when getting a subscription to a stream of accounts.
Name | Type | Description |
---|
market_id | string | Market ID to filter accounts by. If empty, no markets will be filtered. |
party_id | string | Party ID to filter accounts by. If empty, no parties will be filtered. |
asset | string | Asset ID to filter accounts by. If empty, no assets will be filtered. |
type | vega.AccountType | Account type to subscribe to, required field. |
include_derived_parties | optional bool | Whether to return all derived parties from AMMs for the given party.
If used, party ID is required. |
ObserveAccountsResponse
Response that is received when subscribing to a stream of accounts.
Name | Type | Description |
---|
snapshot | AccountSnapshotPage | 'Initial image' snapshot containing current account balances. |
updates | AccountUpdates | List of account updates in the last block. |
ObserveCandleDataRequest
Request that is used to subscribe to a stream of candles
Name | Type | Description |
---|
candle_id | string | Unique ID for the candle. |
ObserveCandleDataResponse
Response that is received when subscribing to a stream of candles
Name | Type | Description |
---|
candle | Candle | Candle data. |
ObserveDelegationsRequest
Request to subscribe to all event related to delegations, with the given filters
Name | Type | Description |
---|
party_id | optional string | Party ID to get delegations for, if provided. |
node_id | optional string | Node ID to get delegations for, if provided. |
ObserveDelegationsResponse
Response with all events related to delegations, with the given filters
Name | Type | Description |
---|
delegation | vega.Delegation | How much a party is delegating to a node and when. |
ObserveEventBusRequest
Request to subscribe to a stream of one or more event types from the Vega event bus
Name | Type | Description |
---|
type | repeated vega.events.v1.BusEventType | One or more types of event, required field. |
market_id | string | Market ID to filter for, optional field. If empty, no markets will be excluded from the stream. |
party_id | string | Party ID to filter for, optional field. If empty, no parties will be excluded from the stream. |
batch_size | int64 | Batch size,
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. |
ObserveEventBusResponse
Response to a subscribed stream of events from the Vega event bus
ObserveGovernanceRequest
Request for governance subscription
Name | Type | Description |
---|
party_id | optional string | Restrict proposal updates to those proposed by the given party ID. |
ObserveGovernanceResponse
Response from governance subscription
Name | Type | Description |
---|
data | vega.GovernanceData | Governance data, i.e. proposal and votes for and against. |
ObserveLedgerMovementsRequest
Request to subscribe to ledger movements
ObserveLedgerMovementsResponse
Response from ledger movements subscription
Name | Type | Description |
---|
ledger_movement | vega.LedgerMovement | Ledger movements data with list of ledger entries and post-transfer balances. |
ObserveLiquidityProvisionsRequest
Request sent to subscribe to liquidity provisions
Name | Type | Description |
---|
market_id | optional string | Target market to observe for liquidity provisions. |
party_id | optional string | Target party to observe for submitted liquidity provisions. |
ObserveLiquidityProvisionsResponse
Response from liquidity provisions subscription
ObserveMarginLevelsRequest
Request to subscribe to a stream of MarginLevels data.
If a party ID is provided, the stream will contain margin levels for that party only.
Optionally, the list can be additionally filtered by market
Name | Type | Description |
---|
party_id | string | Restrict margin level updates to those relating to the given party. |
market_id | optional string | Restrict margin level updates to those relating to the given market. |
ObserveMarginLevelsResponse
Response from subscribing to margin levels data
Name | Type | Description |
---|
margin_levels | vega.MarginLevels | Margin levels data that match the subscription request filters. |
ObserveMarketsDataRequest
Request that is sent for market data subscription
Name | Type | Description |
---|
market_ids | repeated string | Restrict updates to market data by the given market IDs. |
ObserveMarketsDataResponse
Response that is received for market data subscription
ObserveMarketsDepthRequest
Request that is sent to get market depth subscription
Name | Type | Description |
---|
market_ids | repeated string | Restrict market depth data by the given market IDs. |
ObserveMarketsDepthResponse
Response that is received for MarketDepth subscription.
ObserveMarketsDepthUpdatesRequest
Request that is sent for market depth update subscription
Name | Type | Description |
---|
market_ids | repeated string | Restrict updates to market depth by the given market IDs. |
ObserveMarketsDepthUpdatesResponse
Response that is received for market depth update subscription
ObserveOrdersRequest
Request to subscribe to a stream of orders.
Request fields market ID and party ID are both optional filters:
If omitted all orders, for all parties on all markets will be returned on the stream
Both filters can be combined
Name | Type | Description |
---|
market_ids | repeated string | Restrict orders to those placed on the given markets. |
party_ids | repeated string | Restrict orders to those placed on the market by the given parties. |
exclude_liquidity | optional bool | Whether liquidity orders should be excluded from the stream. If not set, liquidity orders will be included. |
ObserveOrdersResponse
Response that is received from an orders subscription.
Name | Type | Description |
---|
snapshot | OrderSnapshotPage | An 'initial image' snapshot containing current live orders. |
updates | OrderUpdates | List of order updates in the last block. |
ObservePositionsRequest
Request that is used to subscribe to a stream of positions
Name | Type | Description |
---|
party_id | optional string | Restrict position updates to those related to the given parties. |
market_id | optional string | Restrict position updates to those related to the given markets. |
include_derived_parties | optional bool | Whether to return all derived parties from AMMs for the given party.
If used, party ID is required. |
ObservePositionsResponse
Response received from a positions subscription request
ObserveRewardsRequest
Request sent for subscribing to rewards
Name | Type | Description |
---|
asset_id | optional string | Asset ID to get rewards data for, if provided. |
party_id | optional string | Party ID to get rewards data for, if provided. |
ObserveRewardsResponse
Response that is received from subscribing to rewards data
Name | Type | Description |
---|
reward | vega.Reward | Rewards data received. |
ObserveTradesRequest
Request to subscribe to a stream of trades
Request fields market ID and party ID are both optional filters:
If omitted all trades, for all parties on all markets will be returned on the stream
If market ID is given, trades from that market will be returned on the stream
If party ID is given, trades from that party will be returned on the stream
Both filters can be combined.
Name | Type | Description |
---|
market_ids | repeated string | Restrict the trades streamed to those made on the given markets. |
party_ids | repeated string | Restrict the trades streamed to those made by the given parties. |
ObserveTradesResponse
Stream of trades
ObserveTransactionResultsRequest
Request to subscribe to a stream of users' transaction results
Request fields party ID, hash and status are all optional filters:
If omitted all transaction results, for all parties with all hashes and states will be returned on the stream
If party ID is given, transaction results from that party will be returned on the stream
If hash is given, transaction result with that hash will be returned on the stream
If status is given, transaction result with that status (true/false - success failure) will be returned on the stream
All filters can be combined.
Name | Type | Description |
---|
party_ids | repeated string | Restrict the transaction results streamed to those made by the given parties. |
hashes | repeated string | Restrict the transaction results streamed to those with given hashes. |
status | optional bool | Restrict the transaction results streamed to those with given status true/false (success/failure). |
ObserveTransactionResultsResponse
Stream of transaction results
ObserveVotesRequest
Request that is sent to subscribe to votes
Name | Type | Description |
---|
party_id | optional string | Restrict vote updates to those made by the given party. |
proposal_id | optional string | Restrict vote updates to those made on the given proposal. |
ObserveVotesResponse
Response that is received from votes subscription
Name | Type | Description |
---|
vote | vega.Vote | Data associated with governance votes that are published to the stream. |
OracleDataConnection
Page of oracle data and corresponding page information.
Name | Type | Description |
---|
edges | repeated OracleDataEdge | Page of oracle data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
OracleDataEdge
Oracle data item with the corresponding cursor.
Name | Type | Description |
---|
node | vega.OracleData | Data that was received from an external oracle. |
cursor | string | Cursor that can be used to fetch further pages. |
OracleSpecEdge
Oracle specs data item with the corresponding cursor.
Name | Type | Description |
---|
node | vega.OracleSpec | External spec data that satisfies the list request. |
cursor | string | Cursor that can be used to fetch further pages. |
OracleSpecsConnection
Page of oracle specs and corresponding page information
Name | Type | Description |
---|
edges | repeated OracleSpecEdge | Page of oracle specs data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
OrderConnection
Page of orders data and corresponding page information.
Name | Type | Description |
---|
edges | repeated OrderEdge | Page of orders and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
OrderEdge
Order data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Order | Data associated with an order submitted to a Vega node. |
cursor | string | Cursor that can be used to fetch further pages. |
OrderFilter
Order filter that contains all filtering conditions and values that are applied to the orders listing
Name | Type | Description |
---|
statuses | repeated vega.Order.Status | Restrict orders to those with the given statuses. |
types | repeated vega.Order.Type | Restrict orders to those with the given types. |
time_in_forces | repeated vega.Order.TimeInForce | Restrict orders to those with the given Time In Force. |
exclude_liquidity | bool | Indicator if liquidity provisions should be included or not in the list. |
party_ids | repeated string | Restrict orders to those placed by the given party IDs. |
market_ids | repeated string | Restrict orders to those placed on the given market IDs. |
reference | optional string | Restrict orders to those with the given reference. |
date_range | optional DateRange | Restrict orders to those placed during the given date range. If not set, all orders will be returned. |
live_only | optional bool | Restrict orders to those that are live. If not set, it is treated as being false. |
OrderInfo
Basic description of an order.
Name | Type | Description |
---|
side | vega.Side | Side for the order, e.g. buy or sell. |
price | string | Price for the order. The price is an unsigned integer. For example `123456` is a correctly
formatted price of `1.23456` assuming market configured to 5 decimal places. |
remaining | uint64 | Size remaining. |
is_market_order | bool | Boolean that indicates if it is a market order. |
OrderSnapshotPage
'Initial image' of live orders, may be sent over multiple response messages.
Name | Type | Description |
---|
orders | repeated vega.Order | List of order data parts. |
last_page | bool | Indicator if the last page is reached or not. |
OrderUpdates
List of order updates in the last block.
PageInfo
Page information for cursor based pagination
Name | Type | Description |
---|
has_next_page | bool | Indicator if there is a next page. |
has_previous_page | bool | Indicator if there is a previous page. |
start_cursor | string | Start cursor. |
end_cursor | string | End cursor. |
All data returned from the API is ordered in a well-defined manner.
The specific columns and the order in which the sorting is performed
depend on the API endpoint being called. However, the primary sorting
column is usually the timestamp of the block in which the data was last updated.
To prevent excessively large response messages and to avoid overloading
database resources, the API employs a cursor-based pagination mechanism.
This Pagination message can be optionally provided as part of the request to specify:
- The starting point within the total result set for beginning the page
- The size of the returned page
- The ordering of the data within that page
If no Pagination message is provided, the API will return the first page of
data using the default page size. The default page size is 1000.
To retrieve subsequent pages, the caller must examine the PageInfo structure
returned in the response to find a cursor string that uniquely identifies the
last row of that page. This cursor should then be passed in the 'after' field
of the Pagination message in a subsequent request.
For paging backward, take the cursor for the first row of the page from PageInfo
and pass it in the 'before' field of the Pagination message.
Pagination message that uses both first/after and last/before is considered invalid.
Name | Type | Description |
---|
first | optional int32 | Number of records to be returned that sort greater than row identified by cursor supplied in 'after'. |
after | optional string | If paging forwards, the cursor string for the last row of the previous page. |
last | optional int32 | Number of records to be returned that sort less than row identified by cursor supplied in 'before'. |
before | optional string | If paging forwards, the cursor string for the first row of the previous page. |
newest_first | optional bool | Whether to order the results with the newest records first. If not set, the default value is true. |
PaidLiquidityFeesConnection
Paid liquidity fees data and corresponding page information.
PaidLiquidityFeesEdge
Paid liquidity fees data with the corresponding cursor.
PartiesProfilesConnection
Page of profile data per party and corresponding page information.
Name | Type | Description |
---|
edges | repeated PartyProfileEdge | Page of profiles and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
PartyConnection
Page of parties data and corresponding page information.
Name | Type | Description |
---|
edges | repeated PartyEdge | Page of parties and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
PartyEdge
Party data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Party | Data associated with a party. |
cursor | string | Cursor that can be used to fetch further pages. |
PartyMarginMode
Margin mode selected for the given party and market.
Name | Type | Description |
---|
market_id | string | Unique ID of the market. |
party_id | string | Unique ID of the party. |
margin_mode | vega.MarginMode | Selected margin mode. |
margin_factor | optional string | Margin factor for the market. Isolated mode only. |
min_theoretical_margin_factor | optional string | Minimum theoretical margin factor for the market. Isolated mode only. |
max_theoretical_leverage | optional string | Maximum theoretical leverage for the market. Isolated mode only. |
at_epoch | uint64 | Epoch at which the update happened. |
PartyMarginModeEdge
Party margin mode information and corresponding cursor.
Name | Type | Description |
---|
node | PartyMarginMode | Party margin mode data. |
cursor | string | Cursor that can be used to fetch further pages. |
PartyMarginModesConnection
Page of party margin modes data and corresponding page information.
Name | Type | Description |
---|
edges | repeated PartyMarginModeEdge | Page of party margin modes data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
PartyProfileEdge
Party's profile data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.PartyProfile | Data associated with a party's profile. |
cursor | string | Cursor that can be used to fetch further pages. |
PingRequest
Request to ping the data node
PingResponse
Ping response from the data node
PositionConnection
Page of positions and corresponding page information
Name | Type | Description |
---|
edges | repeated PositionEdge | Page of positions data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
PositionEdge
Position data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Position | Position data for a party on a market. |
cursor | string | Cursor that can be used to fetch further pages. |
PositionSnapshotPage
'Initial image' of current positions, may be sent over multiple response messages
Name | Type | Description |
---|
positions | repeated vega.Position | List of positions data. |
last_page | bool | Indicator if last page is reached or not. |
PositionUpdates
List of position updates in the last block
PositionsFilter
Filter to apply to the ListAllPositionsRequest
Name | Type | Description |
---|
party_ids | repeated string | Restrict positions to those related to the given parties. |
market_ids | repeated string | Restrict positions to those on the given markets. |
ProtocolUpgradeProposalConnection
Page of protocol upgrade proposals and corresponding page information
ProtocolUpgradeProposalEdge
Protocol upgrade proposal data with the corresponding cursor.
QuantumRewardsPerEpoch
Name | Type | Description |
---|
epoch | uint64 | Epoch for which this information is valid. |
total_quantum_rewards | string | Total rewards accumulated over the epoch period, expressed in quantum value. |
QuantumVolumesPerEpoch
Name | Type | Description |
---|
epoch | uint64 | Epoch for which this information is valid. |
total_quantum_volumes | string | Total volumes accumulated over the epoch period, expressed in quantum value. |
ReferralProgram
Referral program details.
Name | Type | Description |
---|
version | uint64 | Incremental version of the program. It is incremented after each program
update. |
id | string | Unique ID generated from the proposal that created this program. |
benefit_tiers | repeated vega.BenefitTier | Defined tiers in increasing order. First element will give Tier 1, second
element will give Tier 2, and so on. |
end_of_program_timestamp | int64 | Timestamp in Unix nanoseconds, after which when the current epoch ends, the
program will end and benefits will be disabled. |
window_length | uint64 | Number of epochs over which the referral set's running volume is evaluated. |
staking_tiers | repeated vega.StakingTier | Defined benefit tiers ordered by increasing reward multiplier. Determines the level of
benefit a party can expect based on their staking. |
ended_at | optional int64 | Timestamp, in Unix nanoseconds, when the program ended. |
ReferralSet
Data relating to a referral set.
Name | Type | Description |
---|
id | string | Unique ID of the created set. |
referrer | string | Party that created the set. |
created_at | int64 | Timestamp, in Unix nanoseconds, when the set was created. |
updated_at | int64 | Timestamp, in Unix nanoseconds, when the set was updated. |
total_members | uint64 | Current number of members in the referral set. |
ReferralSetConnection
Page of referral set data and corresponding page information.
Name | Type | Description |
---|
edges | repeated ReferralSetEdge | Page of referral set data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
ReferralSetEdge
Referral set data with the corresponding cursor.
Name | Type | Description |
---|
node | ReferralSet | Referral set data. |
cursor | string | Cursor that can be used to fetch further pages. |
ReferralSetReferee
Data relating to referees that have joined a referral set
Name | Type | Description |
---|
referral_set_id | string | Unique ID of the referral set the referee joined. |
referee | string | Party that joined the set. |
joined_at | int64 | Timestamp, in Unix nanoseconds, when the party joined the set. |
at_epoch | uint64 | Epoch at which the party joined the set. |
total_referee_notional_taker_volume | string | Total notional volume of the referee's aggressive trades over the aggregation period. |
total_referee_generated_rewards | string | Total rewards generated by the referee over the aggregation period. |
ReferralSetRefereeConnection
Page of data about the referral set's referees and corresponding page information.
Name | Type | Description |
---|
edges | repeated ReferralSetRefereeEdge | Page of referral set referee data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
ReferralSetRefereeEdge
Data about the Referral set's referees with the corresponding cursor.
Name | Type | Description |
---|
node | ReferralSetReferee | Referral set referee data. |
cursor | string | Cursor that can be used to fetch further pages. |
ReferralSetStats
Referral set statistics for a given epoch for a party.
Name | Type | Description |
---|
at_epoch | uint64 | Epoch at which the set's statistics were updated. |
referral_set_running_notional_taker_volume | string | Running volume for the set based on the window length of the current
referral program. |
party_id | string | Party ID. |
discount_factor | string | Discount factor applied to the party. |
reward_factor | string | Reward factor applied to the party. |
epoch_notional_taker_volume | string | Current referee notional taker volume. |
rewards_multiplier | string | Multiplier applied to the referral reward factor when calculating referral rewards due to the referrer. |
rewards_factor_multiplier | string | Proportion of the referee's taker fees to be rewarded to the referrer. |
was_eligible | bool | Indicates if the referral set was eligible to be part of the referral program. |
referrer_taker_volume | string | Referrer's taker volume |
ReferralSetStatsConnection
Page of volume discount stats data and corresponding page information.
Name | Type | Description |
---|
edges | repeated ReferralSetStatsEdge | Page of volume discount statistics data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
ReferralSetStatsEdge
Referral set stats data with the corresponding cursor.
Name | Type | Description |
---|
node | ReferralSetStats | Referral set stats data. |
cursor | string | Cursor that can be used to fetch further pages. |
RewardEdge
Rewards data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Reward | Details for a single reward payment. |
cursor | string | Cursor that can be used to fetch further pages. |
RewardSummaryFilter
Filter to restrict the results returned by the ListEpochRewardSummaries
Name | Type | Description |
---|
asset_ids | repeated string | Restrict reward summaries to those connected to the assets in the given list. |
market_ids | repeated string | Restrict reward summaries to those connected to the markets in the given list. |
from_epoch | optional uint64 | Restrict rewards summaries to those that were paid after and including the given epoch ID. |
to_epoch | optional uint64 | Restrict rewards summaries to those that were paid up to and including the given epoch ID. |
RewardsConnection
Page of rewards data and corresponding page information.
Name | Type | Description |
---|
edges | repeated RewardEdge | Page of rewards data items and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
StakeLinkingEdge
Stake linking data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.events.v1.StakeLinking | Stake linking representing the intent from a party to deposit. |
cursor | string | Cursor that can be used to fetch further pages. |
StakesConnection
Page of stake data and corresponding page information.
Name | Type | Description |
---|
edges | repeated StakeLinkingEdge | Page of stake data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
StopOrderConnection
Page of stop orders data and corresponding page information.
Name | Type | Description |
---|
edges | repeated StopOrderEdge | Page of stop orders and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
StopOrderEdge
Order data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.events.v1.StopOrderEvent | Data associated with an order submitted to a Vega node. |
cursor | string | Cursor that can be used to fetch further pages. |
StopOrderFilter
Stop order filter
Stop order filter that contains all filtering conditions and values that are applied to the stop orders listing.
Name | Type | Description |
---|
statuses | repeated vega.StopOrder.Status | Restrict orders to those with the given statuses. |
expiry_strategies | repeated vega.StopOrder.ExpiryStrategy | Restrict orders to those with the given expiry strategies. |
date_range | optional DateRange | Restrict orders to those placed during the given date range. If not set, all orders will be returned. |
party_ids | repeated string | Restrict orders to those placed by the given party IDs. |
market_ids | repeated string | Restrict orders to those placed on the given market IDs. |
live_only | optional bool | Live stop orders only |
SuccessorMarket
Successor market information includes the market that is a member of the succession line
and any governance data that is associated with proposals for child markets
whether enacted or not.
SuccessorMarketConnection
Page of successor market records and corresponding page information.
SuccessorMarketEdge
Successor market record with the corresponding cursor for paginated results
Name | Type | Description |
---|
node | SuccessorMarket | Successor market record. |
cursor | string | Cursor identifying the record for pagination control. |
Team
Team record containing the team information.
Name | Type | Description |
---|
team_id | string | ID of the created team. |
referrer | string | Party ID that created the team. |
name | string | Name of the team. |
team_url | optional string | Link to the team's homepage. |
avatar_url | optional string | Link to an image of the team's avatar. |
created_at | int64 | Timestamp in Unix nanoseconds when the team was created. |
closed | bool | Whether or not the team is closed to new party members. When closed, only parties specified in the allow list can
join the team. |
created_at_epoch | uint64 | Epoch at which the team was created. |
allow_list | repeated string | List of public keys that are allowed to join the team.
Only applicable to closed teams. |
total_members | uint64 | Current number of members in the team. |
TeamConnection
Page of team data and corresponding page information.
Name | Type | Description |
---|
edges | repeated TeamEdge | Page of team data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
TeamEdge
Team data item with the corresponding cursor.
Name | Type | Description |
---|
node | Team | Team data. |
cursor | string | Cursor that can be used to fetch further pages. |
TeamGameEntities
List of teams that are participating in a game
Name | Type | Description |
---|
team | repeated TeamGameEntity | List of teams, the participant members of a team, and the metrics associated with each participant. |
TeamGameEntity
Data relating to a team participating in a game.
Name | Type | Description |
---|
team | TeamGameParticipation | Team participation breakdown |
rank | uint64 | Rank of the team in the game |
volume | string | Volume traded by the team |
reward_metric | vega.DispatchMetric | Reward metric applied to the team |
reward_earned | string | Reward earned by the team |
total_rewards_earned | string | Total rewards earned by the individual for the team |
reward_earned_quantum | string | Rewards earned by the team in quantum value |
total_rewards_earned_quantum | string | Total rewards earned by the team in quantum value |
TeamGameParticipation
Breakdown of a team's participation in a game.
Name | Type | Description |
---|
team_id | string | ID of the team participating |
members_participating | repeated IndividualGameEntity | Individual team member metrics for their participation in the game |
TeamMemberStatistics
Team member's statistics record containing the team member's information.
Name | Type | Description |
---|
party_id | string | Party ID the statistics are related to. |
total_quantum_volume | string | Total of volume accumulated over the requested epoch period, expressed in
quantum value. |
total_quantum_rewards | string | Total of rewards accumulated over the requested epoch period, expressed in
quantum value. |
quantum_rewards | repeated QuantumRewardsPerEpoch | List of rewards over the requested epoch period, expressed in quantum
value for each epoch. |
total_games_played | uint64 | Total number of games played. |
games_played | repeated string | List of games played over the requested epoch period. |
quantum_volumes | repeated QuantumVolumesPerEpoch | List of volumes over the requested epoch period, expressed in quantum
value for each epoch. |
TeamMemberStatisticsEdge
Team member data item with the corresponding cursor.
Name | Type | Description |
---|
node | TeamMemberStatistics | Team member's statistics data. |
cursor | string | Cursor that can be used to fetch further pages. |
Page of team members' statistics and corresponding page information.
TeamReferee
A team's referee info
Name | Type | Description |
---|
team_id | string | ID of the team the referee joined. |
referee | string | Party that joined the team. |
joined_at | int64 | Timestamp in Unix nanoseconds when the party joined the team. |
joined_at_epoch | uint64 | Epoch at which the party joined the team. |
TeamRefereeConnection
Page of team referee data and corresponding page information.
Name | Type | Description |
---|
edges | repeated TeamRefereeEdge | Page of team referee data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
TeamRefereeEdge
Team referee data item with the corresponding cursor.
Name | Type | Description |
---|
node | TeamReferee | Team referee data. |
cursor | string | Cursor that can be used to fetch further pages. |
TeamRefereeHistory
A referee's team change information
Name | Type | Description |
---|
team_id | string | ID of the team the referee joined. |
joined_at | int64 | Timestamp in Unix nanoseconds when the party joined the team. |
joined_at_epoch | uint64 | Epoch at which the party joined the team. |
TeamRefereeHistoryConnection
Page of history data about a referee's team membership and corresponding page information.
Name | Type | Description |
---|
edges | repeated TeamRefereeHistoryEdge | Page of team referee history data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
TeamRefereeHistoryEdge
Team referee history data item with the corresponding cursor.
Name | Type | Description |
---|
node | TeamRefereeHistory | Team referee data. |
cursor | string | Cursor that can be used to fetch further pages. |
TeamStatistics
Team's statistics record containing the team information.
Name | Type | Description |
---|
team_id | string | Team ID the statistics are related to. |
total_quantum_volume | string | Total of volume accumulated over the requested epoch period, expressed in
quantum value. |
total_quantum_rewards | string | Total of rewards accumulated over the requested epoch period, expressed in
quantum value. |
quantum_rewards | repeated QuantumRewardsPerEpoch | List of rewards over the requested epoch period, expressed in quantum
value for each epoch. |
total_games_played | uint64 | Total of games played. |
games_played | repeated string | List of games played over the requested epoch period. |
quantum_volumes | repeated QuantumVolumesPerEpoch | List of volumes over the requested epoch period, expressed in quantum
value for each epoch. |
TeamStatisticsEdge
Team data item with the corresponding cursor.
Name | Type | Description |
---|
node | TeamStatistics | Team's statistics data. |
cursor | string | Cursor that can be used to fetch further pages. |
TeamsStatisticsConnection
Page of teams' statistics and corresponding page information.
Name | Type | Description |
---|
edges | repeated TeamStatisticsEdge | Page of team data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
TimeWeightedNotionalPosition
Time weighted notional position for a party and asset at a given epoch. It is used as a metric to calculate whether
the party is eligible for receiving a reward.
Name | Type | Description |
---|
asset_id | string | Asset ID for the settlement asset associated with the position. |
party_id | string | Party ID for the party associated with the position. |
game_id | string | Game ID for the game associated with the position. |
at_epoch | uint64 | Epoch at which the time weighted notional position is calculated. |
time_weighted_notional_position | string | Time weighted notional position for the party and asset. |
last_updated | int64 | Vega time of the block in which the last position update occurred. |
TradeConnection
Page of trades and corresponding page information
Name | Type | Description |
---|
edges | repeated TradeEdge | Page of trades and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
TradeEdge
Trade data item with the corresponding cursor..
Name | Type | Description |
---|
node | vega.Trade | Data associated with a trade that has been executed. |
cursor | string | Cursor that can be used to fetch further pages. |
TransferConnection
Page of transfers data items and corresponding page information
Name | Type | Description |
---|
edges | repeated TransferEdge | Page of transfers data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
TransferEdge
Transfers data with the corresponding cursor.
Name | Type | Description |
---|
node | TransferNode | Data relating to a transfer that has been made. |
cursor | string | Cursor that can be used to fetch further pages. |
TransferNode
VolumeDiscountProgram
Volume discount program details.
Name | Type | Description |
---|
version | uint64 | Incremental version of the program. It is incremented after each program
update. |
id | string | Unique ID generated from the proposal that created this program. |
benefit_tiers | repeated vega.VolumeBenefitTier | Defined benefit tiers ordered by increasing discounts. Determines the level of
benefit a party can expect based on performance criteria. |
end_of_program_timestamp | int64 | Timestamp in Unix nanoseconds, after which when the current epoch
ends, the program will end and benefits will be disabled. |
window_length | uint64 | Number of epochs over which a volume discount statistics' running volume is evaluated. |
ended_at | optional int64 | Timestamp in Unix nanoseconds, at which the program ended. |
VolumeDiscountStats
Volume discount statistics for a given epoch for all parties.
Name | Type | Description |
---|
at_epoch | uint64 | Epoch at which the statistics apply. |
party_id | string | Party ID for which the statistics apply. |
discount_factor | string | Discount factor applied given the party's running volume. |
running_volume | string | The party's running volume. |
VolumeDiscountStatsConnection
Page of volume discount stats data and corresponding page information.
Name | Type | Description |
---|
edges | repeated VolumeDiscountStatsEdge | Page of volume discount statistics data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
VolumeDiscountStatsEdge
Volume discount stats data with the corresponding cursor.
Name | Type | Description |
---|
node | VolumeDiscountStats | Volume discount stats data. |
cursor | string | Cursor that can be used to fetch further pages. |
VoteConnection
Page of vote data items and corresponding page information
Name | Type | Description |
---|
edges | repeated VoteEdge | Page of vote data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
VoteEdge
Votes data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Vote | Data associated with a governance vote. |
cursor | string | Cursor that can be used to fetch further pages. |
WithdrawalEdge
Withdrawals data with the corresponding cursor.
Name | Type | Description |
---|
node | vega.Withdrawal | Data associated with a single withdrawal made from the Vega network. |
cursor | string | Cursor that can be used to fetch further pages. |
WithdrawalsConnection
Page of withdrawals data and corresponding page information
Name | Type | Description |
---|
edges | repeated WithdrawalEdge | Page of withdrawals data and their corresponding cursors. |
page_info | PageInfo | Page information that is used for fetching further pages. |
Enums
AccountField
List of the properties of an account, used for grouping
Name | Number | Description |
---|
ACCOUNT_FIELD_UNSPECIFIED | 0 | |
ACCOUNT_FIELD_ID | 1 | |
ACCOUNT_FIELD_PARTY_ID | 2 | |
ACCOUNT_FIELD_ASSET_ID | 3 | |
ACCOUNT_FIELD_MARKET_ID | 4 | |
ACCOUNT_FIELD_TYPE | 5 | |
LedgerEntryField
List of fields for a ledger entry
Name | Number | Description |
---|
LEDGER_ENTRY_FIELD_UNSPECIFIED | 0 | |
LEDGER_ENTRY_FIELD_ACCOUNT_FROM_ID | 1 | |
LEDGER_ENTRY_FIELD_ACCOUNT_TO_ID | 2 | |
LEDGER_ENTRY_FIELD_TRANSFER_TYPE | 3 | |
ListGovernanceDataRequest.Type
Filter for the types of governance proposals to view
Name | Number | Description |
---|
TYPE_UNSPECIFIED | 0 | |
TYPE_ALL | 1 | List all proposals |
TYPE_NEW_MARKET | 2 | List new market proposals |
TYPE_UPDATE_MARKET | 3 | List update market proposals |
TYPE_NETWORK_PARAMETERS | 4 | List change Vega network parameter proposals |
TYPE_NEW_ASSET | 5 | New asset proposals |
TYPE_NEW_FREE_FORM | 6 | Proposals for creating a new free form proposal |
TYPE_UPDATE_ASSET | 7 | Update asset proposals |
TYPE_NEW_SPOT_MARKET | 8 | Propose a new spot market |
TYPE_UPDATE_SPOT_MARKET | 9 | Update an existing spot market |
TYPE_NEW_TRANSFER | 10 | Propose a new transfer |
TYPE_CANCEL_TRANSFER | 11 | Proposal to cancel a transfer |
TYPE_UPDATE_MARKET_STATE | 12 | Proposal for updating the state of a market |
TYPE_UPDATE_REFERRAL_PROGRAM | 13 | Proposal to update the referral program |
TYPE_UPDATE_VOLUME_DISCOUNT_PROGRAM | 14 | Proposal to update the volume discount program |
ListTransfersRequest.Scope
Defines the types of a dispatch strategy's scope the API can filter on.
Name | Number | Description |
---|
SCOPE_UNSPECIFIED | 0 | |
SCOPE_INDIVIDUAL | 1 | Matches transfers that have dispatch strategy scope of individual set. |
SCOPE_TEAM | 2 | Matches transfers that have dispatch strategy scope of team set. |
Table
Name | Number | Description |
---|
TABLE_UNSPECIFIED | 0 | |
TABLE_BALANCES | 1 | |
TABLE_CHECKPOINTS | 2 | |
TABLE_DELEGATIONS | 3 | |
TABLE_LEDGER | 4 | |
TABLE_ORDERS | 5 | |
TABLE_TRADES | 6 | |
TABLE_MARKET_DATA | 7 | |
TABLE_MARGIN_LEVELS | 8 | |
TABLE_POSITIONS | 9 | |
TABLE_LIQUIDITY_PROVISIONS | 10 | |
TABLE_MARKETS | 11 | |
TABLE_DEPOSITS | 12 | |
TABLE_WITHDRAWALS | 13 | |
TABLE_BLOCKS | 14 | |
TABLE_REWARDS | 15 | |
TransferDirection
Direction of a transfer
Name | Number | Description |
---|
TRANSFER_DIRECTION_UNSPECIFIED | 0 | |
TRANSFER_DIRECTION_TRANSFER_FROM | 1 | |
TRANSFER_DIRECTION_TRANSFER_TO | 2 | |
TRANSFER_DIRECTION_TRANSFER_TO_OR_FROM | 3 | |
Services
TradingDataService
ListAccounts
Method | ListAccounts |
---|
Request | ListAccountsRequest |
---|
Response | ListAccountsResponse |
---|
Description | List accounts
Get a list of accounts matching the supplied filter, including their current balances.
If a given account has never had a balance, it will be absent from the list. |
---|
ObserveAccounts
Info
Method | Info |
---|
Request | InfoRequest |
---|
Response | InfoResponse |
---|
Description | Data node information
Get information about the data node.
Response contains a semver formatted version of the data node and the commit hash, from which the data node was built |
---|
GetOrder
Method | GetOrder |
---|
Request | GetOrderRequest |
---|
Response | GetOrderResponse |
---|
Description | Get order
Get an order by its ID. An order's ID will be the SHA3-256 hash of the signature that the order was submitted with |
---|
ListOrders
ListOrderVersions
ObserveOrders
GetStopOrder
Method | GetStopOrder |
---|
Request | GetStopOrderRequest |
---|
Response | GetStopOrderResponse |
---|
Description | Get stop order
Get a stop order by its ID. A stop order's ID will be the SHA3-256 hash of the signature that the order was submitted with.
A stop order's ID is likely to be different from the ID of the order that will be submitted when the stop is triggered. |
---|
ListStopOrders
ListGameTeamScores
ListGamePartyScores
ListPositions
Method | ListPositions |
---|
Request | ListPositionsRequest |
---|
Response | ListPositionsResponse |
---|
Description | Deprecated: List positions
Get a list of positions by party's public key using cursor based pagination
Deprecated: use ListAllPositions instead |
---|
ListAllPositions
ObservePositions
Method | ObservePositions |
---|
Request | ObservePositionsRequest |
---|
Response | ObservePositionsResponse stream |
---|
Description | Observe positions
Subscribe to a stream of position updates. The first messages sent through the stream will contain
information about current positions, followed by updates to those positions. |
---|
ListLedgerEntries
Method | ListLedgerEntries |
---|
Request | ListLedgerEntriesRequest |
---|
Response | ListLedgerEntriesResponse |
---|
Description | List ledger entries
Get a list of ledger entries within the given date range. The date range is restricted to a maximum of 5 days.
This query requests and sums the number of ledger entries from a given subset of accounts, specified via the 'filter' argument.
It returns a time series - implemented as a list of AggregateLedgerEntry structs - with a row for every time
the summed ledger entries of the set of specified accounts changes.
Each account filter must contain no more than one party ID.
At least one party ID must be specified in the from or to account filter.
Entries can be filtered by:
- the sending account (market ID, asset ID, account type)
- receiving account (market ID, asset ID, account type)
- sending AND receiving account
- transfer type either in addition to the above filters or as a standalone option
Note: The date range is restricted to any 5 days.
If no start or end date is provided, only ledger entries from the last 5 days will be returned.
If a start and end date are provided, but the end date is more than 5 days after the start date, only data up to 5 days after the start date will be returned.
If a start date is provided but no end date, the end date will be set to 5 days after the start date.
If no start date is provided, but the end date is, the start date will be set to 5 days before the end date. |
---|
ExportLedgerEntries
Method | ExportLedgerEntries |
---|
Request | ExportLedgerEntriesRequest |
---|
Response | HttpBody stream |
---|
Description | Export ledger entries
Export ledger entries records ledger entries to a csv file.
May or may not contain a date range - if no date range is provided, list all records for all times.
Ledger entries can be exported by:
- export ledger entries for a single party for a given asset within a given time range
- export ledger entries for a single party for a given asset for all times
buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE |
---|
ListBalanceChanges
GetLatestMarketData
ListLatestMarketData
GetLatestMarketDepth
ObserveMarketsDepth
ObserveMarketsDepthUpdates
ObserveMarketsData
GetMarketDataHistoryByID
ListTransfers
Method | ListTransfers |
---|
Request | ListTransfersRequest |
---|
Response | ListTransfersResponse |
---|
Description | List transfers
Get a list of transfers between public keys. A valid value for public key can be one of:
- a party ID
- "network"
- "0000000000000000000000000000000000000000000000000000000000000000", the public key for the global rewards account |
---|
GetTransfer
GetNetworkLimits
ListCandleData
Method | ListCandleData |
---|
Request | ListCandleDataRequest |
---|
Response | ListCandleDataResponse |
---|
Description | List candle data
Get a list of candle data for a given candle ID.
A candle ID encapsulates a market ID and candle interval. A list of available candle IDs, and therefore candle intervals can be found using the list-candle-intervals API. |
---|
ObserveCandleData
Method | ObserveCandleData |
---|
Request | ObserveCandleDataRequest |
---|
Response | ObserveCandleDataResponse stream |
---|
Description | Observe candle data
Subscribe to a stream of candle updates given a candle ID.
A candle ID encapsulates a market ID and candle interval. A list of available candle IDs, and therefore candle intervals can be found using the list-candle-intervals API. |
---|
ListCandleIntervals
ListVotes
ObserveVotes
Method | ObserveVotes |
---|
Request | ObserveVotesRequest |
---|
Response | ObserveVotesResponse stream |
---|
Description | Observe votes
Subscribe to a stream of votes cast on a given proposal, or by all votes made by a given party |
---|
ListERC20MultiSigSignerAddedBundles
ListERC20MultiSigSignerRemovedBundles
GetERC20ListAssetBundle
GetERC20SetAssetLimitsBundle
GetERC20WithdrawalApproval
GetLastTrade
ListTrades
ObserveTrades
GetOracleSpec
Method | GetOracleSpec |
---|
Request | GetOracleSpecRequest |
---|
Response | GetOracleSpecResponse |
---|
Description | Get oracle spec
Get an oracle spec by ID. Oracle spec IDs can be found by querying markets that use them as a data source |
---|
ListOracleSpecs
ListOracleData
GetMarket
Method | GetMarket |
---|
Request | GetMarketRequest |
---|
Response | GetMarketResponse |
---|
Description | Get market
Get information about a specific market using its ID. A market's ID will be the same as the ID of the proposal that
generated it |
---|
ListMarkets
ListSuccessorMarkets
Method | ListSuccessorMarkets |
---|
Request | ListSuccessorMarketsRequest |
---|
Response | ListSuccessorMarketsResponse |
---|
Description | List successor markets
Given a market ID, return the full lineage of markets since inception, or all successor markets since and including
the given market ID. The markets will be returned in succession order, i.e. the market at position i will be the parent
of the market at position i+1. |
---|
GetParty
ListParties
ListPartiesProfiles
ListMarginLevels
Method | ListMarginLevels |
---|
Request | ListMarginLevelsRequest |
---|
Response | ListMarginLevelsResponse |
---|
Description | List margin levels
Get a list of margin levels that match the provided criteria. If no filter is provided, all margin levels will be returned. |
---|
ObserveMarginLevels
ListRewards
Method | ListRewards |
---|
Request | ListRewardsRequest |
---|
Response | ListRewardsResponse |
---|
Description | List rewards
Get a list of rewards that match the provided criteria. If no filter is provided, all rewards will be returned. |
---|
ListRewardSummaries
Method | ListRewardSummaries |
---|
Request | ListRewardSummariesRequest |
---|
Response | ListRewardSummariesResponse |
---|
Description | List reward summaries
Get a list of reward summaries where the reward amount is the total rewards received over all epochs
per party ID and asset ID.
Request parameters are optional party ID and asset ID.
If no data is provided, all reward summaries will be returned grouped by party and asset ID. |
---|
ListEpochRewardSummaries
Method | ListEpochRewardSummaries |
---|
Request | ListEpochRewardSummariesRequest |
---|
Response | ListEpochRewardSummariesResponse |
---|
Description | List epoch reward summaries
Get a list of reward summaries by epoch for a given range of epochs.
The result is filtered by a list of asset IDs, market IDs and starting and ending epochs, for which to return rewards.
If no data is provided, all reward summaries will be returned, grouped by epochs, market IDs, asset IDs and reward type. |
---|
GetDeposit
ListDeposits
Method | ListDeposits |
---|
Request | ListDepositsRequest |
---|
Response | ListDepositsResponse |
---|
Description | List deposits
Get a list of deposits for a given party.
If a date range is provided, filtering will be based on the last time the deposit
has been updated in Vega time. |
---|
GetWithdrawal
Method | GetWithdrawal |
---|
Request | GetWithdrawalRequest |
---|
Response | GetWithdrawalResponse |
---|
Description | Get withdrawal
Get a withdrawal by its ID. A withdrawal's ID will be the SHA3-256 hash of the signature that the withdrawal was submitted with |
---|
ListWithdrawals
GetAsset
Method | GetAsset |
---|
Request | GetAssetRequest |
---|
Response | GetAssetResponse |
---|
Description | Get asset
Get a single asset using its ID. Use the assets list query to get an asset's ID |
---|
ListAssets
ListLiquidityProvisions
Method | ListLiquidityProvisions |
---|
Request | ListLiquidityProvisionsRequest |
---|
Response | ListLiquidityProvisionsResponse |
---|
Description | List liquidity provisions
DEPRECATED: When a liquidity provider amends a provision, and it's accepted by the network, the pending
provision is returned by the API instead of the provision that is currently active.
Use ListAllLiquidityProvisions instead. |
---|
ListAllLiquidityProvisions
Method | ListAllLiquidityProvisions |
---|
Request | ListAllLiquidityProvisionsRequest |
---|
Response | ListAllLiquidityProvisionsResponse |
---|
Description | List liquidity provisions
Get a list of liquidity provisions for a given market. This API returns a current and pending liquidity provision
in the event that a provision has been updated by the provider but the updated provision will not be active until the next epoch. |
---|
ObserveLiquidityProvisions
ListLiquidityProviders
ListPaidLiquidityFees
GetGovernanceData
ListGovernanceData
ObserveGovernance
ListDelegations
GetNetworkData
GetNode
ListNodes
ListNodeSignatures
GetEpoch
Method | GetEpoch |
---|
Request | GetEpochRequest |
---|
Response | GetEpochResponse |
---|
Description | Get epoch
Get data for a specific epoch, if ID is omitted, it retrieves the current epoch |
---|
EstimateFee
Method | EstimateFee |
---|
Request | EstimateFeeRequest |
---|
Response | EstimateFeeResponse |
---|
Description | Estimate fee
Estimate the fee that would be incurred for submitting an order
with the specified price and size on the market. |
---|
EstimateMargin
EstimatePosition
Method | EstimatePosition |
---|
Request | EstimatePositionRequest |
---|
Response | EstimatePositionResponse |
---|
Description | Estimate position
Estimate the margin that would be required for maintaining the specified position, collateral increase needed to open the specified position and the liquidation price estimate.
Margin estimates are scaled to asset decimal places.
Liquidation price estimates are scaled to asset decimal places by default, unless an argument to scale to market decimal places is specified in the request. |
---|
ListNetworkParameters
GetNetworkParameter
ListCheckpoints
GetStake
GetRiskFactors
ObserveEventBus
ObserveLedgerMovements
ListKeyRotations
ListEthereumKeyRotations
GetVegaTime
GetProtocolUpgradeStatus
ListProtocolUpgradeProposals
ListCoreSnapshots
GetMostRecentNetworkHistorySegment
ListAllNetworkHistorySegments
GetActiveNetworkHistoryPeerAddresses
GetNetworkHistoryStatus
GetNetworkHistoryBootstrapPeers
ListEntities
ListFundingPeriods
ListFundingPeriodDataPoints
ListFundingPayments
GetPartyActivityStreak
GetCurrentReferralProgram
ListReferralSets
ListReferralSetReferees
GetReferralSetStats
Method | GetReferralSetStats |
---|
Request | GetReferralSetStatsRequest |
---|
Response | GetReferralSetStatsResponse |
---|
Description | Get referral set statistics
Get the total taker volume, and each referee's taker volume and, reward and discount factors for a referral set
at the latest or a specific epoch. You can also optionally filter for a specific referee's statistics. |
---|
ListTeams
Method | ListTeams |
---|
Request | ListTeamsRequest |
---|
Response | ListTeamsResponse |
---|
Description | List teams
Get a list of all teams, or for a specific team by using team ID, or party ID of a referrer or referee |
---|
ListTeamsStatistics
Method | ListTeamsStatistics |
---|
Request | ListTeamsStatisticsRequest |
---|
Response | ListTeamsStatisticsResponse |
---|
Description | List teams statistics
Get the statistics of all teams, or for a specific team by using team ID, over a number of epochs.
If a team does not have at least the number of epochs' worth of data, it is ignored. |
---|
Method | ListTeamMembersStatistics |
---|
Request | ListTeamMembersStatisticsRequest |
---|
Response | ListTeamMembersStatisticsResponse |
---|
Description | List team members' statistics
Get the statistics for all members of a given team, or for a specific member by using party ID, over a number of epochs.
If a team does not have at least the number of epochs' worth of data, it is ignored. |
---|
ListTeamReferees
ListTeamRefereeHistory
GetFeesStats
Method | GetFeesStats |
---|
Request | GetFeesStatsRequest |
---|
Response | GetFeesStatsResponse |
---|
Description | Get fees statistics
Get accumulated fees, rewards, and applied discount information. Either a market or an asset must be supplied as a filter. |
---|
GetFeesStatsForParty
GetCurrentVolumeDiscountProgram
GetVolumeDiscountStats
GetVestingBalancesSummary
GetPartyVestingStats
ObserveTransactionResults
EstimateTransferFee
GetTotalTransferFeeDiscount
ListGames
ListPartyMarginModes
GetTimeWeightedNotionalPosition
Method | GetTimeWeightedNotionalPosition |
---|
Request | GetTimeWeightedNotionalPositionRequest |
---|
Response | GetTimeWeightedNotionalPositionResponse |
---|
Description | Get time weighted notional position
Get the time weighted notional position for a given party and asset. The time weighted notional position
is used to check if a party qualifies for a reward.
If no epoch is specified, the final time weighted notional position from the end of the most recently completed epoch is returned.
If an epoch is specified, the final time weighted notional position at that epoch is returned. |
---|
ListAMMs
EstimateAMMBounds
ExportNetworkHistory
Method | ExportNetworkHistory |
---|
Request | ExportNetworkHistoryRequest |
---|
Response | HttpBody stream |
---|
Description | Export network history as CSV
Export CSV table data from network history between two block heights.
The requested block heights must fall on network history segment boundaries, which can
be discovered by calling the API to list all network history segments. By default
segments contain 1000 blocks. In that case ranges such as (1, 1000), (1001, 2000), (1, 3000)
would all fall on segment boundaries and be valid.
The generated CSV file is compressed into a ZIP file and returned, with the file name
in the following format: `[chain id]-[table name]-[start block]-[end block].zip`
In gRPC, results are returned in a chunked stream of base64 encoded data.
Through the REST gateway, the base64 data chunks are decoded and streamed as a
`content-type: application/zip` HTTP response.
The CSV exported data uses a comma as a DELIMITER between fields, and " for QUOTE-ing fields.
If a value contains any of: DELIMITER, QUOTE, carriage return, or line feed then the whole
value is prefixed and suffixed by the QUOTE character and any occurrence within
the value of a QUOTE character preceded by another QUOTE.
A NULL is output as the NULL parameter string and is not quoted, while a non-NULL value
matching the NULL parameter string is quoted.
For example, with the default settings, a NULL is written as an unquoted empty string,
while an empty string data value is written with double quotes.
Note that CSV files produced may contain quoted values containing embedded carriage returns and line feeds.
Thus the files are not strictly one line per table row like text-format files.
The first row of the CSV file is a header that describes the contents of each column
in subsequent rows.
Usually the ZIP file will contain only a single CSV file. However it is possible that
the (from_block, to_block) request spans over a range of blocks in which the underlying
schema of the database changes. For example, a column may have been added, removed, or renamed.
If this happens, the CSV file will be split at the point of the schema change and the zip
file will contain multiple CSV files, with a potentially different set of headers. The
'version' number of the database schema is part of the in the CSV filename:
`[chain id]-[table name]-[schema version]-[start block]-[end block].zip`
For example, a zip file might be called mainnet-sometable-000001-003000.zip
And contain two CSV files: `mainnet-sometable-1-000001-002000.csv`:
timestamp, value
1, foo
2, bar
And `mainnet-sometable-2-002001-003000.csv`:
timestamp, value, extra_value
3, baz, apple
It is worth noting that the schema will not change within a single network history segment.
buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE |
---|
Ping