Skip to content

[Feature Request] Add USDC_PRICE to SaleSortKey enum #89

@segwitnitwit

Description

@segwitnitwit

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
            }
          }
        }
      }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions