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

    Interface INewMarketOrder

    Market order definition for WebSocket trading.

    Represents a complete market order with instrument, size, direction, and optional stop loss/take profit levels.

    const buyOrder: INewMarketOrder = {
    instrumentid: 12345,
    size: { volume: { value: 100, scale: 0 } },
    side: Xs6Side.BUY,
    stoploss: { price: { value: 250, scale: 2 } }, // $2.50
    takeprofit: { price: { value: 280, scale: 2 } } // $2.80
    };
    interface INewMarketOrder {
        instrumentid: number;
        side: Xs6Side;
        size: ISize;
        stoploss?: IStopLossInput;
        takeprofit?: ITakeProfitInput;
    }
    Index

    Properties

    instrumentid: number

    Instrument ID from symbol search

    side: Xs6Side

    Trade side (buy/sell)

    size: ISize

    Trade size (volume or amount)

    stoploss?: IStopLossInput

    Optional stop loss configuration

    takeprofit?: ITakeProfitInput

    Optional take profit configuration