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

    Interface TradeOptions

    Simplified trade options for high-level API.

    Provides an easy-to-use interface for common trading parameters without dealing with the low-level scaled price representations.

    const options: TradeOptions = {
    stopLoss: 2.50, // Stop at $2.50
    takeProfit: 3.00, // Take profit at $3.00
    trailingStop: 10 // 10-pip trailing stop
    };

    await client.buy('AAPL.US', 100, options);
    interface TradeOptions {
        amount?: number;
        stopLoss?: number;
        takeProfit?: number;
        trailingStop?: number;
    }
    Index

    Properties

    amount?: number

    Trade amount in currency (alternative to volume)

    stopLoss?: number

    Stop loss price (as decimal number)

    takeProfit?: number

    Take profit price (as decimal number)

    trailingStop?: number

    Trailing stop distance in pips