TrailingStopOrder
added to stop ordersTargetOrder
added to stop ordersBracketOrder
removed from stop orders
StopOrder
andStopLimitOrder
model changed
- Kotak broker exchange_timestamp format handled correctly
- Finvasia broker exchange and broker timestamp format handled correctly
- Timestamp for kotak, finvasia brokers to be saved in db in expected format
close_all_positions
could take a symbol_transformer function to transform symbolsclose_all_positions
can take positions as an optional argument; this would help in passing select positions to square off instead of closing all positionsPegExisting
andPeqSequential
can now takemodify_args
to add any extra broker arguments needed when modifying orders
close_all_positions
to handle errors and valid quantity of any type- type conversion done for data received from broker
Finvasia
- #9 when an
Order
is added toCompoundOrder
add an id automatically if there is no id - #25
PegSequential
order lock mechanism now dependent onadd_lock
method for each order; so each order could have its own order lock.
- #15 do not update
Order
if orderis_done
(completed/rejected/canceled)
- tests improved for
Order
class
- Instrument master for broker
kotak
could be generated for any combination of columns modify
order could now take extra attributes to be passed on to broker- tests rewritten with
PurePath
and other refactoring, credits to @soumyarai2050 for pushing these changes
- Instrument master for broker
kotak
to handle strike prices till 3 decimal places (for currency strikes) modify_order
for brokerkotak
to correctly handle order types, especially MARKET
- TOTP authentication added to Finvasia broker
- TOTP autentication added to MasterTrust broker
- New
OrderStrategy
class added, an abstraction over CompoundOrder - OrderLock mechanism added to
Order
so that each order would have its own unique lock
This is a bug-fix version and enhancement version
- #20 You can now pass order arguments to
PegExisting
andPegSequential
- #18 timezone to default to local instead of UTC
- #11 pending quantity to be automatically updated
- CandleStick class added to models
- Cancel subsequent orders in
PegSequential
if one of the orders fail
is_done
method added toOrder
- returns True when the order is either complete or canceled or rejected.- cancel peg orders after expiry
order_cancel
not to be called when no order_id is None
- Extra order mappings for SLM and SLL added to finvasia broker
order_type
argument resolved for kotak broker
- Broker support added for finvasia
- New order type
PegSequential
added to peg orders in sequence
- Order Lock mechanism added
- ExistingPeg to check for time expiry before next peg
- ExistingPeg order added to peg existing orders
- Broker support added for kotak
- BREAKING CHANGE: Database structured changed. New keys added
- new multi module added for placing the same order for multiple clients
- #13 do not change existing timestamp fixed
- cloning an order creates a new timestamp instead of the original one
- keyword arguments passed to
modify
method to update order attributes and then modify the broker order - peg order attributes carried to child orders
- new peg order module added for peg orders.
- peg to market order added with basic arguments
- new models module added. This contains basic model for converting and manipulating data
- new utils module added that contains utility and helper functions. Functions added
- create_basic_positions_from_orders_dict
- dict_filter
- tick
- stop_loss_step_decimal
- mandatory arguments for order placement for zerodha broker added.
order_place, order_modify, order_cancel
would now add default arguments for the broker automatically (such as variety);you could override them with kwargs. - cover_orders function added to broker class, this checks for all valid orders and place stop loss in case of non-matching orders
- BREAKING CHANGE: Database model changed
Order, CompoundOrder
models changed from dataclass to pydantic models- database class changed to sqlite_utils from native python sqlite3 for better reading and writing, connection now returns
sqlite_utils.Database
instead ofsqlite3.Connection
. - #3
Order
could now be directly added using theadd
method and this inherits the sqlite3 database from the compound order if no connection is specified - #8 save method added to save orders to database in bulk
- #6 maximum limit for modifications to an order added
- close_all_positions bug fixed by changing status to upper case and including canceled and rejected orders in completed orders
- cancel_all_orders do not cancel already completed orders
_attrs
now made part of model instead of a property- tests updated to reflect the new database type
- modify order to accept any parameter
- save to database on execution
- fixes in brokers
- order arguments during execution in compound orders
- database support for saving orders added