Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add USDC_PRICE to SaleSortKey enum #89

Open
segwitnitwit opened this issue Apr 9, 2023 · 1 comment
Open

[Feature Request] Add USDC_PRICE to SaleSortKey enum #89

segwitnitwit opened this issue Apr 9, 2023 · 1 comment

Comments

@segwitnitwit
Copy link

segwitnitwit commented Apr 9, 2023

I'd like to be able to sort by usdc price.

EDIT: Please let me know if this is the correct place for this request.

I am using React w/ the graphql apollo client to query -> https://api.zora.co/graphql

here is my full query:
(It's exactly what I want, except that I cannot have the sortKey be USDC_PRICE since it's not part of the SaleSortKey enum.)

query TopPurchaseForAnAddress($userAddress : String!) {
      sales(where: {buyerAddresses: [$userAddress] }, 
            filter: {priceFilter:{minimumChainTokenPrice:"0.000000001"}},
            sort: {sortKey: CHAIN_TOKEN_PRICE, sortDirection: DESC}, 
            pagination: {limit: 100}) {
        nodes {
          sale {
            price {
              usdcPrice {
                decimal
              }
              nativePrice {
                decimal
                currency {
                  name
                }
              }
            }
            buyerAddress
            transactionInfo {
              transactionHash
            }
          }
          token {
            name
            tokenId
            tokenContract {
              name
            }
          }
        }
      }
    }
@segwitnitwit segwitnitwit changed the title Add USDC_PRICE to SaleSortKey enum [Feature Request] Add USDC_PRICE to SaleSortKey enum Apr 9, 2023
@segwitnitwit
Copy link
Author

I realize im using the api and not the zdk. but I didn't know where to put a request for this new sort option to be added to the api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant