diff --git a/README.md b/README.md index 78fa9e9e..fed3ab57 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,9 @@ Note that the [sync client](https://github.com/InjectiveLabs/sdk-python/blob/mas ### Changelogs +**0.5.7.2** +* Fix MsgInstantBinaryOptionsLaunch + **0.5.7.1** * Add optional argument to bypass ini file load in binary options diff --git a/examples/chain_client/35_MsgInstantBinaryOptionsMarketLaunch.py b/examples/chain_client/35_MsgInstantBinaryOptionsMarketLaunch.py index 882b936c..83d39820 100644 --- a/examples/chain_client/35_MsgInstantBinaryOptionsMarketLaunch.py +++ b/examples/chain_client/35_MsgInstantBinaryOptionsMarketLaunch.py @@ -46,6 +46,7 @@ async def main() -> None: oracle_provider="UFC", oracle_type="Provider", quote_denom="peggy0xdAC17F958D2ee523a2206206994597C13D831ec7", + quote_decimals=6, oracle_scale_factor=6, maker_fee_rate=0.0005, # 0.05% taker_fee_rate=0.0010, # 0.10% diff --git a/pyinjective/composer.py b/pyinjective/composer.py index 20ee4cdb..7e7b8635 100644 --- a/pyinjective/composer.py +++ b/pyinjective/composer.py @@ -468,6 +468,7 @@ def MsgInstantBinaryOptionsMarketLaunch( expiration_timestamp: int, settlement_timestamp: int, quote_denom: str, + quote_decimals: int, min_price_tick_size: float, min_quantity_tick_size: float, **kwargs @@ -479,7 +480,7 @@ def MsgInstantBinaryOptionsMarketLaunch( scaled_taker_fee_rate = Decimal((taker_fee_rate * pow(10, 18))) taker_fee_to_bytes = bytes(str(scaled_taker_fee_rate), "utf-8") - scaled_min_price_tick_size = Decimal((min_price_tick_size * pow(10, 18))) + scaled_min_price_tick_size = Decimal((min_price_tick_size * pow(10, quote_decimals + 18))) min_price_to_bytes = bytes(str(scaled_min_price_tick_size), "utf-8") scaled_min_quantity_tick_size = Decimal((min_quantity_tick_size * pow(10, 18))) diff --git a/setup.py b/setup.py index 7cc8b1b3..bc0229dc 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ EMAIL = "achilleas@injectivelabs.com" AUTHOR = "Injective Labs" REQUIRES_PYTHON = ">=3.7.0" -VERSION = "0.5.7.1" +VERSION = "0.5.7.2" REQUIRED = [ "grpcio",