Market
Represents a product & associated parameters that can be traded on Vega, has an associated OrderBook and Trade history
type Market {
  id: ID!
  fees: Fees!
  tradableInstrument: TradableInstrument!
  decimalPlaces: Int!
  positionDecimalPlaces: Int!
  openingAuction: AuctionDuration!
  priceMonitoringSettings: PriceMonitoringSettings!
  liquidityMonitoringParameters: LiquidityMonitoringParameters!
  tradingMode: MarketTradingMode!
  state: MarketState!
  proposal: Proposal
  ordersConnection(
  pagination: Pagination
  filter: OrderByPartyIdsFilter
): OrderConnection
  accountsConnection(
  partyId: ID
  pagination: Pagination
): AccountsConnection
  tradesConnection(
  dateRange: DateRange
  pagination: Pagination
): TradeConnection
  depth(
  maxDepth: Int
): MarketDepth!
  candlesConnection(
  since: String!
  to: String
  interval: Interval!
  pagination: Pagination
): CandleDataConnection
  data: MarketData
  liquidityProvisionsConnection(
  partyId: ID
  live: Boolean
  pagination: Pagination
): LiquidityProvisionsConnection
  marketTimestamps: MarketTimestamps!
  riskFactors: RiskFactor
  linearSlippageFactor: String!
  quadraticSlippageFactor: String!
  parentMarketID: ID
  insurancePoolFraction: String
  successorMarketID: ID
  liquiditySLAParameters: LiquiditySLAParameters
}
Fields
Market.id ● ID! non-null scalar
Market ID
Market.fees ● Fees! non-null object
Fees related data
Market.tradableInstrument ● TradableInstrument! non-null object
An instance of, or reference to, a tradable instrument.
Market.decimalPlaces ● Int! non-null scalar
The number of decimal places that an integer must be shifted by in order to get a correct number denominated in the currency of the market. (uint64)
Examples: Currency Balance decimalPlaces Real Balance GBP 100 0 GBP 100 GBP 100 2 GBP 1.00 GBP 100 4 GBP 0.01 GBP 1 4 GBP 0.0001 ( 0.01p )
GBX (pence) 100 0 GBP 1.00 (100p ) GBX (pence) 100 2 GBP 0.01 ( 1p ) GBX (pence) 100 4 GBP 0.0001 ( 0.01p ) GBX (pence) 1 4 GBP 0.000001 ( 0.0001p)
Market.positionDecimalPlaces ● Int! non-null scalar
The number of decimal places that an integer must be shifted in order to get a correct size (uint64). i.e. 0 means there are no fractional orders for the market, and order sizes are always whole sizes. 2 means sizes given as 10^2 * desired size, e.g. a desired size of 1.23 is represented as 123 in this market. This sets how big the smallest order / position on the market can be.
Market.openingAuction ● AuctionDuration! non-null object
Auction duration specifies how long the opening auction will run (minimum duration and optionally a minimum traded volume).
Market.priceMonitoringSettings ● PriceMonitoringSettings! non-null object
Price monitoring settings for the market
Market.liquidityMonitoringParameters ● LiquidityMonitoringParameters! non-null object
Liquidity monitoring parameters for the market
Market.tradingMode ● MarketTradingMode! non-null enum
Current mode of execution of the market
Market.state ● MarketState! non-null enum
Current state of the market
Market.proposal ● Proposal object
The proposal that initiated this market
Market.ordersConnection ● OrderConnection object
Orders on a market
Market.ordersConnection.pagination●PaginationinputPagination information
Market.ordersConnection.filter ● OrderByPartyIdsFilter input
Filter orders
Market.accountsConnection ● AccountsConnection object
Get account for a party or market
Market.accountsConnection.partyId●IDscalarID of the party to get the margin account for
Market.accountsConnection.pagination ● Pagination input
Pagination information
Market.tradesConnection ● TradeConnection object
Market.tradesConnection.dateRange●DateRangeinputDate range to retrieve trades from/to. Start and end time should be expressed as an integer value of Unix nanoseconds
Market.tradesConnection.pagination ● Pagination input
Pagination information
Market.depth ● MarketDepth! non-null object
Current depth on the order book for this market
Market.depth.maxDepth●IntscalarMaximum market order book depth (returns whole order book if omitted)
Market.candlesConnection ● CandleDataConnection object
Candles on a market, for the 'last' n candles, at 'interval' seconds as specified by parameters using cursor based pagination
Market.candlesConnection.since●String!non-null scalarRFC3339Nano encoded time to get candles from
Market.candlesConnection.to ● String scalar
Optional: RFC3339Nano encoded time to get candles to
Market.candlesConnection.interval ● Interval! non-null enum
Interval of the candles
Market.candlesConnection.pagination ● Pagination input
Pagination information
Market.data ● MarketData object
marketData for the given market
Market.liquidityProvisionsConnection ● LiquidityProvisionsConnection object
The list of the liquidity provision commitments for this market
Market.liquidityProvisionsConnection.partyId●IDscalarAn optional party ID
Market.liquidityProvisionsConnection.live ● Boolean scalar
An optional live flag to determine whether to list only live LPs or not
Market.liquidityProvisionsConnection.pagination ● Pagination input
Pagination information
Market.marketTimestamps ● MarketTimestamps! non-null object
Timestamps for state changes in the market
Market.riskFactors ● RiskFactor object
Risk factors for the market
Market.linearSlippageFactor ● String! non-null scalar
Linear slippage factor is used to cap the slippage component of maintainence margin - it is applied to the slippage volume
Market.quadraticSlippageFactor ● String! non-null scalar
Quadratic slippage factor is used to cap the slippage component of maintainence margin - it is applied to the square of the slippage volume
Market.parentMarketID ● ID scalar
Optional: Parent market ID. A market can be a successor to another market. If this market is a successor to a previous market, this field will be populated with the ID of the previous market.
Market.insurancePoolFraction ● String scalar
Optional: When a successor market is created, a fraction of the parent market's insurance pool can be transferred to the successor market
Market.successorMarketID ● ID scalar
Optional: Market ID of the successor to this market if one exists
Market.liquiditySLAParameters ● LiquiditySLAParameters object
Optional: Liquidity SLA parameters for the market
Returned by
market  query
Member of
AccountBalance  object ● AccountEvent  object ● Entities  object ● LiquidityProvision  object ● MarginLevels  object ● MarketData  object ● MarketDepth  object ● MarketDepthUpdate  object ● MarketEdge  object ● Order  object ● Position  object ● SuccessorMarket  object ● Trade  object ● UpdateMarketState  object