π Glossary¶
Quick Cheat Sheet¶
Term | Example | Meaning |
---|---|---|
Symbol | EURUSD , XAUUSD |
Trading instrument identifier. |
Lot | 1.00 β usually 100,000 units |
Standard trade size. |
Volume | 0.10 , 2.50 |
Lots to trade (can be fractional). |
SL | 1.09500 |
Stop Loss β protective exit level. |
TP | 1.10500 |
Take Profit β target exit level. |
Ticket | 12345678 |
Unique order/position/deal ID (uint64 in most RPCs). |
Digits | 5 |
Quote precision; e.g., 1.23456 for 5 digits. |
Point | 0.00001 (EURUSD) |
Smallest price step for the symbol. |
Pip | 0.0001 (most FX majors) |
Conventional 1 Β«pipΒ» (may differ from point ). |
Margin | 100.00 |
Funds locked for open exposure. |
Equity | 1000.00 |
Balance Β± floating P/L. |
Free Margin | 900.00 |
Equity β Margin. |
Leverage | 1:500 |
Borrowed funds ratio. |
Market Watch | selected symbols in the terminal | The watchlist used by selected_only=True in some RPCs. |
DOM/Book | Market Depth | Levelβ2 price ladder; see Market Book methods. |
Enum | BMT5_ENUM_* , MRPC_ENUM_* |
Stronglyβtyped constants β no Β«magic numbersΒ». |
Retcode | 10009 , TRADE_RETCODE_DONE |
Trade server return code (see error mapping). |
Deadline | now() + 3s |
Perβcall absolute deadline β turned into gRPC timeout. |
Cancellation | asyncio.Event() |
Cooperative stop for retry/stream wrappers. |
Stream | on_trade() , on_symbol_tick() |
Longβlived server push (events until cancelled). |
π Order & Position Lifecycle¶
βββββββββββββββ
β New Order β (market or pending)
ββββββββ¬βββββββ
β
β executed β DEAL_ADD (may create/affect POSITION)
βΌ
βββββββββββββββ
β Opened β (POSITION with floating P/L)
βββββ¬ββββββ¬ββββ
SL TP
β β
βΌ βΌ
βββββββββββββββ pending order can be
β Closed β ββββ deleted/cancelled before fill
βββββββββββββββ
MT5 note: in hedging mode multiple positions per symbol can coexist; in netting β one net position per symbol.
π§βπ» Account Terms¶
- Login / Server β broker account ID and server name.
-
Balance / Equity / Margin / Free β see cheat sheet; numbers come from:
- Currency Digits β use
ACCOUNT_CURRENCY_DIGITS
(integer) to format money correctly.
π Market Info Terms¶
-
Symbol Inventory β size & presence checks:
- symbol_exist.md
- symbol_name.md
-
Properties β double/int/string getters & bulk params:
- symbol_info_integer.md
- symbol_info_string.md
-
Quotes & Sessions β tick snapshot and trading/quote sessions:
- symbol_info_session_quote.md
-
Margin model β perβorder type margin rate & calc helpers:
- order_calc_margin.md
-
Market Book (DOM) β subscribe/read/release:
- market_book_get.md
- market_book_release.md
π¦ Orders & History Terms¶
-
Live snapshot
-
opened_orders_tickets.md (IDsβonly)
-
History
-
order_history.md (orders + deals)
-
Count
π RPC & Streaming Terms¶
-
Unary RPC β one request β one reply; returns
*.Data
payload already unwrapped. -
Streaming RPC β server pushes events until you cancel:
- on_trade.md
- on_trade_transaction.md
- on_position_profit.md
-
Deadline & Cancellation β pass
deadline
(to set timeout) andcancellation_event
(to stop cleanly).
π‘οΈ Errors & Codes¶
- gRPC transport β timeouts, unavailables; wrappers autoβretry via
execute_with_reconnect(...)
. - Trade retcodes β see numeric+string mapping in
package/MetaRpcMT5/mrpc_mt5_error_pb2.py
and docs fororder_*
/on_trade_transaction
. - Validation β prefer enums over raw ints/strings to avoid typos.
β Oneβpage Summary¶
- Account β who you are & your limits.
- Market Info β what you can trade and how itβs specified.
- Orders/History β whatβs live & what happened before.
- RPC β unary vs streaming, with deadlines & cancellation.
- Errors β retcodes & transport issues, surfaced cleanly by the SDK.