Skip to content

tradingdesk26/paradex-delta-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paradex Delta Hedge Bot (v0.8)

A lightweight, production-ready delta-hedging bot for Paradex PERP options, built on top of the official paradex_py SDK.

This tool is designed for traders who need:

  • automated delta-neutral hedging for PERP option books,
  • fast IV estimation (BS inversion),
  • real-time Greeks,
  • clean execution via taker IOC orders,
  • a simple CLI interface,
  • error logging,
  • zero coding skills required.

The bot supports both Black-Scholes and Bachelier delta models.


🚀 Features

✔ Automated Delta Hedging

  • Calculates portfolio delta across all PERP and PERP_OPTION positions.
  • Computes per-contract signed delta for each position.
  • Places taker IOC orders on the underlying PERP market to neutralize delta.

✔ Two Delta Models

  • Black–Scholes (lognormal)
  • Bachelier (normal model)

User can select the model at runtime.

✔ IV Extraction

  • Computes implied volatility from mid-price via bisection BS inversion.

✔ Intelligent Execution

  • Normalizes order size to Paradex step size (0.0001)
  • Uses aggressive IOC limit orders
  • Automatically determines hedging direction (buy/sell)

✔ Full Logging

  • Every decision, market value, Greek, order, and error is logged.
  • Logs are written both to terminal and stealth_delta_bot.log.

✔ Safe Mode (DRY_RUN)

Optional simulation mode (no orders will be sent).


📦 Requirements

  • Python 3.10+
  • paradex_py SDK

Install:

pip install paradex-py


🛠 Configuration

Before running the bot, you must export two environment variables:

export PARADEX_SUBKEY_PRIVATE_KEY=0xYOUR_PRIVATE_KEY
export PARADEX_ACCOUNT_ADDRESS=0xYOUR_PARACLEAR_ADDRESS

To check they are set:

echo $PARADEX_SUBKEY_PRIVATE_KEY
echo $PARADEX_ACCOUNT_ADDRESS

▶ Running the Bot

From your project directory:
delta_bot.py


The bot will ask:

Base asset (ETH/BTC)

Hedge market (ETH-USD-PERP or BTC-USD-PERP)

Delta model (BS / BACHELIER)

Target delta (default 0)

Delta band (dead-zone for noise filtering)

Example:

Base asset [ETH]:
Hedge market [ETH-USD-PERP]:
Delta model [BACHELIER]:
Target delta [0.0]:
Delta band [0.0]:

Then the bot runs continuously and hedges every 20 seconds.

🧩 File Structure
paradex-delta-bot/
│── bot.py                # main bot file (v0.8)
│── README.md             # this file
│── stealth_delta_bot.log # auto-created on first run

🧪 Simulation Mode (Dry Run)
Set:
DRY_RUN = True

Bot will:

calculate everything,

log everything,

NOT place orders.

🤝 Intended Audience

This bot is suitable for:

Paradex users trading PERP options

Market-makers

Structure product desks

Hedging desks

Prop trading teams

Retail traders needing delta-neutrality

Can be offered “as-is” directly to Paradex community.

🛡 Disclaimer

This bot executes real trades.
Use at your own risk.
The authors do not accept any responsibility for losses.

📧 Contact

For questions, integrations, or commercial use:

(Tradingdesk26@gmail.com)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages