> ## Documentation Index
> Fetch the complete documentation index at: https://docs.route.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Orders and agent trades on Solana

> Limit, stop-loss, DCA and TWAP orders, and bots that trade within limits the owner signs once.

Partner keys. Tokens stay in the wallet. The route-delegate program enforces the tokens, size, price floor, interval, expiry and
keeper fee cap on every fill, and output always goes to the owner.

## Standing orders

**1. Prepare**

`GET /solana/orders/prepare?owner=&input=&output=&amount=&kind=limit|stop|dca|twap` (plus `minOut`, `slice`, `intervalS`,
`expiryS`). The owner signs and sends `tx`.

**2. Register**

`POST /solana/orders` with `{"policy": "<policy>"}`. Stop orders add `triggerOut`.

**3. Track or cancel**

`GET /solana/orders?owner=` lists orders and fills. `GET /solana/orders/revoke?policy=` returns the cancel transaction.

## Agent trades

Let a bot or AI agent trade from a wallet within limits the owner signs once.

1. Create the policy with `GET /solana/orders/prepare?...&kind=agent&agent=<agent public key>`; the owner signs and sends `tx`.
2. For each trade, `GET /solana/delegate/trade?policy=&input=&output=&amount=`. The agent signs `tx` and sends it with
   `POST /solana/gasless/submit`.
3. Cancel with `/solana/orders/revoke`.

Program addresses are on the [Solana overview](https://docs.route.fun/solana/overview.md#programs).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.