saturnswap-limit-orders
Installation
SKILL.md
SaturnSwap Limit Orders
Guide users through placing and cancelling limit orders on SaturnSwap.
Capabilities
- Place limit buy orders (bid ADA for tokens at a target price)
- Place limit sell orders (offer tokens at a target ADA price)
- Cancel existing open orders
- Preview order placement against current order book
Place Limit Order Flow
- Find the pool — look up by ticker or policy ID
- Check current prices — show best bid/ask and current price
- Calculate amounts — user specifies price and quantity
- Build transaction — call
createLimitOrder - Hand off to operator — for signing and submission
Cancel Order Flow
- List open orders — use
getUserOrdersto find active orders - Confirm which orders to cancel — get explicit user approval
- Build cancel transaction — call
cancelOrderwith UTxO IDs - Hand off to operator — for signing and submission
Scripts
Preview Limit Order
node scripts/preview-limit.js --pool <uuid> --side buy|sell --price <ada-per-token> --amount <display-units>
Create Limit Order Transaction
node scripts/create-limit.js --address <bech32> --pool <uuid> --policy <policyId> --asset <assetName> --sell <amount> --buy <amount>
Create Cancel Transaction
node scripts/create-cancel.js --address <bech32> --utxo-ids <id1,id2,...>
Key Concepts
- Limit buy: You sell ADA to buy tokens at your target price or better
policyId/assetName= "" (selling ADA),tokenAmountSell= ADA amount,tokenAmountBuy= tokens you want
- Limit sell: You sell tokens to get ADA at your target price or better
policyId/assetName= token's policy/asset,tokenAmountSell= tokens,tokenAmountBuy= ADA you want
- Price =
tokenAmountBuy / tokenAmountSell(or vice versa depending on direction) - All amounts in display units
Safety Rules
- Always show the effective price and compare to current market price
- Warn if limit price is >20% away from market (possible mistake)
- Require confirmation before creating the transaction
- For cancels, show order details before confirming
Related skills