# GetMarketInformation

Returns specific market information for a symbol.

## Syntax

```typescript
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

```typescript
// Get current bid price
const bid = this.api.GetMarketInformation('EURUSD', this.api.APIConstants.PRICE_TYPE_BID)
console.log(`Current bid: ${bid}`)

// Get symbol point value
const point = this.api.GetMarketInformation('EURUSD', this.api.APIConstants.SYMBOL_POINT_VALUE)
console.log(`Point value: ${point}`)

// Get decimal places
const digits = this.api.GetMarketInformation('EURUSD', this.api.APIConstants.SYMBOL_DECIMAL_PLACES)
console.log(`Decimal places: ${digits}`)

// Get spread in points
const spread = this.api.GetMarketInformation('EURUSD', this.api.APIConstants.SYMBOL_SPREAD_POINTS)
console.log(`Spread in points: ${spread}`)

// Get lot size
const lotSize = this.api.GetMarketInformation('EURUSD', this.api.APIConstants.TRADE_LOT_SIZE)
console.log(`Lot size: ${lotSize}`)
```
