Skip to content

order

order_base

OrderBase

Base class for Regular Order / Bracket Order

cancel_order(self)

This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.

Source code in pyalgotrading/order/order_base.py
32
33
34
35
36
37
38
39
def cancel_order(self):
    """
    This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    Returns:

    """
    # This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    pass

exit_position(self)

This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.

Source code in pyalgotrading/order/order_base.py
23
24
25
26
27
28
29
30
def exit_position(self):
    """
    This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    Returns:

    """
    # This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    pass

get_order_status(self)

This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.

Source code in pyalgotrading/order/order_base.py
14
15
16
17
18
19
20
21
def get_order_status(self):
    """
    This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    Returns:

    """
    # This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    pass

place_order(self)

This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.

Source code in pyalgotrading/order/order_base.py
 5
 6
 7
 8
 9
10
11
12
def place_order(self):
    """
    This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    Returns:

    """
    # This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    pass

order_bracket_base

Class for Bracket Order

BuyOrderBracket

Class for Bracket Order Buy

__init__(self, instrument, order_code, order_variety, quantity, price=None, trigger_price=None, stoploss_trigger=None, target_trigger=None, trailing_stoploss_trigger=None) special

Init method that is used while creating an object of this class

Source code in pyalgotrading/order/order_bracket_base.py
53
54
55
56
57
58
def __init__(self, instrument, order_code, order_variety, quantity, price=None, trigger_price=None, stoploss_trigger=None, target_trigger=None, trailing_stoploss_trigger=None):
    """
    Init method that is used while creating an object of this class
    """
    super().__init__(instrument=instrument, order_transaction_type=BrokerOrderTransactionTypeConstants.BROKER_ORDER_TRANSACTION_TYPE_BUY, order_code=order_code, order_variety=order_variety, quantity=quantity, price=price,
                     trigger_price=trigger_price, stoploss_trigger=stoploss_trigger, target_trigger=target_trigger, trailing_stoploss_trigger=trailing_stoploss_trigger)

OrderBracketBase

Class for Bracket Order

__init__(self, instrument, order_transaction_type, order_code, order_variety, quantity, price=None, trigger_price=None, stoploss_trigger=None, target_trigger=None, trailing_stoploss_trigger=None) special

Init method that is used while creating an object of this class

Parameters:

Name Type Description Default
instrument

instrument key

required
order_transaction_type

order transaction type

required
order_code

bracket order

required
order_variety

market / limit / stoploss market / stoploss limit

required
quantity

order quantity

required
price

amount / value

None
trigger_price

trigger amount / value

None
stoploss_trigger

stoploss trigger amount / value

None
target_trigger

target trigger amount / value

None
trailing_stoploss_trigger

trailing stoploss trigger amount / value

None
Source code in pyalgotrading/order/order_bracket_base.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
def __init__(self, instrument, order_transaction_type, order_code, order_variety, quantity, price=None, trigger_price=None, stoploss_trigger=None, target_trigger=None, trailing_stoploss_trigger=None):
    """
    Init method that is used while creating an object of this class
    Args:
        instrument: instrument key
        order_transaction_type: order transaction type
        order_code: bracket order
        order_variety: market / limit / stoploss market / stoploss limit
        quantity: order quantity
        price: amount / value
        trigger_price: trigger amount / value
        stoploss_trigger: stoploss trigger amount / value
        target_trigger: target trigger amount / value
        trailing_stoploss_trigger: trailing stoploss trigger amount / value
    """
    self.instrument = instrument
    self.order_transaction_type = order_transaction_type
    self.order_type = BrokerOrderTypeConstants.BROKER_ORDER_TYPE_BRACKET
    self.order_code = order_code
    self.order_variety = order_variety
    self.quantity = quantity
    self.price = price
    self.trigger_price = trigger_price
    self.target_trigger = target_trigger
    self.stoploss_trigger = stoploss_trigger
    self.trailing_stoploss_trigger = trailing_stoploss_trigger

is_closed(self)

This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.

Returns:

Type Description

True / False

