Skip to main content

Paradex Python SDK

Project description

Paradex Python SDK

Release Build status codecov Commit activity License

Paradex Python SDK provides a simple interface to interact with the Paradex REST and WS API.

Examples

from paradex_py import Paradex
from paradex_py.environment import Environment

paradex = Paradex(env=Environment.TESTNET, l1_address="0x...", l1_private_key="0x...")
print(hex(paradex.account.l2_address)) # 0x...
print(hex(paradex.account.l2_public_key)) # 0x...
print(hex(paradex.account.l2_private_key)) # 0x...

paradex.api_client.fetch_system_config() # { ..., "paraclear_decimals": 8, ... }

async def on_message(ws_channel, message):
    print(ws_channel, message)

await paradex.ws_client.connect()
await paradex.ws_client.subscribe(ParadexWebsocketChannel.MARKETS_SUMMARY, callback=on_message)

📖 For complete documentation refer to tradeparadex.github.io/paradex-py

💻 For comprehensive examples refer to following files:

Development

make install
make check
make test
make build
make clean-build
make publish
make build-and-publish
make docs-test
make docs
make help

Using uv

This project uses uv for managing dependencies and building. Below are instructions for installing uv and the basic workflow for development outside of using make commands.

Installing uv

uv is a fast and modern Python package manager. You can install it using the standalone installer for macOS and Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

For other installation methods, refer to the uv installation documentation.

Basic Workflow with uv

If you prefer not to use make commands, you can directly use uv for development tasks:

  • Install dependencies: Sync your environment with the project's dependencies.
    uv sync
    
  • Run tests: Execute the test suite using pytest within the uv environment.
    uv run pytest
    
  • Build the project: Create a distribution package for the SDK.
    uv build
    

For more detailed information on using uv, refer to the uv documentation.

The CI/CD pipeline will be triggered when a new pull request is opened, code is merged to main, or when new release is created.

Notes

[!WARNING] Experimental SDK, library API is subject to change

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paradex_py-0.4.6.tar.gz (228.1 kB view details)

Uploaded Source

Built Distribution

paradex_py-0.4.6-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file paradex_py-0.4.6.tar.gz.

File metadata

  • Download URL: paradex_py-0.4.6.tar.gz
  • Upload date:
  • Size: 228.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for paradex_py-0.4.6.tar.gz
Algorithm Hash digest
SHA256 3a2d9d931c84054a4770b42e1a81324c0d51c9a0ba750f45d4658b46ba166b9e
MD5 fcd82fc4faa726d72eecb2b6d51ae501
BLAKE2b-256 532e4862950ed6ac91176c5eb7210e1ba559c7bfea2e6183648a7d1d5be29073

See more details on using hashes here.

File details

Details for the file paradex_py-0.4.6-py3-none-any.whl.

File metadata

  • Download URL: paradex_py-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for paradex_py-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c9104c8085cf5f9f9c9e5c52237928ce323f0a240f2bdbe9a2f832ede688bd5b
MD5 f47945619d09e30d982844540a2daf92
BLAKE2b-256 a260719ee7c502aa885c084934b94a1c4761edd0d84e5effcac2e80a7bd34c8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page