Skip to content

(feat) price Gateway DEX tokens via GeckoTerminal, fall back to Gateway - #189

Closed
cardosofede wants to merge 1 commit into
mainfrom
feat/add_tickers_endpoint
Closed

(feat) price Gateway DEX tokens via GeckoTerminal, fall back to Gateway#189
cardosofede wants to merge 1 commit into
mainfrom
feat/add_tickers_endpoint

Conversation

@cardosofede

Copy link
Copy Markdown
Contributor

Add a GeckoTerminal price source that batch-fetches USD prices for on-chain tokens by contract address (up to 30 per call) instead of one Gateway quote_swap per token, so DEX holdings can be priced at a polling cadence like CEX tickers. Maps the Gateway chain-network id to GeckoTerminal's network id, resolves held symbols to addresses via the Gateway token list (cached per network), and maps results back to symbols (handling both Solana and EVM address casing).

_fetch_gateway_prices_immediate now tries GeckoTerminal first and publishes covered prices into the shared pool, falling back to Gateway get_price only for tokens GeckoTerminal cannot price. The dependency is imported lazily so the app still runs (Gateway-only) if geckoterminal-py is not installed, and the HTTP client is closed on shutdown.

Add a GeckoTerminal price source that batch-fetches USD prices for on-chain
tokens by contract address (up to 30 per call) instead of one Gateway
quote_swap per token, so DEX holdings can be priced at a polling cadence like
CEX tickers. Maps the Gateway chain-network id to GeckoTerminal's network id,
resolves held symbols to addresses via the Gateway token list (cached per
network), and maps results back to symbols (handling both Solana and EVM
address casing).

_fetch_gateway_prices_immediate now tries GeckoTerminal first and publishes
covered prices into the shared pool, falling back to Gateway get_price only for
tokens GeckoTerminal cannot price. The dependency is imported lazily so the app
still runs (Gateway-only) if geckoterminal-py is not installed, and the HTTP
client is closed on shutdown.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cardosofede cardosofede closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant