← ClaudeAtlas

scallop-query-datalisted

Query Scallop protocol data - market pools, balances, obligations, prices, and portfolio info. Use when user says "query", "get market data", "check balance", "get obligation", "market APY", "pool data", "utilization rate", "portfolio", "supply APY", "borrow APY", or asks about reading on-chain Scallop data without modifying state.
scallop-io/scallop-skills · ★ 1 · AI & Automation · score 65
Install: claude install-skill scallop-io/scallop-skills
# Query Protocol Data Read on-chain Scallop protocol data: market pools, balances, obligations, prices, and user portfolios. ## Overview `ScallopQuery` provides read-only access to all protocol data. No transaction signing required — just an RPC connection. ```python from sui_scallop_sdk import ScallopClient client = ScallopClient(network="mainnet") query = client.create_query() ``` Or with a wallet address for user-specific queries: ```python client = ScallopClient( network="mainnet", wallet_address="0xYOUR_ADDRESS" ) query = client.create_query() ``` ## ScallopQuery Methods | Method | Returns | Purpose | |--------|---------|---------| | `get_market_data(coin_name?)` | `dict[str, MarketPool]` | Market pool stats (APY, utilization, etc.) | | `get_balance(owner, coin_type?)` | `int` | Token balance for address | | `get_coins(owner, coin_type?)` | `list[dict]` | All coin objects owned by address | | `get_coin_price(coin_name)` | `Decimal \| None` | Current USD price via Pyth oracle | | `get_obligation(obligation_id)` | `ObligationInfo` | Obligation with parsed data | | `get_obligation_with_prices(obligation_id)` | `ObligationInfo` | Obligation with fresh USD values | | `get_obligation_account(obligation_id)` | `ObligationAccount \| None` | Raw obligation account data | | `list_user_obligations(address?)` | `list[str]` | All obligation IDs for a wallet | | `get_object(object_id)` | `dict` | Generic on-chain object query | ## Market Data Query lending pool stat