Skip to content

Instantly share code, notes, and snippets.

@ries9112
Created June 6, 2021 16:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ries9112/450f9309cbb25768298d698d31e69537 to your computer and use it in GitHub Desktop.
Save ries9112/450f9309cbb25768298d698d31e69537 to your computer and use it in GitHub Desktop.
Use this query to find all objkts in your collection - sorted by highest sales (both primary and secondary market). Replace 'String = "tz1c...' with your own Tezos wallet.
query findSecondarySales($address: String = "tz1c2iwyckUCcicx2qxqtwLEartYFEHg1pvB") {
hic_et_nunc_swap(where: {status: {_in: [1]}, token: {swaps: {trades: {buyer: {address: {_eq: $address}}}}}}, order_by: {price: desc}) {
price
status
token {
title
mime
description
id
artifact_uri
}
timestamp
amount
amount_left
}
}
@ries9112
Copy link
Author

ries9112 commented Jun 6, 2021

You can simply copy the text from this gist in its entirety and paste it to replace the default example here: https://api.hicdex.com/graphiql/

Also see this example on how to do this through a programming language like R: https://gist.github.com/ries9112/b3198514632157c644ad6b7beae6b5f6
Using the script at the link above you can change the address to anything you'd like and run the script to be given a unique list of objkts that address owns that’s sorted from most expensive sale to cheapest. Just make sure you have the three packages that are needed installed; if you save your R script within RStudio (copy/pasting that code), you should be prompted to install the ones you are missing automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment