This is our preferred option as it is probably the most flexible option and allows an easy schema exploration.
Network | Endpoint |
---|---|
mainnet | https://graph.mintbase.xyz/mainnet |
testnet | https://graph.mintbase.xyz/testnet |
The queries and relationships are extensible, we suggest just clicking around the tree to make the queries and it will become easy over time.
In the future, users may be required to register using an api key. For now, simply passing the valueanon
for mb-api-key
will work: e.g.
curl --location --request POST 'https://graph.mintbase.xyz' \
--header 'mb-api-key: anon' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query blocks {\n blocks {\n synced_height\n }\n}","variables":{}}'
- Get NFTs owned by an account, notice the
burned_timestamp
if null indicates it has not been burned yet - Get Metadata from token reference including title, media, documents, sound, 3d.
- Get unburned tokens on a contract
Find all the different entities and parameters for interacting with the API.
nft_tokens
: Gets data on single tokensmb_views_nft_metadata_unburned
: The token type (metadata wrapper)nft_metadata
: Indexed metadatanft_contracts
: Stores/contracts deployednft_listings
: Marketplace listingsoffers
: Offers made to market listingsmb_store_minters
: Allowed mintings accountsnft_earnings
: Historical earnings per account
...
...
offset
: position where it should start the results ex:
offset : 12
it will render results from 12 > \
Query to retrieve a specific nft/Token
you need tokenId , and contractAddress
ex:
tokenId: 137
contract Address: voiceoftheoceans.mintbase1.near\
{% embed url="https://gist.github.com/rubenmarcus/c781422542c19cfaca4bbc3a74ffad81#file-gettokenbyid" %}
{% embed url="https://gist.github.com/rubenmarcus/c781422542c19cfaca4bbc3a74ffad81#file-getstorenfts" %}
{% embed url="https://gist.github.com/rubenmarcus/c781422542c19cfaca4bbc3a74ffad81#file-getstoredatabyid" %}
GetRoyaltiesInfo
{% embed url="https://gist.github.com/rubenmarcus/c781422542c19cfaca4bbc3a74ffad81#file-getroyaltiesinfo" %}
GetTokensSplitbyMetadataId
{% embed url="https://gist.github.com/rubenmarcus/1ea704327c252f198eef7fc6d9eebecd#file-gettokenssplitbymetadataid" %}