vegaprotocol / vega

A Go implementation of the Vega Protocol, a protocol for creating and trading derivatives on a fully decentralised network.
https://vega.xyz
GNU Affero General Public License v3.0
37 stars 18 forks source link

Add filters to the trade API #10908

Open JonRay15 opened 5 months ago

JonRay15 commented 5 months ago

Request

Currently trades API only allows filtering by market, party, order, and datetime range.

We shoudl add filters for:

This would allow the Console to find closeout trades by filtering on TYPE_NETWORK_CLOSE_OUT_BAD and buyer = "network".

I added the other filters because while we're in here it makes sense to add these so we have more options in future.

EVODelavega commented 2 months ago

Just a point of clarification: the party filter is currently implemented as finding trades with said parties both as buyer and seller, do we want to keep that as is, replace with distinct buyer/seller fields, or support both (e.g.: find all trades involving party X -> use parties, find all trades where party X was the buyer -> user buyer).