Python wrapper for Vortex SDK using Node.js subprocess
Project description
Vortex SDK - Python Wrapper
A Python wrapper for the Vortex SDK enabling cross-chain ramp operations from Python applications.
Overview
This package wraps the TypeScript/JavaScript Vortex SDK using Node.js subprocess execution, allowing Python developers to interact with Vortex's API for on-ramp and off-ramp operations.
Installation
Prerequisites
- Python 3.9+
- Node.js 18+
Install
git clone https://github.com/pendulum-chain/vortex-python-sdk.git
cd vortex-python-sdk
# Install the Vortex SDK
npm install
# Install Python package
pip install -e .
Install from PyPI (when published)
pip install vortex-sdk-python
npm install -g @vortexfi/sdk
Quick Start
from vortex_sdk import VortexSDK, FiatToken, EvmToken, Networks
config = {
"apiBaseUrl": "https://api.vortexfinance.co"
}
sdk = VortexSDK(config)
quote = sdk.create_quote({
"from": "pix",
"inputAmount": "150000",
"inputCurrency": FiatToken.BRL,
"outputCurrency": EvmToken.USDC,
"rampType": "on",
"to": Networks.Polygon
})
print(f"Quote ID: {quote['id']}")
result = sdk.register_ramp(quote, {
"destinationAddress": "0x1234567890123456789012345678901234567890",
"taxId": "123.456.789-00"
})
print(f"Deposit QR Code: {result['rampProcess']['depositQrCode']}")
# After PIX payment
sdk.start_ramp(result['rampProcess']['id'])
Core Features
- Simple Installation: Just
npm install+pip install - No Build Required: Works with npm-published SDK
- Full Compatibility: Uses Node.js subprocess for complete SDK support
- Async Support: Both sync and async methods available
- Type Hints: Full type annotations for IDE support
API Reference
See Full Documentation for complete API reference.
Key Methods
create_quote(request)- Create a new quoteget_quote(quote_id)- Get existing quoteregister_ramp(quote, data)- Register ramp processstart_ramp(ramp_id)- Start the rampget_ramp_status(ramp_id)- Check ramp status
All methods have async versions: create_quote_async(), etc.
Examples
See examples/ directory for complete code samples:
brl_onramp_example.py- PIX to USDCbrl_offramp_example.py- USDC to PIXasync_example.py- Async/await usage
Development
pip install -e ".[dev]"
pytest tests/
Links
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vortex_sdk_python-0.1.4.tar.gz.
File metadata
- Download URL: vortex_sdk_python-0.1.4.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4078a933c4e5be7a8173ef8b6f5d6af95cc687c981744e9ba260be03fbd92fe
|
|
| MD5 |
06987801edbedfe03e99f8a2d3d4e801
|
|
| BLAKE2b-256 |
fcdda989c45a464f9f8c404587ddb9bae95bdeca88e498137958dcc0aa998e8d
|
File details
Details for the file vortex_sdk_python-0.1.4-py3-none-any.whl.
File metadata
- Download URL: vortex_sdk_python-0.1.4-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fe3d0d42e6609e2a43830458f6d4820811e50e81e7644c28b6cec4b6a898a3c
|
|
| MD5 |
4fc09dd9e3fa599f91feea150c4e7dd7
|
|
| BLAKE2b-256 |
4d71b523a192b91457383e0fd5a43563f55551ce58e2c96d51c3cde32e724bda
|