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()
<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/tokens/get-token-metadata\" target="_blank">See examples (Python, JavaScript) [Coming Soon]. Get the metadata of a token. Cost: 0.25 Credit
(<a href="#section/Pricing">See Pricing)
import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';
const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.TokenApi(configuration);
let body:theblockchainapi.TokenApiGetTokenMetadataRequest = {
// 'ethereum' | 'solana' | The blockchain you want to use
blockchain: "ethereum",
// 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`
network: "ropsten",
// 'ethereum' | 'solana' | The identifier of the token (e.g., `mint_address` on `Solana` or `token_address` on `Ethereum`)
tokenBlockchainIdentifier: "ethereum",
};
apiInstance.getTokenMetadata(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
blockchain | [**'ethereum' | 'solana'**]Array<'ethereum' | 'solana'> | 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` | defaults to undefined |
tokenBlockchainIdentifier | [**'ethereum' | 'solana'**]Array<'ethereum' | 'solana'> | The identifier of the token (e.g., `mint_address` on `Solana` or `token_address` on `Ethereum`) |
TokenMetadataResponse
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
400 | Invalid input or issue retrieving transaction. See response for details | - |
401 | Invalid API key pair in headers | - |
402 | Payment required. Occurs when you run out of API requests. Upgrade <a href="https://dashboard.theblockchainapi.com/billing\" target="_blank">here</a>. | - |
404 | Task not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Array listAllTokens()
<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/tokens/get-all-tokens\" target="_blank">See examples (Python, JavaScript) [Coming Soon]. List all tokens. Cost: 1 Credit
(<a href="#section/Pricing">See Pricing)
import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';
const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.TokenApi(configuration);
let body:theblockchainapi.TokenApiListAllTokensRequest = {
// 'solana' | The blockchain you want to use
blockchain: "solana",
// 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`
network: "ropsten",
};
apiInstance.listAllTokens(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
blockchain | ['solana']Array<'solana'> | The blockchain you want to use | defaults to undefined |
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` | defaults to undefined |
Array
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
400 | Invalid input or issue retrieving transaction. See response for details | - |
401 | Invalid API key pair in headers | - |
402 | Payment required. Occurs when you run out of API requests. Upgrade <a href="https://dashboard.theblockchainapi.com/billing\" target="_blank">here</a>. | - |
404 | Task not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]