Skip to content

Commit 15adf6d

Browse files
authored
Merge pull request #399 from InjectiveLabs/feat/sync_dev_with_master_after_v1_11_2
Feat/sync dev with master after v1.11.2
2 parents 26b9e06 + 0c7e085 commit 15adf6d

39 files changed

+2304
-1260
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased] - 9999-99-99
66

7+
## [1.11.2] - 2025-09-24
8+
### Added
9+
- Added support in v2 Composer to create the new exchange module MsgCancelPostOnlyMode message
10+
11+
### Changed
12+
- Updated all compiled protos for compatibility with Injective core v1.16.4 and Indexer v1.16.91
13+
- Marked the v1 Composer as deprecated
14+
15+
## [1.11.1] - 2025-08-20
16+
### Changed
17+
- Marked the v1 AsyncClient as deprecated
18+
19+
### Fixed
20+
- Fixed the Indexer orderbooks queries in the v1 AsyncClient to include the depth parameter
21+
722
## [1.11.0] - 2025-07-29
823
### Added
924
- Added support for Exchange V2 proto queries and types

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ clean-all:
3131
$(call clean_repos)
3232

3333
clone-injective-indexer:
34-
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.16.54 --depth 1 --single-branch
34+
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.16.91 --depth 1 --single-branch
3535

3636
clone-all: clone-injective-indexer
3737

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ The Injective Python SDK provides two different clients for interacting with the
7878

7979
1. **Exchange V1 Client** (`async_client` module):
8080
- Use this client if you need to interact with the original Injective Exchange API
81-
- Import using: `from injective.async_client import AsyncClient`
81+
- Import using: `from pyinjective.async_client import AsyncClient`
8282
- Suitable for applications that need to maintain compatibility with the original exchange interface
8383
- Example:
8484
```python
85-
from injective.async_client import AsyncClient
86-
from injective.network import Network
85+
from pyinjective.async_client import AsyncClient
86+
from pyinjective.network import Network
8787

8888
async def main():
8989
# Initialize client with mainnet
@@ -95,12 +95,12 @@ The Injective Python SDK provides two different clients for interacting with the
9595

9696
2. **Exchange V2 Client** (`async_client_v2` module):
9797
- Use this client for the latest exchange features and improvements
98-
- Import using: `from injective.async_client_v2 import AsyncClient`
98+
- Import using: `from pyinjective.async_client_v2 import AsyncClient`
9999
- Recommended for new applications and when you need access to the latest exchange features
100100
- Example:
101101
```python
102-
from injective.async_client_v2 import AsyncClient
103-
from injective.network import Network
102+
from pyinjective.async_client_v2 import AsyncClient
103+
from pyinjective.network import Network
104104

105105
async def main():
106106
# Initialize client with mainnet

buf.gen.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ inputs:
1616
- git_repo: https://github.com/InjectiveLabs/wasmd
1717
tag: v0.53.3-evm-comet1-inj
1818
- git_repo: https://github.com/InjectiveLabs/cometbft
19-
tag: v1.0.1-inj.2
19+
tag: v1.0.1-inj.3
2020
- git_repo: https://github.com/InjectiveLabs/cosmos-sdk
21-
tag: v0.50.13-evm-comet1-inj.3
21+
tag: v0.50.13-evm-comet1-inj.6
2222
# - git_repo: https://github.com/InjectiveLabs/wasmd
2323
# branch: v0.51.x-inj
2424
# subdir: proto
2525
- git_repo: https://github.com/InjectiveLabs/injective-core
26-
tag: v1.16.0
26+
tag: v1.16.4
2727
subdir: proto
2828
# - git_repo: https://github.com/InjectiveLabs/injective-core
2929
# branch: master

examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async def main() -> None:
4747
oracle_symbol="UFC-KHABIB-TKO-05/30/2023",
4848
oracle_provider="UFC",
4949
oracle_type="Provider",
50-
oracle_scale_factor=6,
50+
oracle_scale_factor=0,
5151
maker_fee_rate=Decimal("0.0005"), # 0.05%
5252
taker_fee_rate=Decimal("0.0010"), # 0.10%
5353
expiration_timestamp=1680730982,

