---
agentTools:
  projectIndex: https://ociswap.readme.io/llms.txt
---

# Get pool from Ociswap

Get pool from Ociswap by its component address or its slug

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "0.6.1",
    "title": "Ociswap API",
    "description": "Ociswap API",
    "license": {
      "name": "MIT License",
      "url": "https://api.ociswap.com/license"
    }
  },
  "servers": [
    {
      "url": "https://api.ociswap.com"
    }
  ],
  "security": [],
  "paths": {
    "/pools/{pool_identifier}": {
      "get": {
        "operationId": "pool",
        "description": "Get pool from Ociswap by its component address or its slug",
        "summary": "Get pool from Ociswap",
        "parameters": [
          {
            "name": "pool_identifier",
            "in": "path",
            "description": "The component address or the slug of the pool to fetch",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pool"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "description": "Pool not found",
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "description": "An unexpected error occured",
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Error": {
        "description": "Error response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "string",
                  "description": "Error message"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "ResourceAddress": {
        "description": "Bech32m-encoded human readable version of the resource (fungible, non-fungible) global address or hex-encoded id.",
        "type": "string"
      },
      "Decimal": {
        "description": "String-encoded decimal representing the amount of a related fungible resource.",
        "type": "string",
        "format": "decimal"
      },
      "TokenEmbedded": {
        "type": "object",
        "required": [
          "address",
          "name",
          "symbol"
        ],
        "properties": {
          "address": {
            "$ref": "#/components/schemas/ResourceAddress"
          },
          "name": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "icon_url": {
            "type": "string"
          }
        }
      },
      "Pool": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "liquidity_pool_address": {
            "type": "string"
          },
          "lp_token_address": {
            "type": "string"
          },
          "created_at": {
            "description": "The time when the pool was created on Ociswap.",
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "rank": {
            "type": "integer"
          },
          "version": {
            "type": "string"
          },
          "fee_rate": {
            "$ref": "#/components/schemas/Decimal"
          },
          "x": {
            "$ref": "#/components/schemas/PoolToken"
          },
          "y": {
            "$ref": "#/components/schemas/PoolToken"
          },
          "liquidity": {
            "$ref": "#/components/schemas/AmountsTimes"
          },
          "total_value_locked": {
            "description": "The total value locked inside this pool",
            "$ref": "#/components/schemas/BaseAmountsTimes"
          },
          "volume": {
            "$ref": "#/components/schemas/BaseAmountsIntervals"
          },
          "fee": {
            "description": "The amount of fee collected in this pool",
            "$ref": "#/components/schemas/BaseAmountsIntervals"
          },
          "apr": {
            "description": "Annual percentage rate of the pool",
            "$ref": "#/components/schemas/ValueIntervals"
          },
          "base_token": {
            "description": "The token that is recommended to be used as the base token for this pool in a user interface",
            "type": "string",
            "enum": [
              "x",
              "y"
            ]
          },
          "blueprint_name": {
            "description": "The blueprint used to create this pool",
            "type": "string"
          },
          "pool_type": {
            "description": "The pool type",
            "type": "string",
            "enum": [
              "basic",
              "precision",
              "flex"
            ]
          }
        }
      },
      "PoolToken": {
        "description": "Information about a token of the pool",
        "type": "object",
        "properties": {
          "token": {
            "$ref": "#/components/schemas/TokenEmbedded"
          },
          "price": {
            "$ref": "#/components/schemas/AmountsTimes"
          },
          "liquidity": {
            "description": "The current active liquidity in the pool's token",
            "$ref": "#/components/schemas/AmountsTimes"
          },
          "total_value_locked": {
            "description": "The total value locked in the pool's token",
            "$ref": "#/components/schemas/AmountsTimes"
          },
          "volume": {
            "$ref": "#/components/schemas/ValueIntervals"
          },
          "fee": {
            "description": "The fee collected in the pool's token",
            "$ref": "#/components/schemas/AmountsIntervals"
          }
        }
      },
      "ValueTimes": {
        "type": "object",
        "properties": {
          "now": {
            "$ref": "#/components/schemas/Decimal"
          },
          "1h": {
            "$ref": "#/components/schemas/Decimal"
          },
          "24h": {
            "$ref": "#/components/schemas/Decimal"
          },
          "7d": {
            "$ref": "#/components/schemas/Decimal"
          },
          "percent_change": {
            "$ref": "#/components/schemas/PercentChange"
          }
        }
      },
      "PercentChange": {
        "type": "object",
        "properties": {
          "24h": {
            "$ref": "#/components/schemas/Decimal"
          },
          "7d": {
            "$ref": "#/components/schemas/Decimal"
          }
        }
      },
      "ValueIntervals": {
        "type": "object",
        "properties": {
          "1h": {
            "$ref": "#/components/schemas/Decimal"
          },
          "24h": {
            "$ref": "#/components/schemas/Decimal"
          },
          "7d": {
            "$ref": "#/components/schemas/Decimal"
          },
          "total": {
            "$ref": "#/components/schemas/Decimal"
          }
        }
      },
      "BaseAmountsTimes": {
        "type": "object",
        "properties": {
          "xrd": {
            "$ref": "#/components/schemas/ValueTimes"
          },
          "usd": {
            "$ref": "#/components/schemas/ValueTimes"
          }
        }
      },
      "AmountsTimes": {
        "type": "object",
        "properties": {
          "token": {
            "$ref": "#/components/schemas/ValueTimes"
          },
          "xrd": {
            "$ref": "#/components/schemas/ValueTimes"
          },
          "usd": {
            "$ref": "#/components/schemas/ValueTimes"
          }
        }
      },
      "BaseAmountsIntervals": {
        "type": "object",
        "properties": {
          "xrd": {
            "$ref": "#/components/schemas/ValueIntervals"
          },
          "usd": {
            "$ref": "#/components/schemas/ValueIntervals"
          }
        }
      },
      "AmountsIntervals": {
        "type": "object",
        "properties": {
          "token": {
            "$ref": "#/components/schemas/ValueIntervals"
          },
          "xrd": {
            "$ref": "#/components/schemas/ValueIntervals"
          },
          "usd": {
            "$ref": "#/components/schemas/ValueIntervals"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 18,
      "2": 175,
      "3": 145,
      "4": 46,
      "5": 146,
      "6": 246,
      "7": 0,
      "8": 30,
      "9": 1,
      "10": 34,
      "11": 138
    }
  }
}
```