diff --git a/fin_depo/defi_kucoin.py b/fin_depo/defi_kucoin.py index 8659f89..e5ade01 100644 --- a/fin_depo/defi_kucoin.py +++ b/fin_depo/defi_kucoin.py @@ -94,13 +94,17 @@ class KucoinDepoFetcher(DepoFetcher): other accounts cannot be used. Note: - ---- + - A fee will be paid to Kucoin, with the rate determined by your WIP level and the asset being traded. - The full `input_amount` may not be used. Inspect the resulting `TradeOrderDetails` to see how much of the `input_amount` have been used. + References: + + - POST Market Order: + - GET Market Order by id: """ # Check requirements if not self.allow_trades: @@ -149,6 +153,9 @@ class KucoinDepoFetcher(DepoFetcher): output_amount=output_amount_final, fee_asset=fin_defs.WELL_KNOWN_SYMBOLS[order_details['feeCurrency']], fee_amount=Decimal(order_details['fee']), + executed_time=datetime.datetime.fromtimestamp( + order_details['createdAt'] / 1000, tz=datetime.UTC + ), order_id=order_id, raw_order_details=order_details, ) diff --git a/test/test_kraken.py b/test/test_kraken.py index a472b7d..577fe95 100644 --- a/test/test_kraken.py +++ b/test/test_kraken.py @@ -13,7 +13,6 @@ needs_secrets = pytest.mark.skipif( @needs_secrets def test_get_depo(): - session = requests.Session() fetcher = fin_depo.defi_kraken.KrakenDepoFetcher( secrets.KRAKEN_KEY, secrets.KRAKEN_SECRET,