Skip to content

Commit

Permalink
Cashman: use ask to buy, bid to sell
Browse files Browse the repository at this point in the history
  • Loading branch information
brndnmtthws committed Jul 27, 2023
1 parent 41157ee commit 625c323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thetagang/portfolio_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@ def make_order() -> tuple[Optional[Ticker], Optional[LimitOrder]]:
)

amount = cash_balance - target_cash_balance
price = ticker.ask
price = ticker.ask if amount > 0 else ticker.bid
qty = amount // price

if qty > 0:
Expand Down

0 comments on commit 625c323

Please sign in to comment.