order_stock_limit

Places a limit order for stocks.

Syntax

Fields

Description

side(str)

'buy' or 'sell'

symbol(str)

Symbol of stock

quantity(float)

Quantity to buy or sell

limit_price(float)

Limit price

in_force(str)

'gtc' by default

extended(bool)

'False' by default

def order_stock_limit(
    self,
    side: str,
    symbol: str,
    quantity: float,
    limit_price: float,
    in_force: str = "gtc",
    extended: bool = False,
) -> Dict[str, Any]:

Returns

Returns a dictionary with the following keys and values:

Raises an exception if order fails.

Raises