Kraken WIP
This commit is contained in:
parent
99a5dc82e4
commit
e032d4ed1f
|
@ -7,7 +7,14 @@ from decimal import Decimal
|
|||
import fin_defs
|
||||
import krakenex
|
||||
|
||||
from .data import Depo, DepoFetcher, DepoSingle
|
||||
from .data import (
|
||||
DepoFetcher,
|
||||
DepoSingle,
|
||||
DepositDetails,
|
||||
DoubleRegister,
|
||||
TradeOrderDetails,
|
||||
WithdrawalDetails,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -56,6 +63,23 @@ class KrakenDepoFetcher(DepoFetcher):
|
|||
)
|
||||
|
||||
|
||||
def _get_withdrawals(self) -> list[WithdrawalDetails]:
|
||||
raise NotImplementedError("_get_withdrawals is a work in progress")
|
||||
|
||||
def _get_deposits(self) -> list[DepositDetails]:
|
||||
raise NotImplementedError("_get_deposits is a work in progress")
|
||||
|
||||
def _get_historic_spot_orders(self) -> Iterator[TradeOrderDetails]:
|
||||
raise NotImplementedError("_get_historic_spot_orders is a work in progress")
|
||||
|
||||
def _get_double_registers(self) -> list[DoubleRegister]:
|
||||
double_registers: list[DoubleRegister] = []
|
||||
double_registers += self._get_deposits()
|
||||
double_registers += self._get_withdrawals()
|
||||
double_registers += self._get_historic_spot_orders()
|
||||
double_registers.sort(key=lambda x: x.executed_time)
|
||||
return double_registers
|
||||
|
||||
def parse_asset_from_ticker(ticker: str) -> fin_defs.Asset:
|
||||
account = ticker.removesuffix('.HOLD')
|
||||
if account == 'ZEUR':
|
||||
|
|
Loading…
Reference in New Issue
Block a user