-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #371 from InjectiveLabs/feat/release_v1_9_0
Feat/release v1.9.0
- Loading branch information
Showing
132 changed files
with
6,301 additions
and
6,996 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
examples/chain_client/exchange/query/56_L3DerivativeOrderBook.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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) | ||
|
||
orderbook = await client.fetch_l3_derivative_orderbook( | ||
market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6", | ||
) | ||
print(orderbook) | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.get_event_loop().run_until_complete(main()) |
21 changes: 21 additions & 0 deletions
21
examples/chain_client/exchange/query/57_L3SpotOrderBook.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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) | ||
|
||
orderbook = await client.fetch_l3_spot_orderbook( | ||
market_id="0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe", | ||
) | ||
print(orderbook) | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.get_event_loop().run_until_complete(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import asyncio | ||
|
||
from pyinjective.async_client import AsyncClient | ||
from pyinjective.core.network import Network | ||
|
||
|
||
async def main() -> None: | ||
""" | ||
Demonstrate fetching market balance using AsyncClient. | ||
""" | ||
# Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() | ||
network = Network.testnet() | ||
|
||
# Initialize the Async Client | ||
client = AsyncClient(network) | ||
|
||
try: | ||
# Example market ID (replace with an actual market ID from the network) | ||
market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6" | ||
|
||
# Fetch market balance | ||
market_balance = await client.fetch_market_balance(market_id=market_id) | ||
print("Market Balance:") | ||
print(market_balance) | ||
|
||
except Exception as ex: | ||
print(f"Error occurred: {ex}") | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.get_event_loop().run_until_complete(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import asyncio | ||
|
||
from pyinjective.async_client import AsyncClient | ||
from pyinjective.core.network import Network | ||
|
||
|
||
async def main() -> None: | ||
""" | ||
Demonstrate fetching market balances using AsyncClient. | ||
""" | ||
# Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() | ||
network = Network.testnet() | ||
|
||
# Initialize the Async Client | ||
client = AsyncClient(network) | ||
|
||
try: | ||
# Fetch market balances | ||
market_balances = await client.fetch_market_balances() | ||
print("Market Balances:") | ||
print(market_balances) | ||
|
||
except Exception as ex: | ||
print(f"Error occurred: {ex}") | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.get_event_loop().run_until_complete(main()) |
31 changes: 31 additions & 0 deletions
31
examples/chain_client/exchange/query/60_DenomMinNotional.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import asyncio | ||
|
||
from pyinjective.async_client import AsyncClient | ||
from pyinjective.core.network import Network | ||
|
||
|
||
async def main() -> None: | ||
""" | ||
Demonstrate fetching denom min notional using AsyncClient. | ||
""" | ||
# Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() | ||
network = Network.testnet() | ||
|
||
# Initialize the Async Client | ||
client = AsyncClient(network) | ||
|
||
try: | ||
# Example denom | ||
denom = "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test" | ||
|
||
# Fetch market balance | ||
min_notional = await client.fetch_denom_min_notional(denom=denom) | ||
print("Min Notional:") | ||
print(min_notional) | ||
|
||
except Exception as ex: | ||
print(f"Error occurred: {ex}") | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.get_event_loop().run_until_complete(main()) |
28 changes: 28 additions & 0 deletions
28
examples/chain_client/exchange/query/61_DenomMinNotionals.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import asyncio | ||
|
||
from pyinjective.async_client import AsyncClient | ||
from pyinjective.core.network import Network | ||
|
||
|
||
async def main() -> None: | ||
""" | ||
Demonstrate fetching denom min notionals using AsyncClient. | ||
""" | ||
# Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet() | ||
network = Network.testnet() | ||
|
||
# Initialize the Async Client | ||
client = AsyncClient(network) | ||
|
||
try: | ||
# Fetch market balance | ||
min_notionals = await client.fetch_denom_min_notionals() | ||
print("Min Notionals:") | ||
print(min_notionals) | ||
|
||
except Exception as ex: | ||
print(f"Error occurred: {ex}") | ||
|
||
|
||
if __name__ == "__main__": | ||
asyncio.get_event_loop().run_until_complete(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.