Skip to content

Instantly share code, notes, and snippets.

@dmulvi
Created February 9, 2024 20:10
Show Gist options
  • Save dmulvi/e692dc8a3a6b112db297b4eed4c53039 to your computer and use it in GitHub Desktop.
Save dmulvi/e692dc8a3a6b112db297b4eed4c53039 to your computer and use it in GitHub Desktop.
fetch NFTs from a wallet
const baseUrl = "https://staging.crossmint.com/api";
const chain = "polygon";
const wallet = "0x1234abcde...";
const options = {
method: "GET",
headers: { "X-API-KEY": "YOUR_API_KEY" },
};
fetch(
`${baseUrl}/2022-06-09/wallets/${chain}:${wallet}/nfts?page=1&perPage=20`,
options
)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment