dex-subgraph
dex-subgraph copied to clipboard
Allow to filter trades by order id
currently not possible
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
}
}
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 :)