Skip to content
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

Open
exuvia opened this issue Apr 29, 2024 · 2 comments
Open

Comments

@exuvia
Copy link

exuvia commented Apr 29, 2024

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)]

@grzesir
Copy link
Contributor

grzesir commented Apr 30, 2024 via email

@exuvia
Copy link
Author

exuvia commented Apr 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants