Skip to content

Rate Oracle - ignores configured rate_source setting, defaults to Binance #127

@fengtality

Description

@fengtality

Bug Description

The rate oracle is not respecting the rate_source configuration in conf_client.yml. Even when rate_source is set to gate_io, the system still attempts to fetch rates from Binance.

Steps to Reproduce

  1. Set rate_source: gate_io in bots/credentials/master_account/conf_client.yml
  2. Run make run
  3. Observe error logs showing Binance rate source being used instead of Gate.io

Error Log

2026-02-06 07:23:17,279 - hummingbot.core.rate_oracle.sources.rate_source_base - ERROR - Unexpected error while retrieving rates from Binance. Check the log file for more info.
Traceback (most recent call last):
  File ".../hummingbot/core/rate_oracle/sources/binance_rate_source.py", line 54, in _get_binance_prices
    pairs_prices = await exchange.get_all_pairs_prices()
  ...
  File ".../hummingbot/core/web_assistant/rest_assistant.py", line 101, in execute_request_and_get_response
    raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
OSError: Error executing request GET https://api.binance.com/api/v3/ticker/bookTicker. HTTP status is 451. Error: {
  "code": 0,
  "msg": "Service unavailable from a restricted location according to 'b. Eligibility' in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error."
}

Expected Behavior

When rate_source: gate_io is configured, the rate oracle should use Gate.io for price fetching, not Binance.

Actual Behavior

The rate oracle ignores the rate_source configuration and defaults to using Binance, which fails with HTTP 451 for users in restricted locations.

Environment

  • Running via make run
  • Configuration file: bots/credentials/master_account/conf_client.yml

Additional Context

This is particularly problematic for users in regions where Binance is blocked (HTTP 451), as there's no way to switch to an alternative rate source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions