-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test broker with multiple submit twap orders #1103
Comments
@samarth9008 can you please update the links, none of them are accessible |
@samarth9008 I looked into the code test_submit_twap_orders invokes get_test_broker to create a broker instance and function submit_twap_orders to submit the orders. |
Okay, lets do a draft PR with some architecture to have a better idea. Seems like going in a right direction. FYI @Sameep2808 |
Currently we only test our order submission using only one broker class calling submit twap orders once.
We want to create a test where we have 1 instance of broker and same instance will call submit twap orders twice. Trying to mimic what happens in the production trading
You can refer the test cases present in the below class to understand how to mock and run with one broker and one call to submit twap order function:
https://github.com/kaizen-ai/kaizenflow/blob/master/oms/broker/ccxt/test/test_ccxt_broker.py#L1768
Helper function which creates broker instance and calls 1 iteration of _submit_twap_orders:
https://github.com/kaizen-ai/kaizenflow/blob/master/oms/broker/ccxt/test/mock_exchange_test_case.py#L384
As from the above code you can understand how a broker object is created and
_submit_twap_orders
is awoked using solipsism loop.Now just like this we would like to have 2 calls to
_submit_twap_orders
inorder to test multiple order submission using one broker instance.The test will go in this file - https://github.com/kaizen-ai/kaizenflow/blob/master/oms/broker/ccxt/test/test_ccxt_broker.py
Lets start with proposing the plan and architecture and then we will move forward with actual testing. Feel free to ask any questions or provide your thoughts into it.
FYI @samarth9008
The text was updated successfully, but these errors were encountered: