MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / parseBinanceSymbol

Function parseBinanceSymbol

src/lib/resolutionSources.ts:34–38  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

32// ── Phase 1: Price feed domain handlers ──
33
34function parseBinanceSymbol(url: string): string | null {
35 // https://www.binance.com/en/trade/BTC_USDT → BTCUSDT
36 const match = url.match(/\/trade\/([\w]+)_([\w]+)/i);
37 return match ? `${match[1]}${match[2]}`.toUpperCase() : null;
38}
39
40function parseChainlinkPair(url: string): string | null {
41 // https://data.chain.link/streams/btc-usd → BTCUSDT (normalized to Binance format)

Callers 1

parseResolutionSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected