diff --git a/examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py b/examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py index a1ebde82..86e66b1a 100644 --- a/examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py +++ b/examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py @@ -39,7 +39,6 @@ async def main() -> None: oracle_symbol="UFC-KHABIB-TKO-05/30/2023", oracle_provider="UFC", oracle_type="Provider", - quote_decimals=6, oracle_scale_factor=6, maker_fee_rate=0.0005, # 0.05% taker_fee_rate=0.0010, # 0.10% diff --git a/examples/chain_client/exchange/query/23_TraderDerivativeOrders.py b/examples/chain_client/exchange/query/23_TraderDerivativeOrders.py index 61e98ba1..244a61b4 100644 --- a/examples/chain_client/exchange/query/23_TraderDerivativeOrders.py +++ b/examples/chain_client/exchange/query/23_TraderDerivativeOrders.py @@ -26,7 +26,7 @@ async def main() -> None: subaccount_id = address.get_subaccount_id(index=0) - orders = await client.fetch_chain_trader_spot_orders( + orders = await client.fetch_chain_trader_derivative_orders( market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", subaccount_id=subaccount_id, ) diff --git a/examples/chain_client/exchange/query/24_AccountAddressDerivativeOrders.py b/examples/chain_client/exchange/query/24_AccountAddressDerivativeOrders.py index 469c99fb..2ecc6e2d 100644 --- a/examples/chain_client/exchange/query/24_AccountAddressDerivativeOrders.py +++ b/examples/chain_client/exchange/query/24_AccountAddressDerivativeOrders.py @@ -24,7 +24,7 @@ async def main() -> None: address = pub_key.to_address() await client.fetch_account(address.to_acc_bech32()) - orders = await client.fetch_chain_account_address_spot_orders( + orders = await client.fetch_chain_account_address_derivative_orders( market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", account_address=address.to_acc_bech32(), ) diff --git a/examples/chain_client/exchange/query/25_DerivativeOrdersByHashes.py b/examples/chain_client/exchange/query/25_DerivativeOrdersByHashes.py index ea700e6d..825f5523 100644 --- a/examples/chain_client/exchange/query/25_DerivativeOrdersByHashes.py +++ b/examples/chain_client/exchange/query/25_DerivativeOrdersByHashes.py @@ -26,7 +26,7 @@ async def main() -> None: subaccount_id = address.get_subaccount_id(index=0) - orders = await client.fetch_chain_spot_orders_by_hashes( + orders = await client.fetch_chain_derivative_orders_by_hashes( market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", subaccount_id=subaccount_id, order_hashes=["0x57a01cd26f1e2080860af3264e865d7c9c034a701e30946d01c1dc7a303cf2c1"], diff --git a/examples/chain_client/exchange/query/33_SubaccountPossitionInMarket.py b/examples/chain_client/exchange/query/33_SubaccountPositionInMarket.py similarity index 100% rename from examples/chain_client/exchange/query/33_SubaccountPossitionInMarket.py rename to examples/chain_client/exchange/query/33_SubaccountPositionInMarket.py diff --git a/examples/chain_client/exchange/query/34_SubaccountEffectivePossitionInMarket.py b/examples/chain_client/exchange/query/34_SubaccountEffectivePositionInMarket.py similarity index 100% rename from examples/chain_client/exchange/query/34_SubaccountEffectivePossitionInMarket.py rename to examples/chain_client/exchange/query/34_SubaccountEffectivePositionInMarket.py diff --git a/examples/chain_client/exchange/query/41_FeeDiscountAccountInfo.py b/examples/chain_client/exchange/query/41_FeeDiscountAccountInfo.py deleted file mode 100644 index 15fbb7ce..00000000 --- a/examples/chain_client/exchange/query/41_FeeDiscountAccountInfo.py +++ /dev/null @@ -1,34 +0,0 @@ -import asyncio -import os - -import dotenv - -from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") - - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - # load account - priv_key = PrivateKey.from_hex(configured_private_key) - pub_key = priv_key.to_public_key() - address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) - - fee_discount = await client.fetch_fee_discount_account_info( - account=address.to_acc_bech32(), - ) - print(fee_discount) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/42_FeeDiscountSchedule.py b/examples/chain_client/exchange/query/42_FeeDiscountSchedule.py deleted file mode 100644 index a0ae96cb..00000000 --- a/examples/chain_client/exchange/query/42_FeeDiscountSchedule.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - schedule = await client.fetch_fee_discount_schedule() - print(schedule) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/43_BalanceMismatches.py b/examples/chain_client/exchange/query/43_BalanceMismatches.py deleted file mode 100644 index c7f7ca5e..00000000 --- a/examples/chain_client/exchange/query/43_BalanceMismatches.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - mismatches = await client.fetch_balance_mismatches(dust_factor=1) - print(mismatches) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/44_BalanceWithBalanceHolds.py b/examples/chain_client/exchange/query/44_BalanceWithBalanceHolds.py deleted file mode 100644 index 6587c59a..00000000 --- a/examples/chain_client/exchange/query/44_BalanceWithBalanceHolds.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - balance = await client.fetch_balance_with_balance_holds() - print(balance) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/45_FeeDiscountTierStatistics.py b/examples/chain_client/exchange/query/45_FeeDiscountTierStatistics.py deleted file mode 100644 index 5671e4ce..00000000 --- a/examples/chain_client/exchange/query/45_FeeDiscountTierStatistics.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - statistics = await client.fetch_fee_discount_tier_statistics() - print(statistics) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/46_MitoVaultInfos.py b/examples/chain_client/exchange/query/46_MitoVaultInfos.py deleted file mode 100644 index 3faa5cb9..00000000 --- a/examples/chain_client/exchange/query/46_MitoVaultInfos.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - infos = await client.fetch_mito_vault_infos() - print(infos) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/47_QueryMarketIDFromVault.py b/examples/chain_client/exchange/query/47_QueryMarketIDFromVault.py deleted file mode 100644 index e699dbaa..00000000 --- a/examples/chain_client/exchange/query/47_QueryMarketIDFromVault.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - market_id = await client.fetch_market_id_from_vault(vault_address="inj1qg5ega6dykkxc307y25pecuufrjkxkag6xhp6y") - print(market_id) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/48_HistoricalTradeRecords.py b/examples/chain_client/exchange/query/48_HistoricalTradeRecords.py deleted file mode 100644 index 6b93200f..00000000 --- a/examples/chain_client/exchange/query/48_HistoricalTradeRecords.py +++ /dev/null @@ -1,21 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - records = await client.fetch_historical_trade_records( - market_id="0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - ) - print(records) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/49_IsOptedOutOfRewards.py b/examples/chain_client/exchange/query/49_IsOptedOutOfRewards.py deleted file mode 100644 index 28c0925c..00000000 --- a/examples/chain_client/exchange/query/49_IsOptedOutOfRewards.py +++ /dev/null @@ -1,34 +0,0 @@ -import asyncio -import os - -import dotenv - -from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") - - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - # load account - priv_key = PrivateKey.from_hex(configured_private_key) - pub_key = priv_key.to_public_key() - address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) - - is_opted_out = await client.fetch_is_opted_out_of_rewards( - account=address.to_acc_bech32(), - ) - print(is_opted_out) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/50_OptedOutOfRewardsAccounts.py b/examples/chain_client/exchange/query/50_OptedOutOfRewardsAccounts.py deleted file mode 100644 index 9940f799..00000000 --- a/examples/chain_client/exchange/query/50_OptedOutOfRewardsAccounts.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - opted_out = await client.fetch_opted_out_of_rewards_accounts() - print(opted_out) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/51_MarketVolatility.py b/examples/chain_client/exchange/query/51_MarketVolatility.py deleted file mode 100644 index 3173ca39..00000000 --- a/examples/chain_client/exchange/query/51_MarketVolatility.py +++ /dev/null @@ -1,30 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - market_id = "0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe" - trade_grouping_sec = 10 - max_age = 0 - include_raw_history = True - include_metadata = True - volatility = await client.fetch_market_volatility( - market_id=market_id, - trade_grouping_sec=trade_grouping_sec, - max_age=max_age, - include_raw_history=include_raw_history, - include_metadata=include_metadata, - ) - print(volatility) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/52_BinaryOptionsMarkets.py b/examples/chain_client/exchange/query/52_BinaryOptionsMarkets.py deleted file mode 100644 index 4448a4ec..00000000 --- a/examples/chain_client/exchange/query/52_BinaryOptionsMarkets.py +++ /dev/null @@ -1,19 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - markets = await client.fetch_chain_binary_options_markets(status="Active") - print(markets) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/53_TraderDerivativeConditionalOrders.py b/examples/chain_client/exchange/query/53_TraderDerivativeConditionalOrders.py deleted file mode 100644 index fd65e68f..00000000 --- a/examples/chain_client/exchange/query/53_TraderDerivativeConditionalOrders.py +++ /dev/null @@ -1,37 +0,0 @@ -import asyncio -import os - -import dotenv - -from pyinjective import PrivateKey -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - dotenv.load_dotenv() - configured_private_key = os.getenv("INJECTIVE_PRIVATE_KEY") - - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - # load account - priv_key = PrivateKey.from_hex(configured_private_key) - pub_key = priv_key.to_public_key() - address = pub_key.to_address() - await client.fetch_account(address.to_acc_bech32()) - - subaccount_id = address.get_subaccount_id(index=0) - - orders = await client.fetch_trader_derivative_conditional_orders( - subaccount_id=subaccount_id, - market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", - ) - print(orders) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/exchange/query/54_MarketAtomicExecutionFeeMultiplier.py b/examples/chain_client/exchange/query/54_MarketAtomicExecutionFeeMultiplier.py deleted file mode 100644 index 328028d3..00000000 --- a/examples/chain_client/exchange/query/54_MarketAtomicExecutionFeeMultiplier.py +++ /dev/null @@ -1,21 +0,0 @@ -import asyncio - -from pyinjective.async_client import AsyncClient -from pyinjective.core.network import Network - - -async def main() -> None: - # select network: local, testnet, mainnet - network = Network.testnet() - - # initialize grpc client - client = AsyncClient(network) - - multiplier = await client.fetch_market_atomic_execution_fee_multiplier( - market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", - ) - print(multiplier) - - -if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(main()) diff --git a/examples/chain_client/authz/4_MsgExecuteContractCompat.py b/examples/chain_client/wasmx/1_MsgExecuteContractCompat.py similarity index 100% rename from examples/chain_client/authz/4_MsgExecuteContractCompat.py rename to examples/chain_client/wasmx/1_MsgExecuteContractCompat.py