Skip to content

Commit 696a79a

Browse files
rename parameter
1 parent ad4467f commit 696a79a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/kraken/spot/trade.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ def create_order( # pylint: disable=too-many-branches,too-many-arguments # noqa
342342
amount=volume,
343343
amount_type="volume",
344344
pair=pair,
345-
aclass_base=(
346-
extra_params.get("aclass_base") if extra_params else "currency"
345+
asset_class=(
346+
extra_params.get("asset_class") if extra_params else "currency"
347347
),
348348
)
349349
),
@@ -777,7 +777,7 @@ def truncate(
777777
amount: Decimal | float | str,
778778
amount_type: str,
779779
pair: str,
780-
aclass_base: str = "currency",
780+
asset_class: str = "currency",
781781
) -> str:
782782
"""
783783
Kraken only allows volume and price amounts to be specified with a
@@ -796,10 +796,10 @@ def truncate(
796796
:type amount_type: str
797797
:param pair: The currency pair the amount is in reference to.
798798
:type pair: str
799-
:param aclass_base: The asset class of the base currency. Default is
799+
:param asset_class: The asset class of the base currency. Default is
800800
``"currency"``. If the traded asset is a tokenized asset, set this
801801
to ``"tokenized_asset"``.
802-
:type aclass_base: str, optional
802+
:type asset_class: str, optional
803803
:raises ValueError: If the ``amount_type`` is ``price`` and the price is
804804
less than the costmin.
805805
:raises ValueError: If the ``amount_type`` is ``volume`` and the volume
@@ -845,7 +845,7 @@ def truncate(
845845

846846
pair_data: dict = self.__market.get_asset_pairs(
847847
pair=pair,
848-
aclass_base=aclass_base,
848+
aclass_base=asset_class,
849849
)
850850
data: dict = pair_data[next(iter(pair_data))]
851851

tests/spot/test_spot_trade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def test_truncate_tokenized_asset(self: Self, spot_trade: Trade) -> None:
392392
amount=volume,
393393
amount_type="volume",
394394
pair="AAPLxUSD",
395-
aclass_base="tokenized_asset",
395+
asset_class="tokenized_asset",
396396
)
397397
== expected
398398
)

0 commit comments

Comments
 (0)