GetMarketInformation

Returns specific market information for a symbol.

Syntax

GetMarketInformation(symbol: string, type: number, positionType?: TTradePositionType): number

Parameters

  • symbol: string - The symbol to get information for

  • type: number - The type of information to retrieve

  • positionType: TTradePositionType - Optional. The position type for margin-related information

Return Value

Returns a number representing the requested market information.

Available Information Types

Constant
Description

PRICE_TYPE_LOW

Lowest price

PRICE_TYPE_HIGH

Highest price

PRICE_TYPE_BID

Current bid price

PRICE_TYPE_ASK

Current ask price

SYMBOL_POINT_VALUE

Point value

SYMBOL_DECIMAL_PLACES

Number of decimal places

SYMBOL_SPREAD_POINTS

Current spread in points

TRADE_STOP_LEVEL

Stop level in points

TRADE_LOT_SIZE

Standard lot size

SYMBOL_TICK_VALUE

Tick value

SYMBOL_TICK_SIZE

Tick size

SWAP_LONG_VALUE

Long position swap value

SWAP_SHORT_VALUE

Short position swap value

ORDER_STARTING_MODE

Order starting mode

ORDER_EXPIRATION_MODE

Order expiration mode

TRADING_PERMISSION_STATUS

Trading permission status (1 = allowed, 0 = not)

TRADE_MIN_LOT

Minimum lot size

TRADE_LOT_STEP

Lot size step

TRADE_MAX_LOT

Maximum lot size

SWAP_CALCULATION_TYPE

Swap calculation type

PROFIT_CALCULATION_MODE

Profit calculation mode

MARGIN_CALCULATION_MODE

Margin calculation mode

MARGIN_INITIAL_VALUE

Initial margin value (requires positionType)

MARGIN_HEDGED_VALUE

Hedged margin value

MARGIN_REQUIRED_VALUE

Required margin value

TRADE_CLOSEBY_ENABLED

Close by allowed status (1 = allowed, 0 = not)

Description

The GetMarketInformation method retrieves specific market information for a given symbol. The type parameter determines what information is returned.

Example

Last updated