diff --git a/src/book.py b/src/book.py index 51601ed4..f5e61b9a 100644 --- a/src/book.py +++ b/src/book.py @@ -79,6 +79,8 @@ def _read_binance(self, file_path: Path, version: int = 1) -> None: "Launchpool Interest": "StakingInterest", "Cash Voucher distribution": "Airdrop", "Super BNB Mining": "StakingInterest", + "Margin loan": "MarginBuy", + "Margin Repayment": "MarginSell", "Liquid Swap add": "CoinLend", "Liquid Swap remove": "CoinLendEnd", "POS savings interest": "StakingInterest", @@ -143,7 +145,7 @@ def _read_binance(self, file_path: Path, version: int = 1) -> None: change = abs(change) # Validate data. - assert account == "Spot", ( + assert account in ("Spot", "CrossMargin"), ( "Other types than Spot are currently not supported. " "Please create an Issue or PR." ) diff --git a/src/transaction.py b/src/transaction.py index 750915cd..db40f5c0 100644 --- a/src/transaction.py +++ b/src/transaction.py @@ -98,6 +98,14 @@ class Sell(Transaction): pass +class MarginBuy(Transaction): + pass + + +class MarginSell(Transaction): + pass + + class CoinLendInterest(Transaction): pass