> For the complete documentation index, see [llms.txt](https://docs.shyft.to/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shyft.to/solana-indexers/case-studies/pump-swap-amm/get-pool-by-creator-address.md).

# Get Pool by Creator Address

Pump AMM's architecture allows for the retrieval of liquidity pool details not only by pool address, but also by the creator of the pool. Here, we filter by the `creator` field to fetch pool details.

You can directly copy paste this code on <mark style="color:yellow;">replit</mark> and see it in action.

#### Fetch parsed Pump swap pool info

{% tabs %}
{% tab title="Code Snippet" %}
{% code overflow="wrap" %}

```javascript
async function getPoolDetailsByCreator(creatorAddress) {
  const SHYFT_API_KEY = "YOUR_SHYFT_API_KEY";
  //query to get pool details on PumpSwap by creator address
  const operationsDoc = `
    query MyQuery {
    pump_fun_amm_Pool(
      where: {creator: {_eq: ${JSON.stringify(creatorAddress)}}}
    ) {
          base_mint
          creator
          index
          lp_mint
          lp_supply
          pool_base_token_account
          pool_bump
          pool_quote_token_account
          quote_mint
          pubkey
      }
  }
`; //you can cherrypick the fields as per your requirement

 const result = await fetch(
    `https://programs.shyft.to/v0/graphql/accounts?api_key=${SHYFT_API_KEY}&network=mainnet-beta`, //SHYFT's GQL endpoint
    {
      method: "POST",
      body: JSON.stringify({
        query: operationsDoc,
        variables: {},
        operationName: "MyQuery",
      }),
    }
  );

  const { errors, data } = await result.json();

  console.dir(data, { depth: null });
}

getPoolDetailsByCreator("6jpk47MKaa9vaswNq8yEGnBn8K5K8sx2RKgtbLP2zP4P");
//creator wallet address
```

{% endcode %}
{% endtab %}

{% tab title="Response" %}

```json
{
  "pump_fun_amm_Pool": [
      {
        "base_mint": "5NJfQ6UQ1LJTxtKLrsZQcbiSUWequSD6aZLNJaN7Zviv",
        "creator": "6jpk47MKaa9vaswNq8yEGnBn8K5K8sx2RKgtbLP2zP4P",
        "index": 0,
        "lp_mint": "3CMNA3PvmrD7jg8qmUrtSE2to3ELQnzQefoYnJko4eCW",
        "lp_supply": 2000000,
        "pool_base_token_account": "EUvinovzn65sVYHS8XdjSqNAjTXVA3JXTBdXpSjdhjCQ",
        "pool_bump": 255,
        "pool_quote_token_account": "ACMdDcxUzABcrREDQnyHrTTHi5hADccKiuBV6HMeTCf8",
        "quote_mint": "So11111111111111111111111111111111111111112",
        "pubkey": "FZwfzCwUdkFD2dvuN65LYkkPNRDtgRCFQhPLoYZJH24m"
      }
  ]
}
```

{% endtab %}
{% endtabs %}

The response contains `base_mint` and `quote_mint` which is the <mark style="color:yellow;">liquidity pool pair</mark>. Please note that more fields such as `pool_base_token_account`, `pool_quote_token_account`, `lp_supply`can also be cherrypicked, or omitted as per your requirement.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.shyft.to/solana-indexers/case-studies/pump-swap-amm/get-pool-by-creator-address.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
