> For the complete documentation index, see [llms.txt](https://docs.peach.ag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/uniswap-v4-hooks/trading-integration.md).

# Trading Integration

Choose a V4 router that supports MemeHookV2's returned fee adjustment. Read the Factory and Hook to identify the launch and pool; the selected router provides swap encoding, quotes and settlement.

### Build and submit a swap

1. Read the Pro Factory record and confirm graduation status PoolCreated.
2. Read the official pool ID and active configuration from the Hook proxy. Confirm the Quote, sorted currencies and tick spacing.
3. Select Exact Input or Exact Output. Derive direction from the input currency's position in the PoolKey.
4. Supply optional Partner `hookData`; see [Partner and HookData](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/uniswap-v4-hooks/partner-and-hookdata).
5. Follow the router's ERC20/Permit2 approval flow for the actual input asset and spender.
6. Quote and simulate the complete calldata with the sending wallet, balances, fees, deadline and final amount limits.
7. Submit and confirm the successful receipt, then display actual asset transfers and fees.

For Exact Input, the user specifies input and accepts a minimum final output. For Exact Output, the user requests output and accepts a maximum total input. A token buy or sell can use either mode.

### Enforce final amounts

Hook fees reduce output for Exact Input and increase input for Exact Output. Include the base Hook fee and Creator Tax in the router's final checks. These fees can be denominated in Quote or launch tokens; use the [fee-asset table and formulas](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/uniswap-v4-hooks/hook-behavior-and-fees).

A price limit can produce a partial fill. Display actual input spent and output received instead of assuming the request was fully filled. Gas is a separate network cost; see [Fees and Claims](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/fees-and-claims).

PoolManager invokes Hook callbacks as part of execution; wallets call the router rather than `afterSwap` or other callbacks directly.

If the token is still Swept, use [Graduation](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/graduation) to create or retry its pool. If timed recovery is available, [Emergency Exit](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/emergency-exit) is a different path from a swap.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/uniswap-v4-hooks/trading-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
