A Python wrapper for the Vortex SDK enabling cross-chain ramp operations from Python applications.
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.
- Python 3.9+
- Node.js 18+
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 .pip install vortex-sdk-python
npm install -g @vortexfi/sdkfrom 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'])- 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
See Full Documentation for complete API reference.
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.
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
pip install -e ".[dev]"
pytest tests/