← Back to home
MT5 BINANCE / PRICE PRECISION

Binance futures price precision | MQL guide

SYMBOL_DIGITS · NormalizeDouble · Format order prices correctly

Understanding Binance futures price precision

Each Binance contract has its own price precision requirements. Correct formatting is important for order submission.

What is price precision?

Each contract has its own precision requirements. For example, the USDⓈ-M contract ETHUSDT is shown here with two decimal places, while the BTCUSDT example uses one. Other contracts may require three or four decimal places.

Important reminder — Order prices must satisfy the contract’s requirements. Invalid price precision may cause the API to reject the order.

ETHUSDT price precision example

The screenshot below illustrates ETHUSDT USDⓈ-M futures using two decimal places:

MT5 Binance guide screenshot
ETHUSDT USDⓈ-M futures — Two decimal places

Read price precision in MQL

Use the MT5 SymbolInfoInteger function with SYMBOL_DIGITS to read the current symbol’s price precision:

// 获取当前图表合约的价格精度
long pricePrecision = SymbolInfoInteger(Symbol(), SYMBOL_DIGITS);

// 输出精度值,例如ETHUSDT返回2,BTCUSDT返回1
Print("当前合约价格精度: ", pricePrecision);

Normalize price precision with NormalizeDouble

Use the MQL NormalizeDouble function to round a calculated price to the symbol’s specified number of decimal places:

// 获取价格精度
long pricePrecision = SymbolInfoInteger(Symbol(), SYMBOL_DIGITS);

// 假设策略计算出目标价格为 last + 100
double rawPrice = last + 100;

// 将价格规范化为合约要求的精度
double normalizedPrice = NormalizeDouble(rawPrice, (int)pricePrecision);

// 使用规范化后的价格下单
// 例如:发送限价单时使用 normalizedPrice

Order preparation example:

// 获取当前合约价格精度
long pricePrecision = SymbolInfoInteger(_Symbol, SYMBOL_DIGITS);

// 获取当前市价
double currentPrice = SymbolInfoDouble(_Symbol, SYMBOL_BID);

// 计算目标价格(例如高于市价100个最小变动单位)
double targetPrice = currentPrice + 100 * SymbolInfoDouble(_Symbol, SYMBOL_POINT);

// 规范化价格
double orderPrice = NormalizeDouble(targetPrice, (int)pricePrecision);

// 下单(示例使用限价买单)
MqlTradeRequest request = {0};
request.action = TRADE_ACTION_PENDING;
request.symbol = _Symbol;
request.price = orderPrice;  // 使用规范化后的价格
// ... 其他参数设置

Example USDⓈ-M futures price precisions

BTCUSDT

Price precision: 1 decimal place (0.1)

Example: 65432.1

ETHUSDT

Price precision: 2 decimal places (0.01)

Example: 3456.78

BNBUSDT

Price precision: 2 decimal places (0.01)

Example: 567.89

SOLUSDT

Price precision: 3 decimal places (0.001)

Example: 123.456

DOGEUSDT

Price precision: 5 decimal places (0.00001)

Example: 0.12345

PEPEUSDT

Price precision: 8 decimal places (0.00000001)

Example: 0.00001234

* Binance may change contract precision. Read SYMBOL_DIGITS dynamically rather than hard-coding the values shown in these examples.

Practical price precision example

The screenshot below shows how to inspect and use price precision in MT5:

MT5 Binance guide screenshot
Read precision with SymbolInfoInteger and normalize prices with NormalizeDouble

Handle Binance contract price precision with MT5 + MQL API

Read precision dynamically with SYMBOL_DIGITS and normalize calculated prices with NormalizeDouble before submitting orders.

← Back to MT5 Binance