examples/chain_client/exchange/4_MsgInstantPerpetualMarketLaunch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def main() -> None:
4848
quote_denom="factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc",
4949
oracle_base="INJ",
5050
oracle_quote="USDC",
51-
oracle_scale_factor=6,
51+
oracle_scale_factor=0,
5252
oracle_type="Band",
5353
maker_fee_rate=Decimal("-0.0001"),
5454
taker_fee_rate=Decimal("0.001"),

examples/chain_client/exchange/5_MsgInstantExpiryFuturesMarketLaunch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def main() -> None:
4848
quote_denom="factory/inj17vytdwqczqz72j65saukplrktd4gyfme5agf6c/usdc",
4949
oracle_base="INJ",
5050
oracle_quote="USDC",
51-
oracle_scale_factor=6,
51+
oracle_scale_factor=0,
5252
oracle_type="Band",
5353
expiry=2000000000,
5454
maker_fee_rate=Decimal("-0.0001"),

poetry.lock

Lines changed: 974 additions & 918 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/async_client.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ def __init__(
5858
self,
5959
network: Network,
6060
):
61+
warn(
62+
"AsyncClient from pyinjective.async_client is deprecated. "
63+
"Please use AsyncClient from pyinjective.async_client_v2 instead.",
64+
DeprecationWarning,
65+
stacklevel=2,
66+
)
6167
self.addr = ""
6268
self.number = 0
6369
self.sequence = 0
@@ -1337,11 +1343,11 @@ async def listen_spot_markets_updates(
13371343
market_ids=market_ids,
13381344
)
13391345

1340-
async def fetch_spot_orderbook_v2(self, market_id: str) -> Dict[str, Any]:
1341-
return await self.indexer_client.fetch_spot_orderbook_v2(market_id=market_id)
1346+
async def fetch_spot_orderbook_v2(self, market_id: str, depth: Optional[int] = None) -> Dict[str, Any]:
1347+
return await self.indexer_client.fetch_spot_orderbook_v2(market_id=market_id, depth=depth or 0)
13421348

1343-
async def fetch_spot_orderbooks_v2(self, market_ids: List[str]) -> Dict[str, Any]:
1344-
return await self.indexer_client.fetch_spot_orderbooks_v2(market_ids=market_ids)
1349+
async def fetch_spot_orderbooks_v2(self, market_ids: List[str], depth: Optional[int] = None) -> Dict[str, Any]:
1350+
return await self.indexer_client.fetch_spot_orderbooks_v2(market_ids=market_ids, depth=depth or 0)
13451351

13461352
async def fetch_spot_orders(
13471353
self,
@@ -1608,11 +1614,13 @@ async def listen_derivative_market_updates(
16081614
market_ids=market_ids,
16091615
)
16101616

1611-
async def fetch_derivative_orderbook_v2(self, market_id: str) -> Dict[str, Any]:
1612-
return await self.indexer_client.fetch_derivative_orderbook_v2(market_id=market_id)
1617+
async def fetch_derivative_orderbook_v2(self, market_id: str, depth: Optional[int] = None) -> Dict[str, Any]:
1618+
return await self.indexer_client.fetch_derivative_orderbook_v2(market_id=market_id, depth=depth or 0)
16131619

1614-
async def fetch_derivative_orderbooks_v2(self, market_ids: List[str]) -> Dict[str, Any]:
1615-
return await self.indexer_client.fetch_derivative_orderbooks_v2(market_ids=market_ids)
1620+
async def fetch_derivative_orderbooks_v2(
1621+
self, market_ids: List[str], depth: Optional[int] = None
1622+
) -> Dict[str, Any]:
1623+
return await self.indexer_client.fetch_derivative_orderbooks_v2(market_ids=market_ids, depth=depth or 0)
16161624

16171625
async def fetch_derivative_orders(
16181626
self,

pyinjective/composer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ def __init__(
137137
138138
139139
"""
140+
141+
warn(
142+
"Composer from pyinjective.composer is deprecated. "
143+
"Please use Composer from pyinjective.composer_v2 instead.",
144+
DeprecationWarning,
145+
stacklevel=2,
146+
)
140147
self.network = network
141148
self.spot_markets = spot_markets or dict()
142149
self.derivative_markets = derivative_markets or dict()

0 commit comments

Comments
 (0)