xtb-api-unofficial - v0.1.0
    Preparing search index...

    Interface IPrice

    Price representation with value and scale.

    XTB uses scaled integers for precise price representation. Actual price = value × 10^(-scale)

    // Price of $2.62
    const price: IPrice = { value: 262, scale: 2 };
    const actualPrice = price.value * Math.pow(10, -price.scale); // 2.62
    interface IPrice {
        scale: number;
        value: number;
    }
    Index

    Properties

    Properties

    scale: number

    Decimal places (negative power of 10)

    value: number

    Price value as scaled integer