InjectiveLabs / sdk-python

Injective Exchange API for Python clients
Apache License 2.0
41 stars 27 forks source link

Feat/add exchange messages from v1.13 #341

Closed aarmoa closed 2 months ago

aarmoa commented 2 months ago

Solves CHAIN-170

Summary by CodeRabbit

coderabbitai[bot] commented 2 months ago

[!IMPORTANT]

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

126 files out of 283 files are above the max files limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent changes significantly enhance the codebase by introducing a new min_notional parameter to improve market operations and validations. This update allows for more precise trading conditions across various modules, enhancing their functionality and robustness. Testing frameworks have also been updated to ensure comprehensive coverage of these new features, contributing to a more reliable and efficient system overall.

Changes

Files Change Summary
.github/workflows/run-tests.yml Updated Codecov action from v3 to v4 for improved functionality.
CHANGELOG.md Documented new message types added to the "exchange" module, enhancing its capabilities.
examples/chain_client/exchange/*.py Introduced asynchronous scripts for margin adjustments and market updates, incorporating a min_notional parameter.
pyinjective/*.py Added min_notional to multiple classes and methods, enhancing data handling and market operations.
pyinjective/denoms_*.ini Introduced min_notional parameters for various trading pairs to establish minimum transaction conditions.
tests/*.py Updated tests to incorporate min_notional checks, ensuring robust validation of market functionalities.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant Network

    User->>App: Initiate market operation
    App->>Network: Validate transaction with min_notional
    Network-->>App: Confirmation of validity
    App-->>User: Display transaction outcome

๐Ÿฐ In fields of greens and skies so blue,
A change has come, oh how it grew!
With min_notional bright and bold,
Our markets dance, a sight to behold!
Hops of joy in code we weave,
Celebrating all, letโ€™s greatly achieve! ๐Ÿฅ•


Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
socket-security[bot] commented 2 months ago

New and removed dependencies detected. Learn more about Socket for GitHub โ†—๏ธŽ

Package New capabilities Transitives Size Publisher
pypi/aiohappyeyeballs@2.3.4 network 0 77.4 kB bdraco
pypi/aiohttp@3.10.1 environment, eval, filesystem, network, shell, unsafe 0 14.3 MB Andrew.Svetlov, fafhrd, webknjaz
pypi/attrs@24.2.0 environment, eval, filesystem, shell, unsafe 0 1.47 MB hynek
pypi/cffi@1.17.0 environment, eval, filesystem, network, shell, unsafe 0 2.16 MB Armin.Rigo, alexgaynor, fijal, ...5 more
pypi/coverage@7.6.1 environment, eval, filesystem, network 0 826 kB nedbatchelder
pypi/grpcio-tools@1.65.4 None 0 0 B
pypi/grpcio@1.65.4 environment, network 0 37 MB google_opensource, grpc-packages

๐Ÿšฎ Removed packages: pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/aiohttp@3.9.5, pypi/attrs@23.2.0, pypi/attrs@23.2.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/cffi@1.16.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/coverage@7.6.0, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.65.1, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio-tools@1.66.0rc2, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1, pypi/grpcio@1.65.1

View full reportโ†—๏ธŽ