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()
<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). 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. 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)
import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';
const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.SolanaSPLTokenApi(configuration);
let body:theblockchainapi.SolanaSPLTokenApiSolanaGetSPLTokenRequest = {
// string | The public key of the token
publicKey: "MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac",
// string | The network ID (devnet, mainnet-beta)
network: "mainnet-beta",
};
apiInstance.solanaGetSPLToken(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
publicKey | [string] | The public key of the token | defaults to undefined |
network | [string] | The network ID (devnet, mainnet-beta) | defaults to undefined |
GetSPLTokenResponse
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
400 | Bad request (check response message) | - |
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 | Account not found / not initialized with this public key address. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]