Saturn Documentation
Launch App
  • Saturn
  • Traders
    • Trading in Saturn
    • How to Swap
    • How Saturn Protects Your Trades from MEV Risks
  • Liquidity Providers
    • Open a position in a Liquidity Pool
    • Managing your Portfolio on Saturn
  • Token Creators
    • How to Create a Pool on Saturn
  • Builders
    • Saturn API
      • Pool API
        • Initialize pool
        • Add Shards
        • Open position
        • Increase Liquidity
        • Remove Liquidity
        • Swap
        • Swap Quotes
        • Boost Transaction
        • Wallet
      • Indexer API
        • Collections
        • Pools
        • Prices
        • Positions
        • Transactions
        • Charts
        • Stats
    • Liquidity Pool SDK
  • Saturn V1
    • Overview
    • How-To-Links
      • Setting up Trading Account
        • Withdrawing from Trading account
      • Swap
      • Orderbook
        • Your Profile
          • Trade History
        • How to place a sell order
        • How to place a buy order
        • Positions
      • Collect
      • Charts
      • Tutorial videos
        • Setting up a Trading Account (v3) and preparing for Rings Airdrops
        • Trading on Saturn
    • FAQs
      • What are Satoshi's, Rare SATs, and Rings?
        • More on Rare SATs
      • What is a UTXO
      • What is a PSBT
      • Why are there batch sizes?
      • Compatible Wallets
      • Why is my Available balance different than my Total balance?
Powered by GitBook
On this page
  1. Builders
  2. Saturn API
  3. Indexer API

Pools

PreviousCollectionsNextPrices

Last updated 27 days ago

get

Returns the pool and its latest state

Path parameters
idstringRequired

Pool ID as hex string

Responses
200
Swap pool
application/json
Responseall of
400
Invalid pubkey format
404
Pool not found
get
GET /pool/by-id/{id} HTTP/1.1
Host: 127.0.0.1:3000
Accept: */*
{
  "id": "text",
  "feeRate": 1,
  "config": {
    "feeTier": 1,
    "shards": 1,
    "token0": "1234:5678",
    "token1": "1234:5678"
  },
  "invalid": true,
  "assetPair": {
    "token0Id": "1234:5678",
    "token1Id": "1234:5678"
  },
  "createdBlockHeight": "text",
  "shards": [
    {
      "poolPubkey": "text",
      "runeUtxo": null,
      "btcUtxos": [
        {
          "txid": "text",
          "vout": 1,
          "value": "text",
          "runes": [
            {
              "id": "1234:5678",
              "amount": "text"
            }
          ],
          "needsConsolidation": {
            "type": "no"
          }
        }
      ],
      "liquidity": "text",
      "protocolFeeOwed": "text",
      "lastBlockHeight": "text",
      "timesUpdated": "text",
      "kLast": "text",
      "kLastCounter": "text",
      "pendingToSend": [
        {
          "address": [
            1
          ],
          "amount": "text"
        }
      ],
      "swapBalance": {
        "blockHeight": 1,
        "runeToBtcSwaps": 1,
        "btcToRuneSwaps": 1
      },
      "pubkey": "text",
      "utxo": "text"
    }
  ],
  "token0Amount": "text",
  "token1Amount": "text",
  "liquidity": "text",
  "price": "text"
}
get

Returns a list of pool details with its current state where the token names match. Search is case-insensitive and will find pools where either token matches any of the given ones

Query parameters
token0stringRequired
token1stringRequired
feeTierinteger | nullOptional
Responses
200
Swap pools
application/json
404
No matching pools found
get
GET /pool/by-token-names HTTP/1.1
Host: 127.0.0.1:3000
Accept: */*
[
  {
    "id": "text",
    "feeRate": 1,
    "config": {
      "feeTier": 1,
      "shards": 1,
      "token0": "1234:5678",
      "token1": "1234:5678"
    },
    "invalid": true,
    "assetPair": {
      "token0Id": "1234:5678",
      "token1Id": "1234:5678"
    },
    "createdBlockHeight": "text",
    "shards": [
      {
        "poolPubkey": "text",
        "runeUtxo": null,
        "btcUtxos": [
          {
            "txid": "text",
            "vout": 1,
            "value": "text",
            "runes": [
              {
                "id": "1234:5678",
                "amount": "text"
              }
            ],
            "needsConsolidation": {
              "type": "no"
            }
          }
        ],
        "liquidity": "text",
        "protocolFeeOwed": "text",
        "lastBlockHeight": "text",
        "timesUpdated": "text",
        "kLast": "text",
        "kLastCounter": "text",
        "pendingToSend": [
          {
            "address": [
              1
            ],
            "amount": "text"
          }
        ],
        "swapBalance": {
          "blockHeight": 1,
          "runeToBtcSwaps": 1,
          "btcToRuneSwaps": 1
        },
        "pubkey": "text",
        "utxo": "text"
      }
    ],
    "token0Amount": "text",
    "token1Amount": "text",
    "liquidity": "text",
    "price": "text"
  }
]
get

