Created
February 10, 2024 17:04
-
-
Save dmulvi/389e5f76b80493130d3c56cf6036189f to your computer and use it in GitHub Desktop.
Fetch NFTs from a wallet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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