feat: add default quote currencies for USDC/USD-quoted connectors#175
Open
fengtality wants to merge 4 commits into
Open
feat: add default quote currencies for USDC/USD-quoted connectors#175fengtality wants to merge 4 commits into
fengtality wants to merge 4 commits into
Conversation
Balance valuation falls back to fetching TOKEN-<default_quote> from the exchange when the rate oracle has no rate. The global default is USDT, which fails on exchanges that don't list USDT pairs, leaving tokens priced at 0 (e.g. BP on Backpack showed $0 and was hidden from portfolio views). Add entries for connectors whose markets quote in USDC (backpack, backpack_perpetual, cube, derive, derive_perpetual, dexalot, vertex, aevo_perpetual, pacifica_perpetual) and USD (dydx_v4_perpetual, decibel_perpetual, architect_perpetual), verified against each connector's pair construction in hummingbot. Co-Authored-By: Claude Fable 5 <[email protected]>
Binance's API returns HTTP 451 from geo-restricted locations, which silently breaks token valuation and anonymized-metrics volume conversion on fresh installs. Gate.io is accessible globally and lists the same USDT conversion pairs. Co-Authored-By: Claude Fable 5 <[email protected]>
The template always ships with an explicit rate_oracle_source, so the code-level defaults never apply on real installs — the shipped value must change too. Co-Authored-By: Claude Fable 5 <[email protected]>
Aligns the API model default with the conf template and startup fallbacks. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes for portfolio valuation and rate conversion on fresh / geo-restricted installs.
1. Default quote currencies for USDC/USD-quoted connectors
Token balance valuation in
AccountsServicefalls back to fetchingTOKEN-<default_quote>last-traded price from the exchange when the RateOracle has no rate forTOKEN-USDT. The global default quote is USDT, which fails on exchanges that don't list USDT pairs — the price resolves to 0 and the token is hidden from portfolio views.Example: BP holdings on Backpack showed
price: 0.0, value: 0.0because the fallback requestedBP-USDT, which doesn't exist on Backpack (it listsBP-USDC).Added
default_quotesentries, verified against each connector's trading-pair construction in hummingbot:pacifica_perpetual_web_utilshardcodesquote = "USDC")Intentionally excluded:
grvt_perpetual,injective_v2,evedex_perpetual— USDT-quoted in hummingbot (EVEDEX's connector maps its native-USDinstruments to-USDTpairs)btc_markets(AUD),ndax(CAD),foxbit(BRL) — the fallback price is consumed as a USD value, so fiat quotes would mis-state portfolio value by the FX ratebybit_perpetual—BTC-USDis the inverse contract; linear markets are USDT2. Default rate oracle source: binance → gate_io
Binance's API returns HTTP 451 from geo-restricted locations (US and others), which silently breaks token valuation and the anonymized-metrics volume conversion on fresh installs — every oracle request fails and tokens are valued at 0. Gate.io is accessible globally and lists the same USDT conversion pairs. Changed the shipped
bots/credentials/master_account/conf_client.ymltemplate (the always-present explicit value) plus the fallback defaults inmain.pystartup androuters/rate_oracle.py; explicitrate_oracle_sourcesettings inconf_client.ymlare unaffected.Test plan
BP-USDC(price: 0.268, value: $260) instead of 0, and appears in portfolio views.🤖 Generated with Claude Code