Returns a list of pool details with its current state, where the provided ids match exactly and are optionally filtered by the fee tier

Query parameters
token0stringRequired
token1stringRequired
feeTierinteger | nullOptional
Responses
200
Swap pools
application/json
404
No matching pools found
get
GET /pool/by-token-ids HTTP/1.1
Host: 127.0.0.1:3000
Accept: */*
[
  {
    "id": "text",
    "feeRate": 1,
    "config": {
      "feeTier": 1,
      "shards": 1,
      "token0": "1234:5678",
      "token1": "1234:5678"
    },
    "invalid": true,
    "assetPair": {
      "token0Id": "1234:5678",
      "token1Id": "1234:5678"
    },
    "createdBlockHeight": "text",
    "shards": [
      {
        "poolPubkey": "text",
        "runeUtxo": null,
        "btcUtxos": [
          {
            "txid": "text",
            "vout": 1,
            "value": "text",
            "runes": [
              {
                "id": "1234:5678",
                "amount": "text"
              }
            ],
            "needsConsolidation": {
              "type": "no"
            }
          }
        ],
        "liquidity": "text",
        "protocolFeeOwed": "text",
        "lastBlockHeight": "text",
        "timesUpdated": "text",
        "kLast": "text",
        "kLastCounter": "text",
        "pendingToSend": [
          {
            "address": [
              1
            ],
            "amount": "text"
          }
        ],
        "swapBalance": {
          "blockHeight": 1,
          "runeToBtcSwaps": 1,
          "btcToRuneSwaps": 1
        },
        "pubkey": "text",
        "utxo": "text"
      }
    ],
    "token0Amount": "text",
    "token1Amount": "text",
    "liquidity": "text",
    "price": "text"
  }
]
get

Returns a list of detailed statistics for pools matching the provided IDs, including token information, TVL, volume, fees, and APY data.

Query parameters
poolIdsstring[]Optional
Responses
200
swap pools
application/json
404
No matching pools found
get
GET /pool/stats/by-ids HTTP/1.1
Host: 127.0.0.1:3000
Accept: */*
[
  {
    "poolId": "text",
    "token0": {
      "id": "1234:5678",
      "name": "text",
      "displayName": "text",
      "symbol": null,
      "divisibility": 1,
      "batchSize": 1,
      "supply": "text",
      "createdAt": "2025-05-20T14:49:58.990Z",
      "updatedAt": "2025-05-20T14:49:58.990Z",
      "type": "btc"
    },
    "token1": {
      "id": "1234:5678",
      "name": "text",
      "displayName": "text",
      "symbol": null,
      "divisibility": 1,
      "batchSize": 1,
      "supply": "text",
      "createdAt": "2025-05-20T14:49:58.990Z",
      "updatedAt": "2025-05-20T14:49:58.990Z",
      "type": "btc"
    },
    "token0Amount": "text",
    "token1Amount": "text",
    "liquidity": "text",
    "price": "text",
    "tvlNow": null,
    "tvl24hAgo": null,
    "tvlDiff": null,
    "volume24h": null,
    "volumePrev24h": null,
    "volumeDiff24h": null,
    "fees24h": null,
    "apy24h": null,
    "volume7d": null,
    "fees7d": null,
    "apy7d": null,
    "feeRate": 1
  }
]
get

Paginated list of swap pools stats matched by the filter

Query parameters
namestring | nullOptional
sortVolumestring | nullOptional
sortFeeGeneratedstring | nullOptional
limitinteger | nullOptional
offsetinteger | nullOptional
Responses
200
swap pools
application/json
get
GET /pool HTTP/1.1
Host: 127.0.0.1:3000
Accept: */*
200

swap pools

{
  "response": [
    {
      "poolId": "text",
      "token0": {
        "id": "1234:5678",
        "name": "text",
        "displayName": "text",
        "symbol": null,
        "divisibility": 1,
        "batchSize": 1,
        "supply": "text",
        "createdAt": "2025-05-20T14:49:58.990Z",
        "updatedAt": "2025-05-20T14:49:58.990Z",
        "type": "btc"
      },
      "token1": {
        "id": "1234:5678",
        "name": "text",
        "displayName": "text",
        "symbol": null,
        "divisibility": 1,
        "batchSize": 1,
        "supply": "text",
        "createdAt": "2025-05-20T14:49:58.990Z",
        "updatedAt": "2025-05-20T14:49:58.990Z",
        "type": "btc"
      },
      "token0Amount": "text",
      "token1Amount": "text",
      "liquidity": "text",
      "price": "text",
      "tvlNow": null,
      "tvl24hAgo": null,
      "tvlDiff": null,
      "volume24h": null,
      "volumePrev24h": null,
      "volumeDiff24h": null,
      "fees24h": null,
      "apy24h": null,
      "volume7d": null,
      "fees7d": null,
      "apy7d": null,
      "feeRate": 1
    }
  ],
  "offset": 1
}
  • GET/pool/by-id/{id}
  • GET/pool/by-token-names
  • GET/pool/by-token-ids
  • POST/pool/stats/by-filter
  • GET/pool/stats/by-ids
  • POST/pool/stats/by-token-filter
  • GET/pool
post

Returns a paginated list of pool statistics matching the provided filter criteria

Body
namearray | nullOptional
minTvlinteger | nullOptional
minVolumeinteger | nullOptional
sortarray | nullOptional
limitinteger | nullOptional
offsetinteger | nullOptional
Responses
200
swap pool
application/json
404
no matching pools found
post
POST /pool/stats/by-filter HTTP/1.1
Host: 127.0.0.1:3000
Content-Type: application/json
Accept: */*
Content-Length: 122

