From 3dd9e6f08ca1027f8780c38e1c1dc16ed4ac7fd4 Mon Sep 17 00:00:00 2001 From: Achilleas Date: Mon, 6 Dec 2021 06:39:15 -0500 Subject: [PATCH] update examples --- .../12_ExchangeMsgBatchCreateDerivativeLimitOrders.py | 3 +-- .../6_ExchangeMsgCreateDerivativeLimitOrder.py | 2 +- pyinjective/composer.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/chain_client_examples/12_ExchangeMsgBatchCreateDerivativeLimitOrders.py b/examples/chain_client_examples/12_ExchangeMsgBatchCreateDerivativeLimitOrders.py index 92849a04..06470d9f 100644 --- a/examples/chain_client_examples/12_ExchangeMsgBatchCreateDerivativeLimitOrders.py +++ b/examples/chain_client_examples/12_ExchangeMsgBatchCreateDerivativeLimitOrders.py @@ -48,8 +48,8 @@ async def main() -> None: fee_recipient=fee_recipient, price=41027, quantity=0.01, + is_buy=True, leverage=0.7, - is_buy=True ), composer.DerivativeOrder( market_id=market_id, @@ -57,7 +57,6 @@ async def main() -> None: fee_recipient=fee_recipient, price=62140, quantity=0.01, - leverage=1.4, is_buy=False, is_reduce_only=True ), diff --git a/examples/chain_client_examples/6_ExchangeMsgCreateDerivativeLimitOrder.py b/examples/chain_client_examples/6_ExchangeMsgCreateDerivativeLimitOrder.py index 650fe4c6..ac70b487 100644 --- a/examples/chain_client_examples/6_ExchangeMsgCreateDerivativeLimitOrder.py +++ b/examples/chain_client_examples/6_ExchangeMsgCreateDerivativeLimitOrder.py @@ -50,8 +50,8 @@ async def main() -> None: fee_recipient=fee_recipient, price=50000, quantity=0.1, - leverage=1, is_buy=False, + leverage=1, is_reduce_only=False ) diff --git a/pyinjective/composer.py b/pyinjective/composer.py index 0f155b50..5c13e588 100644 --- a/pyinjective/composer.py +++ b/pyinjective/composer.py @@ -65,8 +65,8 @@ def DerivativeOrder( fee_recipient: str, price: float, quantity: float, - leverage: float = 1, is_buy: bool, + leverage: float = 1, is_reduce_only: bool = False ): # load denom metadata