For the complete documentation index, see llms.txt. This page is also available as Markdown.

Oracle API

Query and subscribe to token price feeds and metadata.

Table of Contents

Queries

token

Get details for a specific token by ID.

Signature:

token(id: Int!): Token!

Parameters:

  • id: Token ID (integer)

Returns: Token object

Example:

Use Cases:

  • Get token metadata

  • Display token information

  • Resolve token ID to symbol


tokens

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

  • limit: Max results

  • 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

  • Search tokens by name

  • List tradeable assets

  • Filter by permissions


tokenPricesUsd query

Get current USD prices for tokens.

Signature:

Parameters:

  • where: Filter object (optional)

    • tokenId: Filter by specific token ID

  • limit: Max results

  • order_by: Sort by oracle_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:

  • Display token prices

  • Calculate position values

  • Monitor price changes

  • Verify price freshness


Subscriptions

Subscribe to real-time price updates.

tokenPricesUsd

Subscribe to price updates for specific or all tokens.

Signature:

Example - Subscribe to All Prices:

Example - Subscribe to Specific Token:

Use Cases:

  • Real-time price tickers

  • Live trading dashboards

  • Price alert systems

  • Chart updates


userBalances

Subscribe to user balance updates across all tokens.

Signature:

Example:

Use Cases:

  • Track wallet balances

  • Monitor account changes

  • Real-time portfolio updates

  • Display available funds


Types Reference

Token

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


TokenPricesUsd

Field Details:

  • token: Associated token metadata

  • priceUsd: Current USD price

  • lastUpdatedBlock: Last price update info

    • block: Block height

    • block_ts: Timestamp (RFC3339 format)


Balance


TokenInfo

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:

Price Formatting

Calculate Position Value

Balance Conversion


Best Practices

Caching Prices

Handling Multiple Tokens

Subscription Management

Last updated