{
  "name": [
    "text"
  ],
  "minTvl": null,
  "minVolume": null,
  "sort": [
    {
      "field": "token0_name",
      "order": "ASC"
    }
  ],
  "limit": null,
  "offset": null
}
{
  "response": [
    {
      "poolId": "text",
      "token0": {
        "id": "1234:5678",
        "name": "text",
        "displayName": "text",
        "symbol": null,
        "divisibility": 1,
        "batchSize": 1,
        "supply": "text",
        "createdAt": "2025-05-20T14:49:58.990Z",
        "updatedAt": "2025-05-20T14:49:58.990Z",
        "type": "btc"
      },
      "token1": {
        "id": "1234:5678",
        "name": "text",
        "displayName": "text",
        "symbol": null,
        "divisibility": 1,
        "batchSize": 1,
        "supply": "text",
        "createdAt": "2025-05-20T14:49:58.990Z",
        "updatedAt": "2025-05-20T14:49:58.990Z",
        "type": "btc"
      },
      "token0Amount": "text",
      "token1Amount": "text",
      "liquidity": "text",
      "price": "text",
      "tvlNow": null,
      "tvl24hAgo": null,
      "tvlDiff": null,
      "volume24h": null,
      "volumePrev24h": null,
      "volumeDiff24h": null,
      "fees24h": null,
      "apy24h": null,
      "volume7d": null,
      "fees7d": null,
      "apy7d": null,
      "feeRate": 1
    }
  ],
  "offset": 1
}
post

Returns a paginated list of token pairs with aggregated pool statistics filtered by the provided criteria

Body
namearray | nullOptional
minTvlinteger | nullOptional
minVolumeinteger | nullOptional
sortarray | nullOptional
limitinteger | nullOptional
offsetinteger | nullOptional
Responses
200
swap pools
application/json
404
no matching pools found
post
POST /pool/stats/by-token-filter HTTP/1.1
Host: 127.0.0.1:3000
Content-Type: application/json
Accept: */*
Content-Length: 122

{
  "name": [
    "text"
  ],
  "minTvl": null,
  "minVolume": null,
  "sort": [
    {
      "field": "token0_name",
      "order": "ASC"
    }
  ],
  "limit": null,
  "offset": null
}
{
  "response": [
    {
      "token0": {
        "id": "1234:5678",
        "name": "text",
        "displayName": "text",
        "symbol": null,
        "divisibility": 1,
        "batchSize": 1,
        "supply": "text",
        "createdAt": "2025-05-20T14:49:58.990Z",
        "updatedAt": "2025-05-20T14:49:58.990Z",
        "type": "btc"
      },
      "token1": {
        "id": "1234:5678",
        "name": "text",
        "displayName": "text",
        "symbol": null,
        "divisibility": 1,
        "batchSize": 1,
        "supply": "text",
        "createdAt": "2025-05-20T14:49:58.990Z",
        "updatedAt": "2025-05-20T14:49:58.990Z",
        "type": "btc"
      },
      "volume24h": null,
      "volumeDiff24h": null,
      "volume7d": null,
      "fees24h": null,
      "tvlNow": "text",
      "tvl24hAgo": "text",
      "tvlDiff": "text",
      "smaller24hApy": null,
      "larger24hApy": null,
      "smaller7dApy": null,
      "larger7dApy": null,
      "pools": [
        {
          "id": "text",
          "tvlNow": "text",
          "tvl24hAgo": "text",
          "tvlDiff": "text",
          "volume24h": null,
          "volumeDiff24h": null,
          "fees24h": null,
          "apy24h": null,
          "volume7d": null,
          "fees7d": null,
          "apy7d": null,
          "price": "text",
          "token0Amount": "text",
          "token1Amount": "text",
          "liquidity": "text",
          "feeRate": 1
        }
      ]
    }
  ],
  "offset": 1
}