Documentation Index
Fetch the complete documentation index at: https://developer.alterscope.org/llms.txt
Use this file to discover all available pages before exploring further.
The Python SDK is published as alterscope on PyPI. It is generated from services/risk-api/docs/openapi.yaml so the API reference and the client stay in lockstep.
Install
pip install alterscope
# With async support
pip install "alterscope[async]"
Python 3.10+ is supported.
Sync client
from alterscope import AlterscopeClient, freshness_status_of
client = AlterscopeClient(api_key="sk_live_...")
oracle = client.oracles.classify(market_id="morpho-usdc-lending")
print("freshness", freshness_status_of(oracle))
Async client
For high-throughput callers, the async client uses the same surface area but yields:
import asyncio
from alterscope import AsyncAlterscopeClient
async def main():
async with AsyncAlterscopeClient(api_key="sk_live_...") as client:
async for opp in client.yield_opportunities.list_all(net_apy_min=20):
print(f"{opp.name}: {opp.apy.net}%")
asyncio.run(main())
Provenance
Every release of the SDK ships a PROVENANCE.md recording the OpenAPI SHA-256 it was generated from, plus the generator version. If the SDK and the API ever drift, that file tells you which side is stale.
WebSocket and webhooks
See the full Python quickstart for WebSocket subscription, webhook signature verification, retry behavior, and error handling.
Source
Issue tracker and source: github.com/alterscope/alterscope-python.