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

    Interface InstrumentSearchResult

    Instrument search result.

    Simplified instrument information returned from search operations. Contains essential details needed for trading and display.

    // Search for Apple stock
    const results = await client.searchInstrument('Apple');
    const apple = results.find(r => r.symbol === 'AAPL.US');

    if (apple) {
    console.log(`Found: ${apple.name} (${apple.symbol})`);
    console.log(`Description: ${apple.description}`);
    console.log(`Symbol Key: ${apple.symbolKey}`);

    // Use for trading
    await client.buy(apple.symbol, 100);
    }
    interface InstrumentSearchResult {
        assetClass: string;
        description: string;
        instrumentId: number;
        name: string;
        symbol: string;
        symbolKey: string;
    }
    Index

    Properties

    assetClass: string

    Asset class name

    description: string

    Description text

    instrumentId: number

    Instrument ID for WebSocket commands

    name: string

    Display name

    symbol: string

    Symbol name for trading

    symbolKey: string

    Full symbol key in format {assetClassId}{symbolName}{groupId}