Skip to content

Conversation

@TaprootFreak
Copy link
Collaborator

@TaprootFreak TaprootFreak commented Jan 19, 2026

Summary

  • Adds support for MEXC Assessment Zone trading pairs (specifically ZCHF/USDT)
  • Makes getMarkets() protected in ExchangeService to allow subclass overrides
  • Injects Assessment Zone pairs into all required caches:
    • Service-level markets array (for getTradePair(), getPrecision())
    • ccxt's exchange.markets (for fetchOrderBook(), createOrder())
    • ccxt's exchange.markets_by_id (for order response parsing)
    • ccxt's exchange.symbols (for symbol validation)

Background

ZCHF/USDT was moved to MEXC's Assessment Zone around 08.01.2026. Assessment Zone pairs:

  • Are hidden from the public API (fetchMarkets() doesn't return them)
  • Require API key whitelisting from MEXC Support to trade

Technical Details

ccxt validates symbols at multiple levels:

  1. Our service uses getMarkets() for pair validation and precision lookup
  2. ccxt internally uses exchange.markets for methods like fetchOrderBook()
  3. ccxt uses exchange.markets_by_id when parsing order responses (ID → symbol mapping)

Without injecting into all three, trading would fail at different stages.

Test plan

  • Request API whitelisting from MEXC Support via https://t.me/MEXCAPIsupport
  • After whitelisting, verify ZCHF/USDT trading works
  • Re-enable Rule 308 (MEXC/ZCHF) from Paused to Active

ZCHF/USDT was moved to MEXC's Assessment Zone, which hides it from
the public API. This change:

- Makes getMarkets() protected in ExchangeService to allow overrides
- Adds Assessment Zone pair definitions to MexcService
- Injects ZCHF/USDT into the markets list for trading

Note: Requires API key whitelisting from MEXC Support to actually
trade Assessment Zone pairs.
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

⚠️ Non-Conventional Commits (3)

The following commits don't follow conventional commit format:

  • f2fc82d Add MEXC Assessment Zone trading pair support
  • ff2ea26 Fix: Also inject Assessment Zone pairs into ccxt's internal cache
  • 08b85c1 Fix: Also inject into markets_by_id for order response parsing

Expected: type(scope): description
Types: feat, fix, refactor, test, ci, docs, chore, perf, style, build, revert

ccxt methods like fetchOrderBook() and createOrder() validate symbols
against the exchange's internal markets cache, not our service-level
cache. Without this fix, ccxt would reject ZCHF/USDT with "symbol not
found" even though getTradePair() succeeds.
When ccxt parses order responses, it may use markets_by_id to look up
the market by its exchange-specific ID (e.g., 'ZCHFUSDT'). Without this,
order.symbol might be the ID instead of the symbol, causing getPrecision()
and other lookups to fail.
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.

2 participants