Limit Orders
Automate your trades with limit orders. Set a target price and SnowForge will execute the buy or sell for you when the market reaches it.
There are two types of limit orders, each with an automatic trigger direction:
- Sell Limit — sells your tokens when a price target is reached. The trigger direction is inferred automatically:
- Take Profit (TP): trigger price is above the current price — sells when the price rises to your target.
- Stop Loss (SL): trigger price is below the current price — sells when the price drops to your floor.
- Buy Limit — buys tokens when the price drops to your target. You deposit AVAX into an escrow contract upfront, and the buy executes automatically when the price is reached.
Buy limit orders require depositing AVAX into the LimitOrderEscrow contract. The flow is:
- You set a target price and AVAX amount.
- A small flat AVAX deposit fee is deducted, and the rest is held securely on-chain in the escrow contract.
- When the token price drops to your target, the backend triggers the buy through the escrow contract. A small percentage-based execution fee is deducted from the escrowed AVAX before the buy.
- If you cancel the order before it triggers, the escrowed AVAX (minus the deposit fee) is refunded to your wallet.
Sell limit orders require depositing your tokens into the SellOrderEscrow contract. This locks the tokens upfront so the order is guaranteed to execute when the price target is hit. The flow is:
- You set a target price and sell percentage. The exact token amount is calculated from your current balance.
- You approve the escrow contract and deposit the tokens along with a small flat AVAX deposit fee.
- When the token price reaches your target, the backend sells the escrowed tokens. A small percentage-based execution fee is deducted from the AVAX proceeds before the rest is sent to your wallet.
- If you cancel the order before it triggers, the escrowed tokens are refunded to your wallet. The deposit fee is non-refundable.
When creating a sell limit order you choose how much of your position to sell when the order triggers: 25%, 50%, 75%, or 100%.
The percentage is applied to your token balance at the time you create the order. The exact token amount is calculated and locked in the escrow contract, so the amount that sells is fixed regardless of any balance changes afterwards.
You can create a linked pair by setting both a take-profit and a stop-loss at the same time. When one order triggers and executes, the other is automatically cancelled.
This is useful when you want to lock in profit if the price goes up while also protecting against downside if it drops. Only one of the two orders will ever execute.
Orders use a default slippage tolerance of 5%, which you can adjust when creating the order. Higher slippage increases the chance of execution in volatile markets but may result in a worse fill price.
Each order moves through the following statuses:
| Status | Description |
|---|---|
| Active | Order is live and monitoring the token price. |
| Triggered | Price condition was met. The order is queued for on-chain execution. |
| Executed | The transaction completed successfully. |
| Cancelled | You manually cancelled the order before it triggered. |
| Failed | The order triggered but the on-chain transaction failed (e.g. insufficient balance, slippage exceeded). |
| Expired | The order reached its expiration time without triggering. |
When your price condition is met, the backend submits a transaction to the appropriate smart contract:
- Sell limits — executed through the SellOrderEscrow contract, which sells your escrowed tokens for AVAX via the bonding curve or SnowDex router.
- Buy limits — executed through the LimitOrderEscrow contract, which uses your deposited AVAX to buy tokens.
See the Contracts page for contract addresses.
