# MQL5 SymbolInfoInteger()

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfointeger, written from the same records as that page.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Returns one integer property of a symbol, such as its spread, or whether that spread floats.

- Function: `SymbolInfoInteger()`
- Interface: MQL5
- Group: Symbols and prices
- Status: verified. Source: [mql5.com](https://www.mql5.com/en/docs/marketinformation/symbolinfointeger), checked 2026-10-12.

This is an MQL5 function, not an HTTP endpoint. It has no method, no path and no address to send a request to: it runs inside the MetaTrader 5 terminal, in a program written in MQL5. It is in no OpenAPI file on this site and the request builder does not list it.

## Signature

The 2 forms of the call on the vendor's page, with the vendor's comments taken out.

```mql5
long SymbolInfoInteger(
  string name,
  ENUM_SYMBOL_INFO_INTEGER prop_id
)
```

```mql5
bool SymbolInfoInteger(
  string name,
  ENUM_SYMBOL_INFO_INTEGER prop_id,
  long& long_var
)
```

## Arguments

- `name` (type string, required): The symbol's name.
- `prop_id` (type ENUM_SYMBOL_INFO_INTEGER, required): Which property to return, as a value of the ENUM_SYMBOL_INFO_INTEGER enumeration.
- `long_var` (type long&, required): Only in the second form: the long variable that receives the value.

## Return value

- Type: `long, or bool in the second form`
- What comes back: The page gives two forms: one returns the value itself, the other returns true or false and writes the value into a variable passed by reference. On failure the page points to GetLastError() for the reason.

## Sample

Written by this site from the signature and arguments recorded on this page. It has not been run against a terminal, a server or an account, and the values in it are placeholders. It holds no credential and needs none: the program runs inside a terminal that is already logged in to an account. Nothing is entered on this site.

```mql5
void OnStart()
  {
   PrintFormat("spread %I64d points, floating: %s",SymbolInfoInteger(_Symbol,SYMBOL_SPREAD),SymbolInfoInteger(_Symbol,SYMBOL_SPREAD_FLOAT)?"yes":"no");
  }
```

## Related MQL5 functions: Symbols and prices

- [SymbolInfoDouble()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfodouble): Returns one floating point property of a symbol, such as its bid, its ask or its point size.
- [SymbolInfoString()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfostring): Returns one text property of a symbol, such as its description or its base and profit currencies.
- [SymbolInfoTick()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfotick): Writes the current prices of a symbol, with the time they were last updated, into an MqlTick structure.
- [SymbolName()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolname): Returns the name of the symbol at a place in the list of symbols.
- [SymbolSelect()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolselect): Adds a symbol to the Market Watch window, or removes it.
- [SymbolsTotal()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolstotal): Returns how many symbols are available: those selected in Market Watch, or all of them.

## More on MetaTrader 5

- [All MetaTrader 5 functions](https://openbrokerapi.com/platforms/metatrader-5/functions): 78 documented here, grouped by what they do.
- [Instrument search: the call at each API](https://openbrokerapi.com/endpoints/instrument-search): The same job at every broker and platform API recorded here, HTTP or not.
- [MetaTrader 5 API quickstart](https://openbrokerapi.com/platforms/metatrader-5/quickstart)
- [All MetaTrader 5 error codes](https://openbrokerapi.com/errors/mt5)
- [MetaTrader 5 API page](https://openbrokerapi.com/platforms/metatrader-5): The full record: access, authentication, limits and the source for each.

## Licence and how to cite

The records behind this page are all rights reserved. This file is the page itself, at its own address, in another format. It is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data. Quote from it with a link to the page.

Cite as: MQL5 SymbolInfoInteger(). Broker API Hub, https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfointeger, newest check 2026-10-12.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
