createMonster/lotusx — reverse-engineered prompt
Reverse engineered prompt
Build me a Rust library called LotusX that lets one app connect to several crypto exchanges through the same simple interface. I want it to support Binance spot and perpetual, Bybit spot and perpetual, Hyperliquid, Backpack, and Paradex. It should let a developer fetch markets, stream live prices over WebSockets with reconnects, place orders, and read account information without learning a different style for each exchange.
Please make it async, safe with API keys, and able to load keys from an env file. Include testnet support so people can try it safely before using real money. Add clear examples for basic market lookup, placing a small limit order, WebSocket ticker streaming, and exchange specific demos.
Also include a latency testing example that compares exchanges and prints practical numbers like mean latency, p95, p99, jitter, reliability, and simple trading related metrics. Keep the public API typed and clean, add tests where possible, and make sure clippy and formatting pass. Look up current exchange API docs online if you need to.
Want more depth? Deep Reverse