Skip to content

tradeparadex/paradex-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paradex CLI

PyPI version License: MIT

Paradex CLI is a command-line interface (CLI) for managing account contract setups, including printing account info, adding guardians, changing signers, and more.

Installation

Run without installing (recommended):

uvx paradex-cli <command>

Install as a persistent tool:

uv tool install paradex-cli
paradex-cli <command>

Environment Variables

All commands require PARADEX_ACCOUNT_ADDRESS and PARADEX_ACCOUNT_KEY.

Option 1 — .env file (recommended)

Copy the example and fill in your credentials. The CLI auto-loads .env from the current directory.

cp .env.example .env
# edit .env with your address and private key
paradex-cli <command>

Option 2 — explicit file path

Useful when you maintain separate credential files per environment:

paradex-cli --env-file ~/.paradex/prod.env <command>

Option 3 — inline / shell export

PARADEX_ACCOUNT_ADDRESS=0x... PARADEX_ACCOUNT_KEY=0x... paradex-cli <command>
# or
export PARADEX_ACCOUNT_ADDRESS=0x...
export PARADEX_ACCOUNT_KEY=0x...

Commands

Print Account Info

paradex-cli print-account-info ACCOUNT_ADDRESS --env ENVIRONMENT

Add Guardian

paradex-cli add-guardian PUB_KEY --env ENVIRONMENT

Add Guardian Backup

paradex-cli add-guardian-backup PUB_KEY --env ENVIRONMENT

Change Signer

paradex-cli change-signer PUB_KEY --env ENVIRONMENT

Sign Invoke Transaction

paradex-cli sign-invoke-tx FILE_PATH --env ENVIRONMENT

Submit Invoke Transaction

paradex-cli submit-invoke-tx TX_FILE_PATH SIG_FILES --env ENVIRONMENT

Withdraw to L1

Withdraw balance from Paraclear to bridge on L1.

paradex-cli withdraw-to-l1 L1_ADDRESS AMOUNT --env ENVIRONMENT

Transfer on L2

Withdraw balance from Paraclear and transfer to a different account on L2.

paradex-cli transfer-on-l2 L2_ADDRESS AMOUNT --env ENVIRONMENT

Deposit to Paraclear

Deposit balance to Paraclear from L2.

paradex-cli deposit-to-paraclear AMOUNT --env ENVIRONMENT

Trigger Escape Guardian

paradex-cli trigger-escape-guardian --env ENVIRONMENT

Escape Guardian

paradex-cli escape-guardian PUB_KEY --env ENVIRONMENT

Sign Register Sub-Operator Message

Generates an off-chain SNIP-12 signature that a sub-operator must produce before a vault operator can call register_sub_operator on the Transfer Registry contract.

PARADEX_ACCOUNT_KEY must be the sub-operator's private key.

paradex-cli sign-register-sub-operator-message VAULT_ADDRESS SUB_OPERATOR_ADDRESS --env ENVIRONMENT

Share the printed Nonce, Expiry, and Signature with the vault operator to complete on-chain registration.

Development

To contribute to this project, follow these steps:

1. Clone the Repository

git clone https://github.com/tradeparadex/paradex_cli.git
cd paradex_cli

2. Install Dependencies

uv sync

3. Run Tests

uv run pytest

4. Make Your Changes

Make your changes to the codebase.

5. Add Tests

Add tests for your new features or bug fixes.

6. Run Tests Again

uv run pytest

7. Commit Your Changes

Commit your changes and push them to your fork:

git add .
git commit -m "Description of your changes"
git push origin your-branch

8. Create a Pull Request

Create a pull request against the main branch of this repository.

Building the Project

uv build

Publishing the Project

UV_PUBLISH_TOKEN=<your-pypi-token> uv publish

About

Paradex CLI

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages