Function formatPrice

  • Formats a price value according to exchange rules.

    Uses the exchange's formatPrice implementation for proper decimal places.

    Parameters

    • symbol: string

      Trading pair symbol (e.g., "BTCUSDT")

    • price: number

      Raw price value

    Returns Promise<string>

    Promise resolving to formatted price string

    const formatted = await formatPrice("BTCUSDT", 50000.123456);
    console.log(formatted); // "50000.12"