1
0
crypto-tax/crypto_tax/__main__.py
Jon Michael Aanes c5bbab6860
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 23s
Verify Python project can be installed, loaded and have version checked / Test (push) Failing after 22s
Fxi
2024-12-28 01:04:59 +01:00

47 lines
1.0 KiB
Python

import sys
import requests
import fin_depo
from . import secrets
from fin_defs import CryptoCurrency, AssetAmount, MPC, Asset, USDT
from decimal import Decimal
from collections import deque
from fin_depo.data import *
import datetime
import dataclasses
import logging
from pathlib import Path
from . import compute_fifo, output_excel
KUCOIN_CLIENT = fin_depo.defi_kucoin.KucoinDepoFetcher(
secrets.KUCOIN_KEY,
secrets.KUCOIN_SECRET,
secrets.KUCOIN_PASS,
)
KRAKEN_CLIENT = fin_depo.defi_kraken.KrakenDepoFetcher(
secrets.KRAKEN_KEY,
secrets.KRAKEN_SECRET,
)
def main():
"""Main function."""
logging.basicConfig()
logger = logging.getLogger('crypto_tax')
logger.setLevel('INFO')
TRANSFERS = []
TRANSFERS += list(KRAKEN_CLIENT._get_double_registers())
TRANSFERS += list(KUCOIN_CLIENT._get_double_registers())
tax_report = compute_fifo(TRANSFERS)
output_path = Path('./output/report.xlsx')
output_excel.produce_excel_report(tax_report, output_path)
if __name__ == '__main__':
main()