order_option_limit
Places a limit order for options.
Syntax
Fields
Description
side(str)
'buy' or 'sell'
symbol(str)
Symbol of asset
quantity(float)
Quantity to buy or sell
limit_price(float)
Limit price
option_type(str)
'call' or 'put'
exp_date(dt.datetime)
Expiration date
strike(float)
Strike price
in_force(str)
'gtc' by default
def order_option_limit(
self,
side: str,
symbol: str,
quantity: float,
limit_price: float,
option_type: str,
exp_date: dt.datetime,
strike: float,
in_force: str = "gtc",
) -> Dict[str, Any]:
Returns
Returns a dictionary with the following keys and values:
order_id
: ID of ordersymbol
: Symbol of asset
Raises an exception if order fails.
Raises
- A
NotImplementedError
is raised if the method is not supported.