Link to Paradex | Referral code - cp0x1 | -10% commission with referral code | Referral Dashboard
This software is for informational purposes only. It does not constitute financial advice, and users should conduct their own research before executing any trading strategies.
py -m venv venvWindows venv/Scripts/activate
Linux/macOS source venv/bin/activate
pip install -r requirements.txtenv $(cat environments/parallel/sub-1-2/.env.parallel.BERA | sed '/^\s*#/d; /^\s*$/d; s/#.*//; s/\r//g' | xargs) python main.pysoftware-mansion/starknet.py#1141
Ping is the main parameter that will affect the bot's speed and, accordingly, its competitiveness with other bots.
For minimal ping, I recommend hosting the bot on servers located in Tokyo (AWS AP-NORTHEAST-1).
Docx about Paradex server location
ping s3.ap-northeast-1.amazonaws.comSingle
EXCHANGE_TYPE=1# 1 - Paradex | 2 - Backpack
L1_ADDRESS=# ETH public address
L2_PRIVATE_KEY=# Paradox private key for account/subParallel
EXCHANGE_TYPE_1=1# 1 - Paradex | 2 - Backpack
L1_ADDRESS_1=# ETH public address
L2_PRIVATE_KEY_1=# Paradox private key for FIRST account/sub
EXCHANGE_TYPE_2=1# 1 - Paradex | 2 - Backpack
L1_ADDRESS_2=# ETH public address
L2_PRIVATE_KEY_2=# Paradox private key for SECOND account/subEXCHANGE_TYPE=2# 1 - Paradex | 2 - Backpack
API_KEY=
API_SECRET=Parallel
EXCHANGE_TYPE_1=2# 1 - Paradex | 2 - Backpack
API_KEY_1=
API_SECRET_1=
EXCHANGE_TYPE_2=2# 1 - Paradex | 2 - Backpack
API_KEY_2=
API_SECRET_2=EXCHANGE_TYPE_1=2# 1 - Paradex | 2 - Backpack
API_KEY_1=
API_SECRET_1=
EXCHANGE_TYPE_2=2# 1 - Paradex | 2 - Backpack
L1_ADDRESS_2=# ETH public address
L2_PRIVATE_KEY_2=# Paradox private key for SECOND account/subIS_DEV=False/True# Prod/Testnet enviroment
LOG_FILE=False/True# Put it True if you want to save logs in file
PING_SECONDS=0.3# Ping from your server to paradex server in seconds(Check Ping section on top)
INITIAL_CLOSE_ALL_POSITIONS=False/True# Put it True if you want to close all postions and orders before start tradingMARKET=BERA-USD-PERP
PRICE_STEP=0.001
PRICE_ROUND=3# Number of decimal places for price step
SIZE_ROUND=0# Number of decimal places for order size step
MARKET_MIN_ORDER_SIZE=8# Minimal posible order size
MAX_LEVERAGE=5BACKPACK_MARKET=BERA_USDC_PERP
BACKPACK_PRICE_STEP=0.0001
BACKPACK_PRICE_ROUND=4# Number of decimal places for price step
BACKPACK_MARKET_MIN_ORDER_SIZE=0.1# Number of decimal places for order size step
BACKPACK_SIZE_ROUND=1# Minimal posible order size
MAX_LEVERAGE=5If you use different exchanges, you need to add "Default for market" for both
DEFAULT_DEPTH_ORDER_BOOK_ANALYSIS=5# Number of first order in book for analysis
MAX_PRICE_STEPS_GAP=3# Max price steps gap between to order in book for place your order before
MIN_MARK_PRICE_PRICE_GAPS=3# Min number of price gap between order price and mark priceSingle
STRATEGY_TYPE=1
MAX_POSITION_SIZE=30# Max full position on one side
MIN_ORDER_SIZE=15
MAX_ORDER_SIZE=15
MIN_POSITION_TIME_SECONDS=30# Min time for position life
MAX_TAKER_POSITION_TIME_SECONDS=600# After this TIME is over, position will close by MARKET
MAX_MAKER_POSITION_TIME_SECONDS=180# After this TIME is over, position will try close aggressive(first in order book) be LIMIT
TAKE_PROFIT_TAKER_THRESHOLD=0.02# If this profit percentage is reached, the position will be closed at MARKET
TAKE_PROFIT_MAKER_THRESHOLD=0.01# If this profit percentage is reached, the position will try close aggressive(first in order book) be LIMIT
STOP_LOSS_TAKER_THRESHOLD=0.05# If this lost percentage is reached, the position will be closed at MARKET
STOP_LOSS_MAKER_THRESHOLD=0.02# If this lost percentage is reached, the position will try close aggressive(first in order book) be LIMITParallel
STRATEGY_TYPE=2
TRADING_MODE=1# 1 - Limit-Limit | 2 - Limit-Market
DEFAULT_ORDER_SIZE=15#Order size with will be use for open postions
POSITION_TIME_THRESHOLD_SECONDS=600#After this TIME is over, position will try to closeTRADING_MODE - 1 | The bot will try to open a position using a LIMIT order and close it also using a Limit order in both accounts.
TRADING_MODE - 2 | The bot will try to open a position using a LIMIT order for both accounts, but if one account has an open position, the other one will open a position using a MARKET order for hedging. For closing working in same way
This strategy works best on mid-liquidity pairs with a small-medium spread. With low volatility and relatively high trading volume, it can even trade at a profit, but during price spikes, it will incur losses.
Also, the more bots using this strategy on the same pair, the less effective it becomes.
Best for: Use this strategy if you want to accumulate trading volume without holding a position for a specific time and are not afraid of losses during price spikes.
The difference between this strategy and the first one is that it uses two accounts that will hedge each other.
It will always try to open and close positions with LIMIT orders.
Recommendations for pairs remain the same as in the first strategy: mid-liquidity**, small-medium spread**.
The risks of price spikes remain the same, but only if the position was opened on just one account.
Best for: Use this strategy and mode if you want to apply the principles of the first strategy(trading volume) but also aim to hold positions for a significant amount of time.
Initially, it will try to open/close with a LIMIT order, but if there is a difference in position size, it will open/close the position on the other account using a Market order.
In this strategy, the only risk of price slippage occurs when balancing positions using MARKET orders.
Best for: Use this strategy for pairs with low volume and low open interest since the costs will be nearly the same for all paris, while low-liquidity pairs provide more points.
If you want to use this bot's trading strategies on other exchanges or to STRATEGY_TYPE=2 on a different exchange for
hedge, you need to implement an abstract class BaseExchange and pass the required exchange when initializing the
strategy in main().