- initialize
- login
- shutdown
- version
- last_error
- account_info
- terminal_info
- symbols_total
- symbols_get
- symbol_info
- symbol_info_tick
- symbol_select
- market_book_add
- market_book_get
- market_book_release
- copy_rates_from
- copy_rates_from_pos
- copy_rates_range
- copy_ticks_from
- copy_ticks_range
- orders_total
- orders_get
- order_calc_margin
- order_calc_profit
- order_check
- order_send
- positions_total
- positions_get
- history_orders_total
- history_orders_get
- history_deals_total
- history_deals_get
orders_get
Get active orders with the ability to filter by symbol or ticket. There are three call options.
Call without parameters. Return active orders on all symbols.
orders_get() |
Call specifying a symbol active orders should be received for.
orders_get( |
Call specifying a group of symbols active orders should be received for.
orders_get( |
Call specifying the order ticket.
orders_get(
|
symbol="SYMBOL"
[in] Symbol name. Optional named parameter. If a symbol is specified, the ticket parameter is ignored.
group="GROUP"
[in] The filter for arranging a group of necessary symbols. Optional named parameter. If the group is specified, the function returns only active orders meeting a specified criteria for a symbol name.
ticket=TICKET
[in] Order ticket (ORDER_TICKET). Optional named parameter.
Return Value
Return info in the form of a named tuple structure (namedtuple). Return None in case of an error. The info on the error can be obtained using last_error().
Note
The function allows receiving all active orders within one call similar to the OrdersTotal and OrderSelect tandem.
The group parameter allows sorting out orders by symbols. '*' can be used at the beginning and the end of a string.
The group parameter may contain several comma separated conditions. A condition can be set as a mask using '*'. The logical negation symbol '!' can be used for an exclusion. All conditions are applied sequentially, which means conditions of including to a group should be specified first followed by an exclusion condition. For example, group="*, !EUR" means that orders for all symbols should be selected first and the ones containing "EUR" in symbol names should be excluded afterwards.
Example:
import MetaTrader5 as mt5
|
See also