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
Tradier order.average_fill_price and order.get_fill_price() are both 0.0 #436
Comments
What broker is this for? This feature does not currently work for every
broker, but can be added fairly easily if you want to add a pull request
Robert Grzesik 347-635-3416
…On Mon, Apr 29, 2024 at 5:31 PM exuvia ***@***.***> wrote:
When I query the fill price of an order that was filled in a previous run
of the strategy, both the average_fill_price and get_fill_price return
zeros.
Steps to reproduce:
1. Place an options put order on tradier
2. stop the strategy after the order is filled
3. re run the strategy and attempt to get the fill price
positions = self.get_positions()
put_position = None
for position in positions:
if position.asset.right == "PUT":
self.log_message(f"list of put position orders {position.orders}")
for put_order in position.orders:
self.log_message(f"PUT: average fill price {put_order.avg_fill_price}
get_fill_price {put_order.get_fill_price()} transactions
{put_order.transactions}")
logs:
list of put position orders [market order of | 16.0 SPY 2024-04-29 PUT
509.0 buy | with status fill]
PUT: average fill price 0.0 get_fill_price 0.0 transactions
[Transaction(quantity=Decimal('16.0'), price=0.0)]
—
Reply to this email directly, view it on GitHub
<#436>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIYQK3J2AYWTKSICPVEPHLY723Z3AVCNFSM6AAAAABG7CUSQ6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3TAMBRHE4DMMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
The broker is tradier, mentioned in the title. Can you point me to where this happens in the code? I will fix and open a PR. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I query the fill price of an order that was filled in a previous run of the strategy, both the average_fill_price and get_fill_price return zeros.
Steps to reproduce:
positions = self.get_positions()
put_position = None
for position in positions:
if position.asset.right == "PUT":
self.log_message(f"list of put position orders {position.orders}")
for put_order in position.orders:
self.log_message(f"PUT: average fill price {put_order.avg_fill_price} get_fill_price {put_order.get_fill_price()} transactions {put_order.transactions}")
logs:
list of put position orders [market order of | 16.0 SPY 2024-04-29 PUT 509.0 buy | with status fill]
PUT: average fill price 0.0 get_fill_price 0.0 transactions [Transaction(quantity=Decimal('16.0'), price=0.0)]
The text was updated successfully, but these errors were encountered: