Query and subscribe to token price feeds and metadata.
Table of Contents
Get details for a specific token by ID.
Signature:
token(id: Int!): Token!
Parameters:
Returns: Token object
Example:
Use Cases:
Display token information
Resolve token ID to symbol
List all available tokens with filtering and ordering.
Signature:
Parameters:
where: Filter object (optional)
name: Filter by token name (string match)
permissionGroup: Filter by permission group
order_by: Sort by id, name, or permission_group
order_desc: Sort descending
Returns: Array of Token objects
Example - List All Tokens:
Example - Search by Name:
Example - Filter by Permission Group:
Use Cases:
Build token selector dropdown
tokenPricesUsd query
Get current USD prices for tokens.
Signature:
Parameters:
where: Filter object (optional)
tokenId: Filter by specific token ID
order_by: Sort by token_id
order_desc: Sort descending
Returns: Array of TokenPricesUsd objects
Example - Get All Prices:
Example - Get Specific Token Price:
Example - Get Multiple Prices:
Key Fields:
priceUsd: Current price in USD (float)
lastUpdatedBlock: Block info for last price update
Use Cases:
Calculate position values
Subscribe to real-time price updates.
Subscribe to price updates for specific or all tokens.
Signature:
Example - Subscribe to All Prices:
Example - Subscribe to Specific Token:
Use Cases:
Subscribe to user balance updates across all tokens.
Signature:
Example:
Use Cases:
Real-time portfolio updates
Types Reference
Field Details:
id: Unique token identifier
symbol: Token ticker (e.g., "BTC", "ETH")
name: Full token name (e.g., "Bitcoin", "Ethereum")
logoUrl: URL to token logo image
tradingViewSymbol: Symbol for TradingView charts
permissionGroup: Access/trading permission level
Field Details:
token: Associated token metadata
priceUsd: Current USD price
lastUpdatedBlock: Last price update info
block_ts: Timestamp (RFC3339 format)
Detailed token information for balances.
TokenType Enum:
bank: Native Cosmos SDK token
erc20: ERC20 token on EVM
Working with Prices
Price Freshness
Always check when price was last updated:
Calculate Position Value
Balance Conversion
Handling Multiple Tokens
Subscription Management
Last updated