All URIs are relative to https://api.blockchainapi.com/v1
| Method | HTTP request | Description |
|---|---|---|
| getTokenMetadata | GET /{blockchain}/{network}/token/{token_blockchain_identifier} | Get a token's metadata |
| listAllTokens | GET /{blockchain}/{network}/all_tokens | List all tokens |
TokenMetadataResponse getTokenMetadata(blockchain, network, tokenBlockchainIdentifier)
Get a token's metadata
<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/tokens/get-token-metadata\" target="_blank">See examples (Python, JavaScript) [Coming Soon]</a>. Get the metadata of a token. `Cost: 0.25 Credit` (<a href="#section/Pricing">See Pricing</a>)
import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';
let apiInstance = new theblockchainapi.TokenApi();
let blockchain = "blockchain_example"; // String | The blockchain you want to use
let network = ropsten; // String | The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`
let tokenBlockchainIdentifier = "tokenBlockchainIdentifier_example"; // String | The identifier of the token (e.g., `mint_address` on `Solana` or `token_address` on `Ethereum`)
apiInstance.getTokenMetadata(blockchain, network, tokenBlockchainIdentifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| blockchain | String | The blockchain you want to use | |
| network | String | The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten` | |
| tokenBlockchainIdentifier | String | The identifier of the token (e.g., `mint_address` on `Solana` or `token_address` on `Ethereum`) |
- Content-Type: Not defined
- Accept: application/json
[TokenMetadataResponse] listAllTokens(blockchain, network)
List all tokens
<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/tokens/get-all-tokens\" target="_blank">See examples (Python, JavaScript) [Coming Soon]</a>. List all tokens. `Cost: 1 Credit` (<a href="#section/Pricing">See Pricing</a>)
import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';
let apiInstance = new theblockchainapi.TokenApi();
let blockchain = "blockchain_example"; // String | The blockchain you want to use
let network = ropsten; // String | The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`
apiInstance.listAllTokens(blockchain, network).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| blockchain | String | The blockchain you want to use | |
| network | String | The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten` |
- Content-Type: Not defined
- Accept: application/json