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

Get last trade

GET 

/api/v2/market/:marketId/trade/latest

Get the last trade made for a given market.

Request

Path Parameters

    marketId stringrequired

    Market ID to retrieve the last trade for.

Responses

A successful response.

Schema
    trade object

    Information about the trade, if one is found.

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

    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.

    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.

    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.

    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.

    size uint64

    Size filled for the trade.

    timestamp int64

    Timestamp in Unix nanoseconds for when the trade occurred.

    type Type values for a trade

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

    Default value: TYPE_UNSPECIFIED

    Type for the trade.

Loading...