Skip to main content
Version: testnet (v0.76)

Building blocks

While there are hundreds of available endpoints, the categories below cover the basics to get you started with understanding what you need to interact with Vega.

Parties

A party is a single user, defined as a Vega public key. As one person or entity can have many public keys, this is a unique identifier as far as an individual key's actions. Party ID and public key (pubkey) are all names for the same thing.

DescriptionDocumentationCall
See a paginated list of partiesList partiesGET /api/v2/parties

Assets

Assets used on Vega originate on external chains, not the Vega chain.

Inter-chain asset interactions can be:

  • Between Vega and Ethereum, and facilitated through the Ethereum bridge.
  • Between Vega and Arbitrum, faciliated through the Arbitrum bridge.

Assets can only be added to the network to be used as collateral through a successful governance proposal and enactment, and a follow-on update to the relevant asset bridge.

DescriptionDocumentationCall
See all assets that can be used on the networkList assetsGET /api/v2/assets
Show a specific asset's detailsAssetGET /api/v2/asset/:assetId

Deposits and withdrawals

Assets used on the Vega network can be deposited using a web3 wallet:

  • Via the Ethereum bridge contract, for ERC-20 assets on Ethereum mainnet
  • Via the Arbitrum bridge, for assets on the Arbitrum mainnet network

Read more about the asset bridges.

Assets can be withdrawn back into an external wallet if they are not being used for margin, positions, or liquidity bond.

DescriptionDocumentationCall
See all deposits for a specific public keyList depositsGET /api/v2/deposits
See a specific deposit using its IDDepositGET /api/v2/deposit/:id
Understanding the concepts: accountsAccounts
Understanding the concepts: deposits and withdrawalsDeposits and withdrawals

Accounts

Vega relies on accounts to ensure funds are never lost or double spent. The amounts in each account, as well as the transactions that were added to and removed from those accounts, are all recorded and stored on-chain. Accounts are used either to hold assets that the public key holder is in control of using — such as deposited collateral, or for setting money aside that only the network can manage — to fulfil margin requirements, for example, or to store assets that are earmarked for rewards or paying out fees.

DescriptionDocumentationCall
List accounts based on chosen filtersList accountsGET /api/v2/accounts
Understanding the concepts: accountsAccounts

Markets

Markets have accounts, are created with proposals, and allow parties to place orders with assets.

DescriptionDocumentationCall
See all markets on the networkList marketsGET /api/v2/markets
Get information about a single market using the market's IDMarketGET /api/v2/market/:marketId
List the latest data for every marketMarkets dataGET /api/v2/markets/data
Understanding the concepts: market lifecycleMarket lifecycle

Orders and positions

An order is an instruction to buy or sell on a specific market, and it can go long or short on the market's price. Placing an order does not guarantee it gets filled, but if it is filled, it will result in a position, which will require collateral to use for margin to keep that position open.

DescriptionDocumentationCall
Get information about an order using its IDOrderGET /api/v2/order/:orderId
Get a list of orders that have been filtered based on information you provideList ordersGET /api/v2/orders
Get a list of all positions for a specific party IDList positionsGET /api/v2/positions
Get a paginated list of all trades, optionally filtered by party, market, or orderList tradesGET /api/v2/trades
Understand the concepts: ordersOrders

Governance proposals and voting

Governance proposals used to add new assets and markets, as well as to suggest changes to assets, markets, and network parameters, as well as off-chain suggestions. VEGA tokens need to be associated to the Vega public key that wants to take part in governance.

DescriptionDocumentationCall
View all governance proposals with their current state, paginatedList proposalsGET /api/v2/governances
Get detailed information about a specific governance proposal using its IDProposalGET /api/v2/governance
How to submit proposals using command lineSubmitting proposals
Understanding the concepts: GovernanceVega governance

Governance token

VEGA token are used for taking part in network, market, asset and freeform governance, and to secure the network by nominating validators that run the network.

DescriptionDocumentationCall
See a list of votesList votesGET /api/v2/votes
How to nominate validators using the smart contractsStake tokens
Understand the concepts: GovernanceVega governance