Documentation
Last updated:
From zero to a running bot: connect a venue, understand the preview and know what you can touch while it trades.
Start in simulation and with little capital. A leveraged bot can lose all of its assigned margin in one adverse move. The recommended sequence is: simulation → Hyperliquid testnet → live with 20 USDC at 1× → scale up slowly.
1. Connect a venue
CRYPTON never asks for your seed phrase. What is stored is a delegated signing key: it places and cancels orders in your account, but cannot withdraw. You generate it on the venue and revoke it there whenever you want, without going through us.
| Venue | What it asks for | Worth knowing |
|---|---|---|
| Hyperliquid | API wallet — cannot withdraw | Has a public testnet: the best place to try a bot risking nothing. |
| Lighter | Account index + API key | Leverage is set per market before the bot is created. |
| Aster | EIP-712 API wallet — cannot withdraw | Position and margin mode must be set per market. |
The connection is verified before being saved, with a read-only call. If the credential does not work, it is not stored.
How the key is stored
With envelope encryption: each credential is encrypted with a unique data key, and that key with the server master key. A database dump without the master key cannot sign a single order. Decryption happens only in the memory of the process running your bot.
2. The preview
Before you confirm, the app computes the full ladder with the same code the engine will run. For every level it shows price, size, margin and cumulative notional; and at the end, the worst case.
- Worst-case notional. Total exposure if the whole ladder fills.
- Resulting average price. Where your average entry would land in that scenario.
- Estimated liquidation and how far in percent it sits from the current price.
- Per-level warnings. If a level falls below the minimum notional or does not fit the price grid, it is flagged and the bot is not created.
3. Editing a running bot
Every parameter carries a label saying what happens when you change it live. It is not a generic warning: it determines what the engine does.
| Label | What the bot does | Examples |
|---|---|---|
| HOT | Applied on the next cycle. Orders are adjusted; the position is untouched. | Take profit, spread in bps, caps, stop loss |
| WARM | Cancels and re-lays the ladder. The position stays open. Asks for confirmation. | Levels, range, step, scales, investment, leverage |
| COLD | Rejected. Changing it would be a different bot. | Pair, venue, side, strategy, margin mode |
Leverage is WARM and not HOT for a concrete reason: many venues reject it with an open position and, when they accept it, it moves your liquidation price.
Execution controls
| Action | Effect |
|---|---|
| Start | Starts the bot and lays the ladder. |
| Pause | Cancels the orders. Keeps the position. |
| Resume | Lays the ladder again without closing anything. |
| Stop keeping position | Cancels orders and stops the bot; the position stays in your name. |
| Stop and close | Cancels orders and closes at market. Irreversible: asks for confirmation. |
| Close now | Closes the position at market without stopping the bot. |
| Take profit now | Closes at market without waiting for the target. |
| Trigger safety order | Executes the next pending safety order at market. |
| Re-centre grid | Re-hangs the ladder from the current price. |
| Cancel orders | Pulls all of the bot orders; the position is untouched. |
| Panic | Cancels everything and closes at market. Also available globally. |
4. Risk panel
Limits are checked when the bot is created and on every engine cycle. A bot that was safe at launch can be 3% from liquidation half an hour later.
- Max notional per bot and aggregated across all of your bots.
- Max leverage and number of concurrent bots.
- Max daily loss: once crossed, no new bots start.
- Drawdown that triggers the automatic pause on assigned capital.
- Liquidation alert distance, with a tiered warning.
When a guard trips, the bot pauses. It does not close: closing would realise the loss instantly and at the worst moment. Pausing stops the bleeding and leaves the final call with you.
5. Simulation mode
A simulated bot consumes the venue real prices but sends no orders: it fills them in memory. It charges fees and applies slippage, so the result is not artificially optimistic.
What simulation does not reproduce:
- Book depth: an order fills in full the moment its price is touched.
- Queue priority for post-only orders.
- Liquidation by the venue.
The mode is fixed at creation and cannot be changed: mixing simulated and live fills in one history would make its PnL meaningless.
6. What happens when something fails
The engine does not replay memorised steps: on every cycle it computes which orders should exist and compares them with the ones actually on the venue. It only executes the difference. Three properties follow:
- It recovers on its own. A restart, a dropped WebSocket or an order you cancel by hand: the next cycle converges again.
- It does not duplicate positions. Every order carries a deterministic id and fills are deduplicated. A retry after a timeout does not open the position twice.
- It respects what is not its own. If you trade by hand in the same account, those orders are left alone.
Support
If you write about a specific bot, include its id: every bot keeps a full log of what it did and why, with the configuration in force at each moment.