yanowo/Backpack-Grid-Trading — reverse-engineered prompt
Reverse engineered prompt
Build me a Python command line crypto grid trading bot for Backpack Exchange.
I want it to let me enter my Backpack API key and secret through environment variables, choose a trading pair like SOL_USDC, set an upper and lower price or let the bot auto choose a range around the current price, pick the number of grids, order quantity, run time, and update interval.
The bot should place grid buy and sell orders in the price range, then when a buy fills it should create the matching sell order above it, and when a sell fills it should create the matching buy order below it. It should connect to live market data with WebSocket, keep basic trade records or stats, and show clear logs and summaries in the terminal.
Please include a simple interactive CLI plus direct command line arguments, an example env file, requirements, and safe error handling. Add warnings that real trading is risky and make it easy to start with small test settings. Look up the current Backpack API docs online if needed.
Want more depth? Deep Reverse