ezyquant_execution.context.ExecuteContextSymbol#
- class ezyquant_execution.context.ExecuteContextSymbol(settrade_user: Investor | MarketRep, account_no: str, symbol: str, pin: str | None = None, signal: Any | None = None)#
Execute context.
- Parameters:
settrade_user (Union[Investor, MarketRep]) – Settrade user
account_no (str) – Account number
symbol (str) – Selected symbol
pin (Optional[str], optional) – PIN. Only for investor.
signal (Any, optional) – Signal, by default None
ExecuteContextSymbol.Symbol
(symbol)ExecuteContextSymbol.buy
(volume[, price])Place buy order.
ExecuteContextSymbol.buy_pct_port
(pct_port, ...)Buy from the percentage of the portfolio.
ExecuteContextSymbol.buy_value
(value, **kwargs)Buy from the given value.
Cancel all buy orders.
ExecuteContextSymbol.cancel_orders
([condition])Cancel orders.
Cancel all orders with price.
Cancel all sell orders.
Get account info.
ExecuteContextSymbol.get_orders
([condition])Get orders.
Get portfolio of the symbol.
Get portfolios.
Get quote symbol.
ExecuteContextSymbol.get_trades
([condition])Get trades.
Check if the line available is sufficient for buy order.
Check if the volume is sufficient for sell order.
ExecuteContextSymbol.max_buy_volume
([price])Get maximum buy volume.
Get maximum sell volume.
Unrealized Percent profit.
ExecuteContextSymbol.place_order
(side, volume)Place order.
ExecuteContextSymbol.sell
(volume[, price])Place sell order.
ExecuteContextSymbol.sell_pct_port
(pct_port, ...)Sell from the percentage of the portfolio.
ExecuteContextSymbol.sell_value
(value, **kwargs)Sell from the given value.
Buy/Sell to make the current position reach the target percentage of the portfolio.
ExecuteContextSymbol.target_value
(value, ...)Buy/Sell to make the current position reach the target value.
Actual volume.
Best ask price.
Best bid price.
Line Available.
Cash Balance.
Cost price.
Cost value.
Current volume.
Line Available.
Market price.
Market value of symbol in portfolio.
Sum of all pending order value.
Total portfolio value.
Unrealized Profit (THB).
Sum of all stock cost value in portfolio.
Sum of all stock market value in portfolio.
Current timestamp.
Actual volume.