fragment PriceLevelFields on PriceLevel {
  price
  volume
  numberOfOrders
}

query MarketDepth($marketId: ID!) {
  market(id: $marketId) {
    id
    depth {
      sell {
        ...PriceLevelFields
      }
      buy {
        ...PriceLevelFields
      }
      sequenceNumber
    }
  }
}

subscription MarketDepthUpdate($marketId: ID!) {
  marketsDepthUpdate(marketIds: [$marketId]) {
    marketId
    sell {
      ...PriceLevelFields
    }
    buy {
      ...PriceLevelFields
    }
    sequenceNumber
    previousSequenceNumber
  }
}
