getToken()
Gets information about a token from the network.
Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenId | Number | Y | The token id being fetched |
Response
{
"id": "number",
"price": "number",
"supply": "number",
"remaining": "number",
"totalSupply": "number",
"maxPerAddress": "number"
}
Example Implementation
const tokenId = 1;
const tokens = await contract.getToken(tokenId);
For ERC721 contracts the tokenId will always be 0
Possible Errors
Errors in the connect()
function
Feedback
Something not quite right, unclear or can't find what you are looking for? Please let us know at support.moonpay.com and we will get back to you as soon as we can.
Updated 9 months ago