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

Observe trades

GET 

/api/v2/stream/trades

Subscribe to a stream of trades, optionally filtered by party/market

Request

Query Parameters

    marketIds string[]

    Restrict the trades streamed to those made on the given markets.

    partyIds string[]

    Restrict the trades streamed to those made by the given parties.

Responses

A successful response.(streaming responses)

Schema
    error object
    code int32
    details object[]
  • Array [
  • @type string

    A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in path/google.protobuf.Duration). The name should be in a canonical form (e.g., leading "." is not accepted).

    In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme http, https, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:

    • If no scheme is provided, https is assumed.
    • An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
    • Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)

    Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.

    Schemes other than http, https (or the empty scheme) might be used with implementation specific semantics.

  • ]
  • message string
    result object
    trades object[]

    List of 0 or more trades.

  • Array [
  • 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.

  • ]
Loading...