Source code in pyalgotrading/order/order_bracket_base.py
39
40
41
42
43
44
45
46
def is_closed(self):
    """
    This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    Returns:
        True / False
    """
    # This is a dummy function with a sole purpose of mimicing the signature of the actual function on the AlgoBulls platform, as described in the documentation.
    pass

SellOrderBracket

Class for Bracket Order Sell

__init__(self, instrument, order_code, order_variety, quantity, price=None, trigger_price=None, stoploss_trigger=None, target_trigger=None, trailing_stoploss_trigger=None) special

Init method that is used while creating an object of this class

Source code in pyalgotrading/order/order_bracket_base.py
65
66
67
68
69
70
def __init__(self, instrument, order_code, order_variety, quantity, price=None, trigger_price=None, stoploss_trigger=None, target_trigger=None, trailing_stoploss_trigger=None):
    """
    Init method that is used while creating an object of this class
    """
    super().__init__(instrument=instrument, order_transaction_type=BrokerOrderTransactionTypeConstants.BROKER_ORDER_TRANSACTION_TYPE_SELL, order_code=order_code, order_variety=order_variety, quantity=quantity, price=price,
                     trigger_price=trigger_price, stoploss_trigger=stoploss_trigger, target_trigger=target_trigger, trailing_stoploss_trigger=trailing_stoploss_trigger)

order_regular_base

Class for Regular Order

BuyOrderRegular

Class for Regular Order Buy

__init__(self, instrument, order_code, order_variety, quantity, price=None, trigger_price=None) special

Init method that is used while creating an object of this class

Source code in pyalgotrading/order/order_regular_base.py
38
39
40
41
42
43
def __init__(self, instrument, order_code, order_variety, quantity, price=None, trigger_price=None):
    """
    Init method that is used while creating an object of this class
    """
    super().__init__(instrument=instrument, order_transaction_type=BrokerOrderTransactionTypeConstants.BROKER_ORDER_TRANSACTION_TYPE_BUY, order_code=order_code, order_variety=order_variety, quantity=quantity, price=price,
                     trigger_price=trigger_price)

OrderRegularBase

Class for Regular Order

__init__(self, instrument, order_transaction_type, order_code, order_variety, quantity, price=None, trigger_price=None) special

Init method that is used while creating an object of this class

Parameters:

Name Type Description Default
instrument

instrument key

required
order_transaction_type

order transaction type

required
order_code

regular order

required
order_variety

market / limit / stoploss market / stoploss limit

required
quantity

order quantity

required
price

amount / value

None
trigger_price

trigger amount / value

None
Source code in pyalgotrading/order/order_regular_base.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def __init__(self, instrument, order_transaction_type, order_code, order_variety, quantity, price=None, trigger_price=None):
    """
    Init method that is used while creating an object of this class
    Args:
        instrument: instrument key
        order_transaction_type: order transaction type
        order_code: regular order
        order_variety: market / limit / stoploss market / stoploss limit
        quantity: order quantity
        price: amount / value
        trigger_price: trigger amount / value
    """
    self.instrument = instrument
    self.order_transaction_type = order_transaction_type
    self.order_type = BrokerOrderTypeConstants.BROKER_ORDER_TYPE_REGULAR
    self.order_code = order_code
    self.order_variety = order_variety
    self.quantity = quantity
    self.price = price
    self.trigger_price = trigger_price

SellOrderRegular

Class for Regular Order Buy

__init__(self, instrument, order_code, order_variety, quantity, price=None, trigger_price=None) special

Init method that is used while creating an object of this class

Source code in pyalgotrading/order/order_regular_base.py
50
51
52
53
54
55
def __init__(self, instrument, order_code, order_variety, quantity, price=None, trigger_price=None):
    """
    Init method that is used while creating an object of this class
    """
    super().__init__(instrument=instrument, order_transaction_type=BrokerOrderTransactionTypeConstants.BROKER_ORDER_TRANSACTION_TYPE_SELL, order_code=order_code, order_variety=order_variety, quantity=quantity, price=price,
                     trigger_price=trigger_price)

Last update:

Comments