All URIs are relative to https://api.blockchainapi.com/v1
Method | HTTP request | Description |
---|---|---|
solanaGetSPLToken | GET /solana/spl-token/{network}/{public_key} | Get SPL token metadata |
GetSPLTokenResponse solanaGetSPLToken(publicKey, network)
Get SPL token metadata
<a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-spl-token/get-spl-token\" target="_blank">See examples (Python, JavaScript)</a>. Retrieves basic information about an SPL token given its `mint_address`. You can see the mint addresses of popular SPL tokens <a href="https://raw.githubusercontent.com/solana-labs/token-list/main/src/tokens/solana.tokenlist.json\" target="_blank">here</a>. Some example mint addresses of SPL tokens: - USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v - Mango: MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac - Serum: SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt - Raydium: 4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R - wSOL: So11111111111111111111111111111111111111112 - ATLAS: ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx `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.SolanaSPLTokenApi();
let publicKey = MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac; // String | The public key of the token
let network = mainnet-beta; // String | The network ID (devnet, mainnet-beta)
apiInstance.solanaGetSPLToken(publicKey, network).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
publicKey | String | The public key of the token | |
network | String | The network ID (devnet, mainnet-beta) |
- Content-Type: Not defined
- Accept: application/json