1
0

KuCoin support executed time

This commit is contained in:
Jon Michael Aanes 2024-07-22 22:01:34 +02:00
parent 29af8ff371
commit 2738738fda
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA
2 changed files with 8 additions and 2 deletions

View File

@ -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: <https://www.kucoin.com/docs/rest/spot-trading/orders/place-order>
- GET Market Order by id: <https://www.kucoin.com/docs/rest/spot-trading/orders/get-order-details-by-orderid>
"""
# 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,
)

View File

@ -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,