Created
February 9, 2024 20:10
-
-
Save dmulvi/e692dc8a3a6b112db297b4eed4c53039 to your computer and use it in GitHub Desktop.
fetch NFTs from a wallet
This file contains 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