🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

injective-py

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

injective-py

Injective Python SDK, with Exchange API Client

1.10.0
99

Supply Chain Security

100

Vulnerability

100

Quality

100

Maintenance

80

License

Maintainers
2

Injective Python SDK

codecov

Dependencies

Ubuntu

sudo apt install python3.X-dev autoconf automake build-essential libffi-dev libtool pkg-config

Fedora

sudo dnf install python3-devel autoconf automake gcc gcc-c++ libffi-devel libtool make pkgconfig

macOS

brew install autoconf automake libtool bufbuild/buf/buf

Quick Start

Installation

pip install injective-py

Usage

Requires Python 3.9+ Please install poetry following the steps described in the documentation

Examples

$ poetry install

# connecting to Injective Exchange API
# and listening for new orders from a specific spot market
$ poetry run python examples/exchange_client/spot_exchange_rpc/8_StreamOrderbookUpdate.py

# sending a msg with bank transfer
# signs and posts a transaction to the Injective Chain
$ poetry run python examples/chain_client/bank/1_MsgSend.py

Upgrade pip to the latest version, if you see these warnings:

WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
WARNING: Additional context:   user = True   home = None   root = None   prefix = None

Development

  • Generate proto binding & build
make gen
poetry build
  • Install pkg
# from local build
pip uninstall injective-py
pip install injective-py --no-index --find-links /path/to/injective/sdk-python/dist

# from pypi
pip uninstall injective-py
pip install injective-py
  • Run all unit tests in a development environment
poetry run pytest -v

License

Copyright © 2021 - 2025 Injective Labs Inc. (https://injectivelabs.org/)

Originally released by Injective Labs Inc. under:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts