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 |
open class func solanaGetSPLToken(publicKey: String, network: String, completion: @escaping (_ data: GetSPLTokenResponse?, _ error: Error?) -> Void)
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). 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)
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import theblockchainapi
let publicKey = "publicKey_example" // String | The public key of the token
let network = "network_example" // String | The network ID (devnet, mainnet-beta)
// Get SPL token metadata
SolanaSPLTokenAPI.solanaGetSPLToken(publicKey: publicKey, network: network) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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
[Back to top] [Back to API list] [Back to Model list] [Back to README]