dex-subgraph icon indicating copy to clipboard operation
dex-subgraph copied to clipboard

Allow to filter trades by order id

Open anxolin opened this issue 5 years ago • 2 comments

currently not possible

anxolin avatar Mar 30 '20 15:03 anxolin

This works for me:

query {
  trades(where: {
    order: "0xa5a69107816c5e3dfa5561e6b621dfe6294f6e5b-115"
  }) {
    buyVolume
    sellVolume
  }
}

Or do you mean trades for a given order ID and not user/order ID pair? In that case you could so this (but its kind of hacky):

query {
  trades(where: {
    order_ends_with: "-115"
  }) {
    buyVolume
    sellVolume
  }
}

nlordell avatar Aug 05 '20 14:08 nlordell

yes, this one is easy. It's just denormalize it a bit for allowing this filter. Orderid is so important I wouldn't use this hacky way.

I think it's a good one to start getting the hang of this repo and deploy a version with just this change :)

anxolin avatar Aug 05 '20 14:08 anxolin