Skip to main content
Version: pre-release (v0.78)

Get latest market depth

GET 

/api/v2/market/depth/:marketId/latest

Get the latest market depth for a given market

Request

Path Parameters

    marketId stringrequired

    Market ID to request market depth for, required field.

Query Parameters

    maxDepth uint64

    Maximum market depth.

Responses

A successful response.

Schema
    buy object[]

    Zero or more price levels for the buy side of the market depth data.

  • Array [
  • ammVolume uint64

    Volume of AMM's at the price level.

    ammVolumeEstimated uint64

    Estimated AMM volume at the price level.

    numberOfOrders uint64

    Number of orders at the price level.

    price string

    Price for the price level, the price is an integer, for example 123456 is a correctly formatted price of 1.23456 assuming market configured to 5 decimal places. This field is an unsigned integer passed as a string and needs to be scaled using the market's decimal places.

    volume uint64

    Volume at the price level.

  • ]
  • lastTrade object

    Last trade recorded on Vega.

    aggressor Side relates to the direction of an order, to Buy, or Sell (string)

    Possible values: [SIDE_UNSPECIFIED, SIDE_BUY, SIDE_SELL]

    Default value: SIDE_UNSPECIFIED

    Direction of the aggressive party e.g. SIDE_BUY or SIDE_SELL.

    assetPrice string

    Price for the trade using asset decimals, as opposed to market decimals used in the price field. This is only used in trade events for position updates.

    buyOrder string

    Identifier of the order from the buy side.

    buyer string

    Unique party ID for the buyer.

    buyerAuctionBatch uint64

    Auction batch number that the buy side order was placed in.

    buyerFee object

    Fee amount charged to the buyer party for the trade.

    buyBackFee string

    Fee amount used to purchase governance tokens via regular auctions (network wide).

    highVolumeMakerFee string

    Fee paid by the taker to the maker if the maker is eligible.

    infrastructureFee string

    Fee amount paid for maintaining the Vega infrastructure. This field is an unsigned integer scaled using the asset's decimal places.

    infrastructureFeeReferrerDiscount string

    Discount on infrastructure fee for eligible referrer.

    infrastructureFeeVolumeDiscount string

    Discount on infrastructure fee based on the taker volume.

    liquidityFee string

    Fee amount paid to market makers. This field is an unsigned integer scaled to the asset's decimal places.

    liquidityFeeReferrerDiscount string

    Discount on liquidity fee for eligible referrer.

    liquidityFeeVolumeDiscount string

    Discount on liquidity fee basedo on taker volume.

    makerFee string

    Fee amount paid to the non-aggressive party of the trade. This field is an unsigned integer scaled to the asset's decimal places.

    makerFeeReferrerDiscount string

    Referrer discounts. Discount on maker fee for eligible referrer.

    makerFeeVolumeDiscount string

    Volume discounts. Discount on maker fee based on the taker volume.

    treasuryFee string

    Fee amount sent to network treasury for later use based on governance actions (network wide).

    id string

    Unique ID for the trade.

    marketId string

    Market ID on which the trade occurred.

    price string

    Price for the trade, the price is an integer, for example 123456 is a correctly formatted price of 1.23456 assuming market configured to 5 decimal places.

    sellOrder string

    Identifier of the order from the sell side.

    seller string

    Unique party ID for the seller.

    sellerAuctionBatch uint64

    Auction batch number that the sell side order was placed in.

    sellerFee object

    Fee amount charged to the seller party for the trade.

    buyBackFee string

    Fee amount used to purchase governance tokens via regular auctions (network wide).

    highVolumeMakerFee string

    Fee paid by the taker to the maker if the maker is eligible.

    infrastructureFee string

    Fee amount paid for maintaining the Vega infrastructure. This field is an unsigned integer scaled using the asset's decimal places.

    infrastructureFeeReferrerDiscount string

    Discount on infrastructure fee for eligible referrer.

    infrastructureFeeVolumeDiscount string

    Discount on infrastructure fee based on the taker volume.

    liquidityFee string

    Fee amount paid to market makers. This field is an unsigned integer scaled to the asset's decimal places.

    liquidityFeeReferrerDiscount string

    Discount on liquidity fee for eligible referrer.

    liquidityFeeVolumeDiscount string

    Discount on liquidity fee basedo on taker volume.

    makerFee string

    Fee amount paid to the non-aggressive party of the trade. This field is an unsigned integer scaled to the asset's decimal places.

    makerFeeReferrerDiscount string

    Referrer discounts. Discount on maker fee for eligible referrer.

    makerFeeVolumeDiscount string

    Volume discounts. Discount on maker fee based on the taker volume.

    treasuryFee string

    Fee amount sent to network treasury for later use based on governance actions (network wide).

    size uint64

    Size filled for the trade.

    timestamp int64

    Timestamp in Unix nanoseconds for when the trade occurred.

    type Type values for a trade (string)

    Possible values: [TYPE_UNSPECIFIED, TYPE_DEFAULT, TYPE_NETWORK_CLOSE_OUT_GOOD, TYPE_NETWORK_CLOSE_OUT_BAD]

    Default value: TYPE_UNSPECIFIED

    Type for the trade.

    marketId string

    Market ID of the depth levels returned.

    sell object[]

    Zero or more price levels for the sell side of the market depth data.

  • Array [
  • ammVolume uint64

    Volume of AMM's at the price level.

    ammVolumeEstimated uint64

    Estimated AMM volume at the price level.

    numberOfOrders uint64

    Number of orders at the price level.

    price string

    Price for the price level, the price is an integer, for example 123456 is a correctly formatted price of 1.23456 assuming market configured to 5 decimal places. This field is an unsigned integer passed as a string and needs to be scaled using the market's decimal places.

    volume uint64

    Volume at the price level.

  • ]
  • sequenceNumber uint64

    Sequence number incremented after each update.

Loading...