Skip to main content
Version: mainnet (v0.71)

Trade

A trade on Vega, the result of two orders being 'matched' in the market

type Trade {
id: ID!
market: Market!
buyOrder: String!
sellOrder: String!
buyer: Party!
seller: Party!
aggressor: Side!
price: String!
size: String!
createdAt: Timestamp!
type: TradeType!
buyerFee: TradeFee!
sellerFee: TradeFee!
buyerAuctionBatch: Int
sellerAuctionBatch: Int
}

Fields

Trade.id ● ID! non-null scalar

The hash of the trade data

Trade.market ● Market! non-null object

The market the trade occurred on

Trade.buyOrder ● String! non-null scalar

The order that bought

Trade.sellOrder ● String! non-null scalar

The order that sold

Trade.buyer ● Party! non-null object

The party that bought

Trade.seller ● Party! non-null object

The party that sold

Trade.aggressor ● Side! non-null enum

The aggressor indicates whether this trade was related to a BUY or SELL

Trade.price ● String! non-null scalar

The price of the trade (probably initially the passive order price, other determination algorithms are possible though) (uint64)

Trade.size ● String! non-null scalar

The number of units traded, will always be <= the remaining size of both orders immediately before the trade (uint64)

Trade.createdAt ● Timestamp! non-null scalar

RFC3339Nano time for when the trade occurred

Trade.type ● TradeType! non-null enum

The type of trade

Trade.buyerFee ● TradeFee! non-null object

The fee paid by the buyer side of the trade

Trade.sellerFee ● TradeFee! non-null object

The fee paid by the seller side of the trade

Trade.buyerAuctionBatch ● Int scalar

The batch in which the buyer order was submitted (applies only for auction modes)

Trade.sellerAuctionBatch ● Int scalar

The batch in which the seller order was submitted (applies only for auction modes)

Member of

Entities object ● MarketDepth object ● TradeEdge object