Skip to content

Commit

Permalink
feat(trade-types): add support for sell
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Augusto de Oliveira committed Dec 19, 2024
1 parent 48cb3eb commit b578239
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tastytrade_ghostfolio/adapters/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
TransactionType,
)

TRADE_TYPE_MAPPING = {"Buy to Open": TransactionType.BUY}
TRADE_TYPE_MAPPING = {
"Buy to Open": TransactionType.BUY,
"Sell to Close": TransactionType.SELL,
}


def adapt_trades(trades: list[Transaction]) -> list[GhostfolioActivity]:
Expand Down

0 comments on commit b578239

Please sign in to comment.