Skip to content

Commit

Permalink
Merge pull request #130 from InjectiveLabs/f/fix_instant_binary_options
Browse files Browse the repository at this point in the history
F/fix instant binary options
  • Loading branch information
achilleas-kal committed Jul 22, 2022
2 parents af640bf + 2062daa commit ac610b5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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%
Expand Down
3 changes: 2 additions & 1 deletion pyinjective/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
EMAIL = "[email protected]"
AUTHOR = "Injective Labs"
REQUIRES_PYTHON = ">=3.7.0"
VERSION = "0.5.7.1"
VERSION = "0.5.7.2"

REQUIRED = [
"grpcio",
Expand Down

0 comments on commit ac610b5

Please sign in to comment.