sol_api.token
sol_api.token.get_token_metadata()
Get the global token metadata for a given network and contract (mint, standard, name, symbol, metaplex).
from moralis import sol_api
api_key = "YOUR_API_KEY"
params = {
    "network": "", 
    "address": "", 
}
result = sol_api.token.get_token_metadata(
    api_key=api_key,
    params=params,
)
print(result)
| Name | Type | Description | Required | Default | Example | 
|---|---|---|---|---|---|
| network | enum[str]: - “mainnet” - “devnet” | The network to query | Yes | “mainnet” | ”” | 
| address | str | The address of the contract | Yes | ”” | 
sol_api.token.get_token_price()
Gets the token price (usd and native) for a given contract address and network.
from moralis import sol_api
api_key = "YOUR_API_KEY"
params = {
    "network": "", 
    "address": "", 
}
result = sol_api.token.get_token_price(
    api_key=api_key,
    params=params,
)
print(result)
| Name | Type | Description | Required | Default | Example | 
|---|---|---|---|---|---|
| network | enum[str]: - “mainnet” | The network to query | Yes | “mainnet” | ”” | 
| address | str | The address of the token contract | Yes | ”” |