Bot & Automation

Treding Forex Ai

/root/hermes-projects/Treding Forex Ai

dist/src/constants/markets.js text
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MARKET_SYMBOLS = void 0;
exports.findMarketSymbol = findMarketSymbol;
exports.detectMarketSymbolFromText = detectMarketSymbolFromText;
exports.MARKET_SYMBOLS = [
    {
        code: "EURUSD",
        label: "EUR/USD",
        category: "forex",
        aliases: ["EUR/USD", "EU"],
        pipSize: 0.0001,
        pipValuePerLot: 10,
        minLot: 0.01,
        maxLot: 50,
        defaultSpreadPips: 1.2
    },
    {
        code: "GBPUSD",
        label: "GBP/USD",
        category: "forex",
        aliases: ["GBP/USD", "GU"],
        pipSize: 0.0001,
        pipValuePerLot: 10,
        minLot: 0.01,
        maxLot: 50,
        defaultSpreadPips: 1.6
    },
    {
        code: "USDJPY",
        label: "USD/JPY",
        category: "forex",
        aliases: ["USD/JPY", "UJ"],
        pipSize: 0.01,
        pipValuePerLot: 9,
        minLot: 0.01,
        maxLot: 50,
        defaultSpreadPips: 1.4
    },
    {
        code: "GBPJPY",
        label: "GBP/JPY",
        category: "forex",
        aliases: ["GBP/JPY", "GJ"],
        pipSize: 0.01,
        pipValuePerLot: 9,
        minLot: 0.01,
        maxLot: 30,
        defaultSpreadPips: 2.3
    },
    {
        code: "AUDUSD",
        label: "AUD/USD",
        category: "forex",
        aliases: ["AUD/USD", "AU"],
        pipSize: 0.0001,
        pipValuePerLot: 10,
        minLot: 0.01,
        maxLot: 50,
        defaultSpreadPips: 1.4
    },
    {
        code: "XAUUSD",
        label: "Gold / XAUUSD",
        category: "gold",
        aliases: ["XAU/USD", "XAUSD", "GOLD", "EMAS"],
        pipSize: 0.1,
        pipValuePerLot: 10,
        minLot: 0.01,
        maxLot: 20,
        defaultSpreadPips: 3.5
    },
    {
        code: "BTCUSD",
        label: "Bitcoin / BTCUSD",
        category: "crypto",
        aliases: ["BTC/USD", "BITCOIN", "BTC"],
        pipSize: 1.0,
        pipValuePerLot: 1,
        minLot: 0.01,
        maxLot: 10,
        defaultSpreadPips: 10.0
    }
];
function findMarketSymbol(input) {
    const normalized = input.toUpperCase().replace(/[^A-Z0-9]/g, "");
    return (exports.MARKET_SYMBOLS.find((symbol) => {
        const candidates = [symbol.code, symbol.label, ...symbol.aliases].map((value) => value.toUpperCase().replace(/[^A-Z0-9]/g, ""));
        return candidates.includes(normalized);
    }) ?? null);
}
function detectMarketSymbolFromText(text) {
    const normalized = text.toUpperCase().replace(/[^A-Z0-9 ]/g, " ");
    return (exports.MARKET_SYMBOLS.find((symbol) => {
        const candidates = [symbol.code, symbol.label, ...symbol.aliases].map((value) => value.toUpperCase().replace(/[^A-Z0-9]/g, ""));
        return candidates.some((candidate) => normalized.replace(/\s/g, "").includes(candidate));
    }) ?? null);
}