# DEX integration

Create liquidity pools on Raydium CPMM (Constant Product Market Maker).

### POST `/dex/raydium/cpmm/create-unsigned`

Create an **unsigned** transaction to initialize a Raydium CPMM pool for a token.

{% hint style="warning" %}
Requires JWT authentication.

Send `Authorization: Bearer <token>`.
{% endhint %}

#### Request body

```json
{
  "tokenMint": "TokenMintAddress...",
  "tokenAmount": "1000000000000",
  "solAmount": "1000000000"
}
```

#### Field notes

* `tokenAmount` is expressed in the token’s **smallest unit** (respecting the mint’s `decimals`).
* `solAmount` is expressed in **lamports** (`1 SOL = 1_000_000_000` lamports).
* The quote mint is Wrapped SOL (`So11111111111111111111111111111111111111112`).

#### Response (`200 OK`)

```json
{
  "transaction": "base64_encoded_transaction",
  "poolId": "pool_identifier",
  "poolKeys": {
    "id": "PoolAddress...",
    "baseMint": "TokenMintAddress...",
    "quoteMint": "So11111111111111111111111111111111111111112",
    "lpMint": "LpMintAddress...",
    "baseVault": "BaseVaultAddress...",
    "quoteVault": "QuoteVaultAddress..."
  }
}
```

#### What to do with the response

1. Decode and **sign** the returned `transaction` with the user wallet.
2. **Submit** the signed transaction to Solana.
3. Use `poolKeys` to display or reference the created pool.

### Related

* [Tokens](/api-reference/readme/tokens.md)
* [Error handling](/api-reference/readme/error-handling.md)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.taxsplit.app/api-reference/readme/dex-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
