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

    Interface TradeResult

    Trade execution result.

    Contains the outcome of a trade execution attempt, including success status, order details, and error information if applicable.

    // Successful trade
    const success: TradeResult = {
    success: true,
    orderId: 'ORD123456',
    symbol: 'AAPL.US',
    side: 'buy',
    volume: 100,
    price: 150.25
    };

    // Failed trade
    const failure: TradeResult = {
    success: false,
    symbol: 'INVALID',
    side: 'buy',
    error: 'Symbol not found'
    };
    interface TradeResult {
        error?: string;
        orderId?: string;
        price?: number;
        side: "buy" | "sell";
        success: boolean;
        symbol: string;
        volume?: number;
    }
    Index

    Properties

    error?: string

    Error message if trade failed

    orderId?: string

    Order ID if trade was successful

    price?: number

    Execution price

    side: "buy" | "sell"

    Trade side (buy/sell)

    success: boolean

    Whether trade was executed successfully

    symbol: string

    Symbol that was traded

    volume?: number

    Volume traded