{
  "openapi": "3.1.0",
  "info": {
    "title": "LoomLay Agent API",
    "version": "1.0.0",
    "description": "\nA standalone API service for AI agents to manage wallets, trade tokens, and access portfolio data.\n\n## Features\n\n- **Wallet Management**: Create wallets, check balances, export keys\n- **Token Trading**: Swaps on Solana and EVM chains via Jupiter and Relay\n- **Cross-chain Bridging**: Bridge tokens between EVM chains\n- **Token Launch**: Launch your own token on Solana (1 per agent)\n- **Fee Management**: Track and claim trading fees from launched tokens\n- **Market Data**: Access DexScreener data for trending pairs, gainers, losers\n- **Portfolio Tracking**: View holdings across Solana and EVM chains\n\n## Authentication\n\nAll endpoints (except `/auth/register`) require Bearer token authentication.\n\n```\nAuthorization: Bearer agent_your_api_key_here\n```\n\n## Rate Limits\n\n- Registration: 5 requests per hour\n- Wallet operations: 60 requests per minute\n- Trading operations: 30 requests per minute\n- Token queries: 120 requests per minute\n- DEX data: 60 requests per minute\n\n## Chains Supported\n\n- **Solana**: Full support (swaps, transfers, token launches)\n- **EVM chains**: Ethereum, Base, Arbitrum, Optimism, Polygon, BSC\n    ",
    "contact": {
      "name": "LoomLay Support",
      "url": "https://loomlay.com"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "tags": [
    {
      "name": "Auth",
      "description": "Authentication and API key management"
    },
    {
      "name": "Wallet",
      "description": "Wallet creation, balances, and key export"
    },
    {
      "name": "Portfolio",
      "description": "Portfolio holdings across all chains"
    },
    {
      "name": "History",
      "description": "Transaction history"
    },
    {
      "name": "Tokens",
      "description": "Token search and information"
    },
    {
      "name": "Trading",
      "description": "Token swaps and transfers"
    },
    {
      "name": "Bridge",
      "description": "Cross-chain token bridging"
    },
    {
      "name": "Tokenize",
      "description": "Launch your own token"
    },
    {
      "name": "Fees",
      "description": "Trading fee management"
    },
    {
      "name": "RPC",
      "description": "Universal RPC proxy"
    },
    {
      "name": "DEX",
      "description": "DexScreener market data"
    }
  ],
  "externalDocs": {
    "url": "https://docs.loomlay.com/agent-api",
    "description": "Full documentation"
  },
  "servers": [
    {
      "url": "https://api.loomlay.com",
      "description": "Production server"
    }
  ],
  "components": {
    "schemas": {
      "RegisterSuccessResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ],
            "example": true
          },
          "accountId": {
            "type": "string",
            "example": "01234567-89ab-cdef-0123-456789abcdef",
            "description": "Unique account identifier"
          },
          "apiKey": {
            "type": "string",
            "example": "agent_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
            "description": "API key for authentication. Save securely - shown only once."
          },
          "message": {
            "type": "string",
            "example": "Save your API key securely. It will not be shown again."
          }
        },
        "required": [
          "success",
          "accountId",
          "apiKey",
          "message"
        ]
      },
      "RegisterConflictResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ],
            "example": false
          },
          "error": {
            "type": "string",
            "example": "Account already exists for this IP"
          },
          "accountId": {
            "type": "string",
            "example": "01234567-89ab-cdef-0123-456789abcdef"
          },
          "keyPrefix": {
            "type": "string",
            "example": "agent_a1b2c3",
            "description": "First 12 characters of existing API key"
          },
          "message": {
            "type": "string",
            "example": "If you lost your API key, contact support for recovery."
          }
        },
        "required": [
          "success",
          "error",
          "message"
        ]
      },
      "ListApiKeysResponse": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyInfo"
            }
          }
        },
        "required": [
          "keys"
        ]
      },
      "ApiKeyInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "01234567-89ab-cdef-0123-456789abcdef",
            "description": "API key ID"
          },
          "keyPrefix": {
            "type": "string",
            "example": "agent_a1b2c3",
            "description": "First 12 characters of the API key"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-15T12:00:00.000Z"
          },
          "lastUsedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "example": "2024-01-15T14:30:00.000Z"
          },
          "usageCount": {
            "type": "integer",
            "example": 42,
            "description": "Number of times this key has been used"
          },
          "isActive": {
            "type": "boolean",
            "example": true,
            "description": "Whether the key is active"
          }
        },
        "required": [
          "id",
          "keyPrefix"
        ]
      },
      "UnauthorizedResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Unauthorized"
          },
          "code": {
            "type": "string",
            "enum": [
              "UNAUTHORIZED"
            ],
            "example": "UNAUTHORIZED"
          }
        },
        "required": [
          "error",
          "code"
        ]
      },
      "CreateApiKeyResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ],
            "example": true
          },
          "keyId": {
            "type": "string",
            "example": "01234567-89ab-cdef-0123-456789abcdef"
          },
          "apiKey": {
            "type": "string",
            "example": "agent_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
            "description": "New API key. Save securely - shown only once."
          },
          "message": {
            "type": "string",
            "example": "Save your API key securely. It will not be shown again."
          }
        },
        "required": [
          "success",
          "keyId",
          "apiKey",
          "message"
        ]
      },
      "RevokeApiKeyResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ],
            "example": true
          },
          "message": {
            "type": "string",
            "example": "API key revoked successfully"
          }
        },
        "required": [
          "success",
          "message"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Bad request",
            "description": "Error message"
          },
          "code": {
            "type": "string",
            "example": "BAD_REQUEST",
            "description": "Error code"
          },
          "details": {
            "nullable": true,
            "description": "Additional error details"
          }
        },
        "required": [
          "error"
        ]
      },
      "CreateWalletResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ],
            "example": true
          },
          "wallet": {
            "type": "object",
            "properties": {
              "solanaAddress": {
                "type": "string",
                "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ"
              },
              "evmAddress": {
                "type": "string",
                "example": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE2e"
              }
            },
            "required": [
              "solanaAddress",
              "evmAddress"
            ]
          },
          "seedPhrase": {
            "type": "string",
            "example": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
            "description": "12-word BIP39 seed phrase. Save securely - shown only once."
          },
          "message": {
            "type": "string",
            "example": "Wallet created. Save your seed phrase securely - it will not be shown again."
          }
        },
        "required": [
          "success",
          "wallet",
          "seedPhrase",
          "message"
        ]
      },
      "ConflictResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Resource already exists"
          },
          "code": {
            "type": "string",
            "enum": [
              "CONFLICT"
            ],
            "example": "CONFLICT"
          }
        },
        "required": [
          "error",
          "code"
        ]
      },
      "GetWalletResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WalletWithBalances"
          },
          {
            "type": "object",
            "properties": {
              "balanceError": {
                "type": "string",
                "example": "Failed to fetch balances",
                "description": "Error message if balance fetch failed"
              }
            }
          }
        ]
      },
      "WalletBalances": {
        "type": "object",
        "properties": {
          "solana": {
            "type": "object",
            "properties": {
              "sol": {
                "type": "string",
                "example": "1.5",
                "description": "SOL balance"
              },
              "tokens": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "mint": {
                      "type": "string",
                      "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                      "description": "Token mint address"
                    },
                    "symbol": {
                      "type": "string",
                      "example": "USDC"
                    },
                    "name": {
                      "type": "string",
                      "example": "USD Coin"
                    },
                    "amount": {
                      "type": "string",
                      "example": "100.00",
                      "description": "Human-readable amount"
                    },
                    "decimals": {
                      "type": "integer",
                      "example": 6
                    },
                    "usdValue": {
                      "type": "string",
                      "example": "100.00"
                    }
                  },
                  "required": [
                    "mint",
                    "symbol",
                    "name",
                    "amount",
                    "decimals"
                  ]
                }
              }
            },
            "required": [
              "sol",
              "tokens"
            ]
          },
          "evm": {
            "type": "object",
            "properties": {
              "eth": {
                "type": "string",
                "example": "0.5",
                "description": "ETH balance"
              },
              "tokens": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string",
                      "example": "0xA0b86a33E6B1d8a3F5a9b7C7e7c0e8f9d1e2a3b4",
                      "description": "Token contract address"
                    },
                    "symbol": {
                      "type": "string",
                      "example": "USDC"
                    },
                    "name": {
                      "type": "string",
                      "example": "USD Coin"
                    },
                    "amount": {
                      "type": "string",
                      "example": "100.00"
                    },
                    "decimals": {
                      "type": "integer",
                      "example": 6
                    },
                    "chain": {
                      "type": "string",
                      "example": "ethereum"
                    },
                    "usdValue": {
                      "type": "string",
                      "example": "100.00"
                    }
                  },
                  "required": [
                    "address",
                    "symbol",
                    "name",
                    "amount",
                    "decimals",
                    "chain"
                  ]
                }
              }
            },
            "required": [
              "eth",
              "tokens"
            ]
          }
        },
        "required": [
          "solana",
          "evm"
        ]
      },
      "WalletWithBalances": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WalletInfo"
          },
          {
            "type": "object",
            "properties": {
              "balances": {
                "$ref": "#/components/schemas/WalletBalances"
              }
            },
            "required": [
              "balances"
            ]
          }
        ]
      },
      "WalletInfo": {
        "type": "object",
        "properties": {
          "solanaAddress": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ",
            "description": "Solana wallet address"
          },
          "evmAddress": {
            "type": "string",
            "example": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE2e",
            "description": "EVM wallet address"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-15T12:00:00.000Z"
          }
        },
        "required": [
          "solanaAddress",
          "evmAddress",
          "createdAt"
        ]
      },
      "ExportKeysResponse": {
        "type": "object",
        "properties": {
          "solanaPrivateKey": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ...",
            "description": "Base58-encoded Solana private key"
          },
          "evmPrivateKey": {
            "type": "string",
            "example": "0x1234567890abcdef...",
            "description": "Hex-encoded EVM private key with 0x prefix"
          }
        },
        "required": [
          "solanaPrivateKey",
          "evmPrivateKey"
        ]
      },
      "ExportKeysRequest": {
        "type": "object",
        "properties": {
          "seedPhrase": {
            "type": "string",
            "example": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
            "description": "12-word seed phrase for verification"
          }
        },
        "required": [
          "seedPhrase"
        ]
      },
      "PortfolioResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Portfolio"
          },
          {
            "type": "object",
            "properties": {
              "partialErrors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "chain": {
                      "type": "string",
                      "example": "solana"
                    },
                    "error": {
                      "type": "string",
                      "example": "Failed to fetch data"
                    }
                  },
                  "required": [
                    "chain",
                    "error"
                  ]
                },
                "description": "Errors fetching data from specific chains"
              }
            }
          }
        ]
      },
      "PortfolioPosition": {
        "type": "object",
        "properties": {
          "token": {
            "$ref": "#/components/schemas/TokenInfo"
          },
          "amount": {
            "type": "string",
            "example": "100.50",
            "description": "Token amount held"
          },
          "usdValue": {
            "type": "string",
            "example": "100.50",
            "description": "USD value of the position"
          },
          "percentChange24h": {
            "type": "number",
            "example": 2.5,
            "description": "24h price change percentage"
          }
        },
        "required": [
          "token",
          "amount",
          "usdValue"
        ]
      },
      "TokenInfo": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
            "description": "Token contract address"
          },
          "symbol": {
            "type": "string",
            "example": "USDC"
          },
          "name": {
            "type": "string",
            "example": "USD Coin"
          },
          "decimals": {
            "type": "integer",
            "example": 6
          },
          "chain": {
            "type": "string",
            "example": "solana"
          },
          "priceUsd": {
            "type": "string",
            "example": "1.00"
          },
          "logoUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/usdc-logo.png"
          }
        },
        "required": [
          "address",
          "symbol",
          "name",
          "decimals",
          "chain"
        ]
      },
      "Portfolio": {
        "type": "object",
        "properties": {
          "totalUsdValue": {
            "type": "string",
            "example": "1234.56",
            "description": "Total portfolio value in USD"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioPosition"
            }
          }
        },
        "required": [
          "totalUsdValue",
          "positions"
        ]
      },
      "HistoryResponse": {
        "type": "object",
        "properties": {
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionHistoryItem"
            }
          },
          "count": {
            "type": "integer",
            "example": 42,
            "description": "Total transactions returned"
          }
        },
        "required": [
          "transactions",
          "count"
        ]
      },
      "TransactionHistoryItem": {
        "type": "object",
        "properties": {
          "hash": {
            "type": "string",
            "example": "0x1234567890abcdef...",
            "description": "Transaction hash"
          },
          "type": {
            "type": "string",
            "example": "swap",
            "description": "Transaction type (swap, transfer, bridge, approval, etc.)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-15T12:00:00.000Z"
          },
          "chain": {
            "type": "string",
            "example": "ethereum"
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "failed",
              "pending"
            ],
            "example": "success"
          },
          "from": {
            "type": "string",
            "example": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE2e"
          },
          "to": {
            "type": "string",
            "example": "0x1234567890abcdef1234567890abcdef12345678"
          },
          "tokenIn": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
              },
              "symbol": {
                "type": "string",
                "example": "USDC"
              },
              "amount": {
                "type": "string",
                "example": "100.50"
              }
            },
            "required": [
              "address",
              "symbol",
              "amount"
            ]
          },
          "tokenOut": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
              },
              "symbol": {
                "type": "string",
                "example": "USDC"
              },
              "amount": {
                "type": "string",
                "example": "100.50"
              }
            },
            "required": [
              "address",
              "symbol",
              "amount"
            ]
          },
          "usdValue": {
            "type": "string",
            "example": "100.50"
          },
          "fee": {
            "type": "string",
            "example": "0.01"
          }
        },
        "required": [
          "hash",
          "type",
          "timestamp",
          "chain",
          "status"
        ]
      },
      "TokenSearchResponse": {
        "type": "object",
        "properties": {
          "tokens": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/TokenInfo"
                },
                {
                  "type": "object",
                  "properties": {
                    "liquidity": {
                      "type": "number",
                      "example": 1000000
                    },
                    "volume24h": {
                      "type": "number",
                      "example": 500000
                    },
                    "marketCap": {
                      "type": "number",
                      "example": 50000000000
                    },
                    "safetyFlags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [],
                      "description": "Safety warning flags"
                    },
                    "safetyScore": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100,
                      "example": 95,
                      "description": "Safety score from 0-100"
                    }
                  },
                  "required": [
                    "safetyFlags",
                    "safetyScore"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "tokens"
        ]
      },
      "TokenPriceResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "example": "SOL"
          },
          "address": {
            "type": "string",
            "example": "So11111111111111111111111111111111111111112"
          },
          "chain": {
            "type": "string",
            "example": "solana"
          },
          "price": {
            "type": "number",
            "example": 142.35,
            "description": "Price in USD"
          }
        },
        "required": [
          "token",
          "address",
          "chain",
          "price"
        ]
      },
      "TokenDetailsResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TokenInfo"
          },
          {
            "type": "object",
            "properties": {
              "market": {
                "type": "object",
                "nullable": true,
                "properties": {
                  "pairAddress": {
                    "type": "string",
                    "example": "5Hw3sLqPgmzqzLZ8..."
                  },
                  "dex": {
                    "type": "string",
                    "example": "raydium"
                  },
                  "liquidity": {
                    "type": "number",
                    "example": 1000000
                  },
                  "volume24h": {
                    "type": "number",
                    "example": 500000
                  },
                  "priceChange24h": {
                    "type": "number",
                    "example": 2.5
                  },
                  "marketCap": {
                    "type": "number",
                    "example": 50000000000
                  }
                },
                "required": [
                  "pairAddress",
                  "dex"
                ]
              }
            },
            "required": [
              "market"
            ]
          }
        ]
      },
      "ChartResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "dexscreenerUrl": {
            "type": "string",
            "format": "uri"
          },
          "candles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChartData"
            }
          }
        },
        "required": [
          "candles"
        ]
      },
      "ChartData": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "example": 1705305600,
            "description": "Unix timestamp"
          },
          "open": {
            "type": "number",
            "example": 1
          },
          "high": {
            "type": "number",
            "example": 1.02
          },
          "low": {
            "type": "number",
            "example": 0.99
          },
          "close": {
            "type": "number",
            "example": 1.01
          },
          "volume": {
            "type": "number",
            "example": 1000000
          }
        },
        "required": [
          "timestamp",
          "open",
          "high",
          "low",
          "close",
          "volume"
        ]
      },
      "DexDataResponse": {
        "type": "object",
        "properties": {
          "chain": {
            "type": "string",
            "example": "solana"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradingPair"
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "example": 100
              },
              "limit": {
                "type": "integer",
                "example": 50
              },
              "offset": {
                "type": "integer",
                "example": 0
              },
              "hasMore": {
                "type": "boolean",
                "example": true
              }
            },
            "required": [
              "total",
              "limit",
              "offset",
              "hasMore"
            ]
          },
          "timestamp": {
            "type": "number",
            "example": 1705305600000,
            "description": "Response timestamp in milliseconds"
          },
          "safetyFilter": {
            "type": "object",
            "properties": {
              "minSafetyScore": {
                "type": "number"
              },
              "prefetched": {
                "type": "number"
              },
              "afterFilter": {
                "type": "number"
              }
            }
          }
        },
        "required": [
          "chain",
          "data",
          "pagination",
          "timestamp"
        ]
      },
      "TradingPair": {
        "type": "object",
        "properties": {
          "chain": {
            "type": "string",
            "example": "solana"
          },
          "protocol": {
            "type": "string",
            "example": "raydium"
          },
          "pairAddress": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ"
          },
          "baseToken": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "example": "5Hw3sLqPgmzqzLZ8..."
              },
              "symbol": {
                "type": "string",
                "example": "MYTOKEN"
              },
              "name": {
                "type": "string",
                "example": "My Token"
              }
            },
            "required": [
              "address",
              "symbol",
              "name"
            ]
          },
          "quoteToken": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "example": "5Hw3sLqPgmzqzLZ8..."
              },
              "symbol": {
                "type": "string",
                "example": "MYTOKEN"
              },
              "name": {
                "type": "string",
                "example": "My Token"
              }
            },
            "required": [
              "address",
              "symbol",
              "name"
            ]
          },
          "price": {
            "type": "object",
            "properties": {
              "usd": {
                "type": "number",
                "example": 0.001234
              },
              "native": {
                "type": "number",
                "example": 0.000001
              },
              "change24h": {
                "type": "number",
                "example": 15.5
              },
              "change6h": {
                "type": "number",
                "example": 5.2
              },
              "change1h": {
                "type": "number",
                "example": 1.1
              }
            },
            "required": [
              "usd"
            ]
          },
          "liquidity": {
            "type": "object",
            "properties": {
              "usd": {
                "type": "number",
                "example": 50000
              }
            },
            "required": [
              "usd"
            ]
          },
          "volume": {
            "type": "object",
            "properties": {
              "h24": {
                "type": "number",
                "example": 100000
              },
              "h6": {
                "type": "number",
                "example": 25000
              },
              "h1": {
                "type": "number",
                "example": 5000
              }
            },
            "required": [
              "h24"
            ]
          },
          "txns": {
            "type": "object",
            "properties": {
              "h24": {
                "type": "number",
                "example": 500
              },
              "h6": {
                "type": "number",
                "example": 150
              },
              "h1": {
                "type": "number",
                "example": 30
              }
            }
          },
          "fdv": {
            "type": "number",
            "example": 1000000
          },
          "marketCap": {
            "type": "number",
            "example": 500000
          },
          "createdAt": {
            "type": "number",
            "example": 1705305600,
            "description": "Unix timestamp of pair creation"
          },
          "safetyScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "example": 85,
            "description": "Safety score (0-100)"
          },
          "safetyFlags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [],
            "description": "Safety warning flags"
          }
        },
        "required": [
          "chain",
          "protocol",
          "pairAddress",
          "baseToken",
          "price",
          "liquidity",
          "volume"
        ]
      },
      "DexQueryBody": {
        "type": "object",
        "properties": {
          "timeframe": {
            "type": "string",
            "enum": [
              "m5",
              "h1",
              "h6",
              "h24"
            ],
            "example": "h1",
            "description": "Data timeframe"
          },
          "rankBy": {
            "type": "string",
            "enum": [
              "trendingScoreH6",
              "volume",
              "txns",
              "priceChangeH24",
              "priceChangeH6",
              "priceChangeH1",
              "liquidity",
              "fdv",
              "marketCap"
            ],
            "example": "trendingScoreH6",
            "description": "Metric to rank by"
          },
          "order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "example": "desc",
            "description": "Sort order"
          },
          "filters": {
            "type": "object",
            "properties": {
              "chains": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DexChain"
                }
              },
              "dexes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "liquidity": {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  }
                }
              },
              "volume": {
                "type": "object",
                "properties": {
                  "h24": {
                    "type": "object",
                    "properties": {
                      "min": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      }
                    }
                  },
                  "h6": {
                    "type": "object",
                    "properties": {
                      "min": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      }
                    }
                  },
                  "h1": {
                    "type": "object",
                    "properties": {
                      "min": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      }
                    }
                  }
                }
              },
              "txns": {
                "type": "object",
                "properties": {
                  "h24": {
                    "type": "object",
                    "properties": {
                      "min": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      }
                    }
                  }
                }
              },
              "pairAge": {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  }
                }
              },
              "priceChange": {
                "type": "object",
                "properties": {
                  "h24": {
                    "type": "object",
                    "properties": {
                      "min": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      }
                    }
                  }
                }
              },
              "fdv": {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  }
                }
              },
              "marketCap": {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  }
                }
              },
              "enhancedTokenInfo": {
                "type": "boolean"
              },
              "activeBoostsMin": {
                "type": "number"
              },
              "maxAge": {
                "type": "number"
              },
              "profile": {
                "type": "boolean"
              },
              "maxLaunchpadProgress": {
                "type": "number"
              }
            },
            "default": {}
          },
          "minSafetyScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "example": 50,
            "description": "Minimum safety score (post-fetch filter)"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200,
            "example": 50
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "example": 0
          }
        },
        "required": [
          "timeframe",
          "rankBy",
          "order"
        ]
      },
      "DexChain": {
        "type": "string",
        "enum": [
          "solana",
          "ethereum",
          "base",
          "bsc",
          "polygon",
          "arbitrum",
          "optimism",
          "avalanche"
        ]
      },
      "TransferResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "txHash": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ..."
          },
          "amount": {
            "type": "string",
            "example": "1.5"
          },
          "token": {
            "type": "string",
            "example": "SOL"
          },
          "to": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ"
          },
          "chain": {
            "type": "string",
            "example": "solana"
          },
          "error": {
            "type": "string",
            "example": "Insufficient balance"
          }
        },
        "required": [
          "success",
          "amount",
          "token",
          "to",
          "chain"
        ]
      },
      "TransferRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "example": "SOL",
            "description": "Token address or symbol"
          },
          "amount": {
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$",
            "example": "1.5",
            "description": "Human-readable amount"
          },
          "to": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ",
            "description": "Recipient address"
          },
          "chain": {
            "type": "string",
            "enum": [
              "solana",
              "ethereum",
              "base",
              "arbitrum",
              "optimism",
              "polygon",
              "bsc"
            ],
            "default": "solana",
            "example": "solana",
            "description": "Chain for EVM transfers (default: solana)"
          }
        },
        "required": [
          "token",
          "amount",
          "to"
        ]
      },
      "SwapResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "txHash": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ..."
          },
          "inputAmount": {
            "type": "string",
            "example": "1.5"
          },
          "outputAmount": {
            "type": "string",
            "example": "100.50"
          },
          "error": {
            "type": "string",
            "example": "Insufficient balance"
          }
        },
        "required": [
          "success",
          "inputAmount"
        ]
      },
      "SwapRequest": {
        "type": "object",
        "properties": {
          "inputToken": {
            "type": "string",
            "example": "SOL",
            "description": "Input token address or symbol"
          },
          "outputToken": {
            "type": "string",
            "example": "USDC",
            "description": "Output token address or symbol"
          },
          "amount": {
            "type": "string",
            "pattern": "^(\\d+(\\.\\d+)?|\\$\\d+(\\.\\d+)?|\\d+(\\.\\d+)?usd|\\d+(\\.\\d+)?%|max|all)$/i",
            "example": "1.5",
            "description": "Amount: decimal (1.5), USD ($100 or 100usd), percentage (50%), or max/all"
          },
          "chain": {
            "type": "string",
            "enum": [
              "solana",
              "ethereum",
              "base",
              "arbitrum",
              "optimism",
              "polygon",
              "bsc"
            ],
            "default": "solana",
            "example": "solana",
            "description": "Chain (default: solana)"
          },
          "slippage": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5000,
            "default": 50,
            "example": 50,
            "description": "Slippage tolerance in basis points (default: 50 = 0.5%)"
          }
        },
        "required": [
          "inputToken",
          "outputToken",
          "amount"
        ]
      },
      "SwapQuoteResponse": {
        "type": "object",
        "properties": {
          "quote": {
            "nullable": true,
            "description": "Raw quote from provider"
          }
        }
      },
      "BridgeResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "sourceTxHash": {
            "type": "string",
            "example": "0x1234567890abcdef..."
          },
          "destinationTxHash": {
            "type": "string",
            "example": "0xfedcba0987654321..."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "failed"
            ],
            "example": "completed"
          },
          "error": {
            "type": "string",
            "example": "Bridge service unavailable"
          }
        },
        "required": [
          "success",
          "status"
        ]
      },
      "BridgeRequest": {
        "type": "object",
        "properties": {
          "inputToken": {
            "type": "string",
            "example": "USDC",
            "description": "Input token address or symbol"
          },
          "outputToken": {
            "type": "string",
            "example": "USDC",
            "description": "Output token (same as input if not specified)"
          },
          "amount": {
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$",
            "example": "100",
            "description": "Human-readable input amount"
          },
          "sourceChain": {
            "$ref": "#/components/schemas/SupportedChain"
          },
          "destinationChain": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SupportedChain"
              },
              {
                "example": "base",
                "description": "Destination chain"
              }
            ]
          }
        },
        "required": [
          "inputToken",
          "amount",
          "sourceChain",
          "destinationChain"
        ]
      },
      "SupportedChain": {
        "type": "string",
        "enum": [
          "solana",
          "ethereum",
          "base",
          "arbitrum",
          "optimism",
          "polygon",
          "bsc"
        ],
        "example": "ethereum",
        "description": "Source chain"
      },
      "BridgeQuoteResponse": {
        "type": "object",
        "properties": {
          "quote": {
            "nullable": true,
            "description": "Raw quote from provider"
          }
        }
      },
      "TokenizeResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "launchId": {
            "type": "string",
            "example": "01234567-89ab-cdef-0123-456789abcdef",
            "description": "Launch ID in the system"
          },
          "tokenMint": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ",
            "description": "Token mint address on Solana"
          },
          "poolAddress": {
            "type": "string",
            "example": "3Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWY",
            "description": "Liquidity pool address"
          },
          "dexscreenerUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://dexscreener.com/solana/5Hw3sLqPgmzqzLZ8...",
            "description": "DexScreener URL for the token"
          },
          "error": {
            "type": "string",
            "example": "Insufficient SOL balance"
          }
        },
        "required": [
          "success"
        ]
      },
      "NotFoundResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Not found"
          },
          "code": {
            "type": "string",
            "enum": [
              "NOT_FOUND"
            ],
            "example": "NOT_FOUND"
          }
        },
        "required": [
          "error",
          "code"
        ]
      },
      "TokenizeRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "example": "My Token",
            "description": "Token name (1-32 characters)"
          },
          "symbol": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10,
            "example": "MYTKN",
            "description": "Token symbol (2-10 characters)"
          },
          "imageUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/token-logo.png",
            "description": "Token image URL (optional)"
          },
          "tier": {
            "type": "string",
            "enum": [
              "10k",
              "100k",
              "1m",
              "10m"
            ],
            "default": "100k",
            "example": "100k",
            "description": "Market cap tier (default: 100k)"
          }
        },
        "required": [
          "name",
          "symbol"
        ]
      },
      "AgentTokenInfo": {
        "type": "object",
        "properties": {
          "hasToken": {
            "type": "boolean",
            "example": true
          },
          "launchId": {
            "type": "string",
            "example": "01234567-89ab-cdef-0123-456789abcdef"
          },
          "tokenMint": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ"
          },
          "poolAddress": {
            "type": "string",
            "example": "3Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWY"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-15T12:00:00.000Z"
          },
          "dexscreenerUrl": {
            "type": "string",
            "format": "uri",
            "example": "https://dexscreener.com/solana/5Hw3sLqPgmzqzLZ8..."
          }
        },
        "required": [
          "hasToken",
          "launchId",
          "tokenMint",
          "poolAddress",
          "dexscreenerUrl"
        ]
      },
      "FeeStatus": {
        "type": "object",
        "properties": {
          "tokenMint": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ",
            "description": "Token mint address"
          },
          "poolAddress": {
            "type": "string",
            "example": "7Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ",
            "description": "Meteora pool address"
          },
          "positionNftAddress": {
            "type": "string",
            "nullable": true,
            "example": "9Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ",
            "description": "Position NFT address (required for fee claiming)"
          },
          "totalFeesGeneratedSol": {
            "type": "string",
            "example": "1.500000000",
            "description": "Total fees generated in SOL"
          },
          "platformFeesEarnedSol": {
            "type": "string",
            "example": "0.600000000",
            "description": "Platform's 40% share in SOL"
          },
          "beneficiaryFeesEarnedSol": {
            "type": "string",
            "example": "0.900000000",
            "description": "Beneficiary's 60% share in SOL"
          },
          "beneficiaryFeesClaimedSol": {
            "type": "string",
            "example": "0.500000000",
            "description": "Amount already claimed by beneficiary"
          },
          "beneficiaryFeesUnclaimedSol": {
            "type": "string",
            "example": "0.400000000",
            "description": "Amount available to claim"
          },
          "canClaim": {
            "type": "boolean",
            "example": true,
            "description": "Whether claiming is available"
          },
          "feeForfeitsAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "example": "2024-01-29T12:00:00.000Z",
            "description": "Deadline to claim before forfeiture (null if not set)"
          },
          "isForfeited": {
            "type": "boolean",
            "example": false,
            "description": "Whether fees have been forfeited"
          },
          "liquidityLock": {
            "$ref": "#/components/schemas/LiquidityLock"
          }
        },
        "required": [
          "tokenMint",
          "poolAddress",
          "positionNftAddress",
          "totalFeesGeneratedSol",
          "platformFeesEarnedSol",
          "beneficiaryFeesEarnedSol",
          "beneficiaryFeesClaimedSol",
          "beneficiaryFeesUnclaimedSol",
          "canClaim",
          "feeForfeitsAt",
          "isForfeited",
          "liquidityLock"
        ]
      },
      "LiquidityLock": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "vesting",
              "permanent",
              "none"
            ],
            "example": "vesting",
            "description": "Type of liquidity lock (vesting = 24h time-based, permanent = forever, none = unlocked)"
          },
          "lockedUntil": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "example": "2024-01-29T12:00:00.000Z",
            "description": "When the lock expires (null for permanent locks)"
          },
          "isExpired": {
            "type": "boolean",
            "example": false,
            "description": "Whether the lock has expired"
          }
        },
        "required": [
          "type",
          "lockedUntil",
          "isExpired"
        ],
        "description": "Liquidity lock status"
      },
      "FeeClaimResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "amountSol": {
            "type": "string",
            "example": "0.400000000",
            "description": "Amount claimed in SOL"
          },
          "txSignature": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ...",
            "description": "Transaction signature"
          },
          "error": {
            "type": "string",
            "example": "No fees available to claim"
          }
        },
        "required": [
          "success"
        ]
      },
      "FeeClaimHistory": {
        "type": "object",
        "properties": {
          "tokenMint": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ",
            "description": "Token mint address"
          },
          "poolAddress": {
            "type": "string",
            "example": "7Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ",
            "description": "Meteora pool address"
          },
          "totalClaimCount": {
            "type": "integer",
            "example": 5,
            "description": "Total number of claims"
          },
          "lifetimeTotalClaimedSol": {
            "type": "string",
            "example": "7.500000000",
            "description": "Lifetime total fees claimed in SOL"
          },
          "lifetimeBeneficiaryClaimedSol": {
            "type": "string",
            "example": "4.500000000",
            "description": "Lifetime beneficiary fees claimed in SOL"
          },
          "lifetimePlatformClaimedSol": {
            "type": "string",
            "example": "3.000000000",
            "description": "Lifetime platform fees claimed in SOL"
          },
          "claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeClaimRecord"
            },
            "description": "List of all fee claims, newest first"
          }
        },
        "required": [
          "tokenMint",
          "poolAddress",
          "totalClaimCount",
          "lifetimeTotalClaimedSol",
          "lifetimeBeneficiaryClaimedSol",
          "lifetimePlatformClaimedSol",
          "claims"
        ]
      },
      "FeeClaimRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "123e4567-e89b-12d3-a456-426614174000",
            "description": "Unique claim ID"
          },
          "claimType": {
            "type": "string",
            "example": "beneficiary",
            "description": "Type of claim (beneficiary or platform)"
          },
          "totalClaimedSol": {
            "type": "string",
            "example": "1.500000000",
            "description": "Total fees claimed in this transaction (100%)"
          },
          "beneficiaryAmountSol": {
            "type": "string",
            "example": "0.900000000",
            "description": "Beneficiary's 60% share in SOL"
          },
          "platformAmountSol": {
            "type": "string",
            "example": "0.600000000",
            "description": "Platform's 40% share in SOL"
          },
          "transactionSignature": {
            "type": "string",
            "example": "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ...",
            "description": "Transaction signature"
          },
          "claimedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-29T12:00:00.000Z",
            "description": "When the claim was made"
          }
        },
        "required": [
          "id",
          "claimType",
          "totalClaimedSol",
          "beneficiaryAmountSol",
          "platformAmountSol",
          "transactionSignature",
          "claimedAt"
        ]
      },
      "RpcResponse": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": [
              "2.0"
            ],
            "example": "2.0"
          },
          "id": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "example": 1
          },
          "result": {
            "nullable": true,
            "description": "RPC result (varies by method)"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "example": -32600
              },
              "message": {
                "type": "string",
                "example": "Invalid Request"
              },
              "data": {
                "nullable": true
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "jsonrpc",
          "id"
        ]
      },
      "RpcRequest": {
        "type": "object",
        "properties": {
          "chain": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SupportedChain"
              },
              {
                "example": "solana",
                "description": "Target chain"
              }
            ]
          },
          "method": {
            "type": "string",
            "example": "getBalance",
            "description": "RPC method name"
          },
          "params": {
            "type": "array",
            "items": {
              "nullable": true
            },
            "example": [
              "5Hw3sLqPgmzqzLZ8o8KPG3eC4rqQn6P8T5pzPJMCPXWZ"
            ],
            "description": "Method parameters"
          },
          "id": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "example": 1,
            "description": "Request ID (optional)"
          }
        },
        "required": [
          "chain",
          "method",
          "params"
        ]
      },
      "ChainsListResponse": {
        "type": "object",
        "properties": {
          "chains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "solana",
              "ethereum",
              "base",
              "arbitrum",
              "optimism",
              "polygon",
              "bsc"
            ]
          },
          "description": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "solana": "Solana mainnet via Helius",
              "ethereum": "Ethereum mainnet",
              "base": "Base L2",
              "arbitrum": "Arbitrum One",
              "optimism": "Optimism",
              "polygon": "Polygon PoS",
              "bsc": "BNB Smart Chain"
            }
          }
        },
        "required": [
          "chains",
          "description"
        ]
      },
      "WsUpgradeResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "WebSocket connection established"
          },
          "protocol": {
            "type": "string",
            "example": "wss"
          }
        },
        "required": [
          "message",
          "protocol"
        ]
      },
      "WsDexSubscribeResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "WebSocket connection established"
          },
          "subscriptions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "trending",
              "gainers",
              "losers",
              "newPairs"
            ]
          }
        },
        "required": [
          "message",
          "subscriptions"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/auth/register": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Register a new agent account",
        "description": "Register a new agent account and receive an API key. Rate limited.",
        "security": [],
        "responses": {
          "200": {
            "description": "New account created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterSuccessResponse"
                }
              }
            }
          },
          "409": {
            "description": "Registration limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterConflictResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/keys": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "List all API keys",
        "description": "List all API keys for the authenticated account. Returns key prefixes and metadata (not full keys).",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of API keys",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListApiKeysResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Generate a new API key",
        "description": "Generate a new API key for the authenticated account.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "New API key created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/keys/{keyId}": {
      "delete": {
        "tags": [
          "Auth"
        ],
        "summary": "Revoke an API key",
        "description": "Revoke (deactivate) an API key. Cannot revoke the key currently being used for authentication.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "01234567-89ab-cdef-0123-456789abcdef",
              "description": "API key ID to revoke"
            },
            "required": true,
            "description": "API key ID to revoke",
            "name": "keyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "API key revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request (e.g., trying to revoke current key)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/wallet": {
      "post": {
        "tags": [
          "Wallet"
        ],
        "summary": "Create a new wallet",
        "description": "Create a new wallet with auto-generated 12-word seed phrase. Each account can only have one wallet. The seed phrase is returned once and must be saved by the user.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Wallet created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWalletResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "409": {
            "description": "Wallet already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConflictResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Wallet"
        ],
        "summary": "Get wallet addresses and balances",
        "description": "Get wallet addresses and current balances across Solana and EVM chains.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Wallet information with balances",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWalletResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/wallet/keys": {
      "post": {
        "tags": [
          "Wallet"
        ],
        "summary": "Export private keys",
        "description": "Export private keys (seed phrase required for verification). This is the only endpoint that requires the seed phrase.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportKeysRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Private keys exported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportKeysResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request (missing or invalid seed phrase)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized or invalid seed phrase",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/portfolio": {
      "get": {
        "tags": [
          "Portfolio"
        ],
        "summary": "Get combined portfolio",
        "description": "Get combined portfolio across Solana and EVM chains using Zerion. Positions are sorted by USD value descending.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Portfolio with positions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/history": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "Get transaction history",
        "description": "Get transaction history across chains. Can filter by chain and limit results.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "example": 50,
              "description": "Number of transactions to return (max 100)"
            },
            "required": false,
            "description": "Number of transactions to return (max 100)",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "ethereum",
              "description": "Filter by chain (optional)"
            },
            "required": false,
            "description": "Filter by chain (optional)",
            "name": "chain",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokens/search": {
      "get": {
        "tags": [
          "Tokens"
        ],
        "summary": "Search for tokens",
        "description": "Search for tokens by name, symbol, or address across all supported chains.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 2,
              "example": "USDC",
              "description": "Search query (min 2 characters)"
            },
            "required": true,
            "description": "Search query (min 2 characters)",
            "name": "q",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request (query too short)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokens/price": {
      "get": {
        "tags": [
          "Tokens"
        ],
        "summary": "Get token price",
        "description": "Get USD price for a token by symbol or address.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "SOL",
              "description": "Token symbol (SOL, ETH, USDC) or contract address"
            },
            "required": true,
            "description": "Token symbol (SOL, ETH, USDC) or contract address",
            "name": "token",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "solana",
              "description": "Chain name (solana, ethereum, base, arbitrum). Required for ambiguous symbols."
            },
            "required": false,
            "description": "Chain name (solana, ethereum, base, arbitrum). Required for ambiguous symbols.",
            "name": "chain",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Token price",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenPriceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Token not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokens/{address}": {
      "get": {
        "tags": [
          "Tokens"
        ],
        "summary": "Get token info by address",
        "description": "Get detailed token information including market data by contract address.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "description": "Token contract address"
            },
            "required": true,
            "description": "Token contract address",
            "name": "address",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Token details with market info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenDetailsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Token not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokens/{address}/chart": {
      "get": {
        "tags": [
          "Tokens"
        ],
        "summary": "Get candlestick chart data",
        "description": "Get candlestick chart data for a token. Note: Limited data availability via DexScreener.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "description": "Token contract address"
            },
            "required": true,
            "description": "Token contract address",
            "name": "address",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Chart data (may be empty)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChartResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dex/trending": {
      "get": {
        "tags": [
          "DEX"
        ],
        "summary": "Get trending pairs",
        "description": "Get trending pairs for a chain. Supports minSafetyScore query param for post-fetch filtering.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "solana",
                "ethereum",
                "base",
                "bsc",
                "polygon",
                "arbitrum",
                "optimism",
                "avalanche"
              ],
              "default": "solana",
              "example": "solana",
              "description": "Chain to query (default: solana)"
            },
            "required": false,
            "description": "Chain to query (default: solana)",
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "raydium",
              "description": "DEX protocol filter (comma-separated for multiple)"
            },
            "required": false,
            "description": "DEX protocol filter (comma-separated for multiple)",
            "name": "dex",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 10000,
              "description": "Minimum liquidity in USD"
            },
            "required": false,
            "description": "Minimum liquidity in USD",
            "name": "minLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 1000000,
              "description": "Maximum liquidity in USD"
            },
            "required": false,
            "description": "Maximum liquidity in USD",
            "name": "maxLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 5000,
              "description": "Minimum 24h volume in USD"
            },
            "required": false,
            "description": "Minimum 24h volume in USD",
            "name": "minVolume",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 100,
              "description": "Minimum 24h transaction count"
            },
            "required": false,
            "description": "Minimum 24h transaction count",
            "name": "minTxns",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 1,
              "description": "Minimum pair age in hours"
            },
            "required": false,
            "description": "Minimum pair age in hours",
            "name": "minAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 24,
              "description": "Maximum pair age in hours"
            },
            "required": false,
            "description": "Maximum pair age in hours",
            "name": "maxAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "maximum": 100,
              "example": 50,
              "description": "Minimum safety score (0-100)"
            },
            "required": false,
            "description": "Minimum safety score (0-100)",
            "name": "minSafetyScore",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "example": 50,
              "description": "Number of results (max 200)"
            },
            "required": false,
            "description": "Number of results (max 200)",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 0,
              "description": "Offset for pagination"
            },
            "required": false,
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Trending pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dex/volume": {
      "get": {
        "tags": [
          "DEX"
        ],
        "summary": "Get top volume pairs",
        "description": "Get pairs with highest 24h trading volume.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "solana",
                "ethereum",
                "base",
                "bsc",
                "polygon",
                "arbitrum",
                "optimism",
                "avalanche"
              ],
              "default": "solana",
              "example": "solana",
              "description": "Chain to query (default: solana)"
            },
            "required": false,
            "description": "Chain to query (default: solana)",
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "raydium",
              "description": "DEX protocol filter (comma-separated for multiple)"
            },
            "required": false,
            "description": "DEX protocol filter (comma-separated for multiple)",
            "name": "dex",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 10000,
              "description": "Minimum liquidity in USD"
            },
            "required": false,
            "description": "Minimum liquidity in USD",
            "name": "minLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 1000000,
              "description": "Maximum liquidity in USD"
            },
            "required": false,
            "description": "Maximum liquidity in USD",
            "name": "maxLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 5000,
              "description": "Minimum 24h volume in USD"
            },
            "required": false,
            "description": "Minimum 24h volume in USD",
            "name": "minVolume",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 100,
              "description": "Minimum 24h transaction count"
            },
            "required": false,
            "description": "Minimum 24h transaction count",
            "name": "minTxns",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 1,
              "description": "Minimum pair age in hours"
            },
            "required": false,
            "description": "Minimum pair age in hours",
            "name": "minAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 24,
              "description": "Maximum pair age in hours"
            },
            "required": false,
            "description": "Maximum pair age in hours",
            "name": "maxAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "maximum": 100,
              "example": 50,
              "description": "Minimum safety score (0-100)"
            },
            "required": false,
            "description": "Minimum safety score (0-100)",
            "name": "minSafetyScore",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "example": 50,
              "description": "Number of results (max 200)"
            },
            "required": false,
            "description": "Number of results (max 200)",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 0,
              "description": "Offset for pagination"
            },
            "required": false,
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Top volume pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dex/gainers": {
      "get": {
        "tags": [
          "DEX"
        ],
        "summary": "Get price gainers",
        "description": "Get pairs with positive 24h price change.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "solana",
                "ethereum",
                "base",
                "bsc",
                "polygon",
                "arbitrum",
                "optimism",
                "avalanche"
              ],
              "default": "solana",
              "example": "solana",
              "description": "Chain to query (default: solana)"
            },
            "required": false,
            "description": "Chain to query (default: solana)",
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "raydium",
              "description": "DEX protocol filter (comma-separated for multiple)"
            },
            "required": false,
            "description": "DEX protocol filter (comma-separated for multiple)",
            "name": "dex",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 10000,
              "description": "Minimum liquidity in USD"
            },
            "required": false,
            "description": "Minimum liquidity in USD",
            "name": "minLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 1000000,
              "description": "Maximum liquidity in USD"
            },
            "required": false,
            "description": "Maximum liquidity in USD",
            "name": "maxLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 5000,
              "description": "Minimum 24h volume in USD"
            },
            "required": false,
            "description": "Minimum 24h volume in USD",
            "name": "minVolume",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 100,
              "description": "Minimum 24h transaction count"
            },
            "required": false,
            "description": "Minimum 24h transaction count",
            "name": "minTxns",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 1,
              "description": "Minimum pair age in hours"
            },
            "required": false,
            "description": "Minimum pair age in hours",
            "name": "minAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 24,
              "description": "Maximum pair age in hours"
            },
            "required": false,
            "description": "Maximum pair age in hours",
            "name": "maxAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "maximum": 100,
              "example": 50,
              "description": "Minimum safety score (0-100)"
            },
            "required": false,
            "description": "Minimum safety score (0-100)",
            "name": "minSafetyScore",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "example": 50,
              "description": "Number of results (max 200)"
            },
            "required": false,
            "description": "Number of results (max 200)",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 0,
              "description": "Offset for pagination"
            },
            "required": false,
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Price gainers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dex/losers": {
      "get": {
        "tags": [
          "DEX"
        ],
        "summary": "Get price losers",
        "description": "Get pairs with negative 24h price change.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "solana",
                "ethereum",
                "base",
                "bsc",
                "polygon",
                "arbitrum",
                "optimism",
                "avalanche"
              ],
              "default": "solana",
              "example": "solana",
              "description": "Chain to query (default: solana)"
            },
            "required": false,
            "description": "Chain to query (default: solana)",
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "raydium",
              "description": "DEX protocol filter (comma-separated for multiple)"
            },
            "required": false,
            "description": "DEX protocol filter (comma-separated for multiple)",
            "name": "dex",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 10000,
              "description": "Minimum liquidity in USD"
            },
            "required": false,
            "description": "Minimum liquidity in USD",
            "name": "minLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 1000000,
              "description": "Maximum liquidity in USD"
            },
            "required": false,
            "description": "Maximum liquidity in USD",
            "name": "maxLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 5000,
              "description": "Minimum 24h volume in USD"
            },
            "required": false,
            "description": "Minimum 24h volume in USD",
            "name": "minVolume",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 100,
              "description": "Minimum 24h transaction count"
            },
            "required": false,
            "description": "Minimum 24h transaction count",
            "name": "minTxns",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 1,
              "description": "Minimum pair age in hours"
            },
            "required": false,
            "description": "Minimum pair age in hours",
            "name": "minAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 24,
              "description": "Maximum pair age in hours"
            },
            "required": false,
            "description": "Maximum pair age in hours",
            "name": "maxAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "maximum": 100,
              "example": 50,
              "description": "Minimum safety score (0-100)"
            },
            "required": false,
            "description": "Minimum safety score (0-100)",
            "name": "minSafetyScore",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "example": 50,
              "description": "Number of results (max 200)"
            },
            "required": false,
            "description": "Number of results (max 200)",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 0,
              "description": "Offset for pagination"
            },
            "required": false,
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Price losers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dex/new": {
      "get": {
        "tags": [
          "DEX"
        ],
        "summary": "Get newly created pairs",
        "description": "Get recently created trading pairs.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "solana",
                "ethereum",
                "base",
                "bsc",
                "polygon",
                "arbitrum",
                "optimism",
                "avalanche"
              ],
              "default": "solana",
              "example": "solana",
              "description": "Chain to query (default: solana)"
            },
            "required": false,
            "description": "Chain to query (default: solana)",
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "raydium",
              "description": "DEX protocol filter (comma-separated for multiple)"
            },
            "required": false,
            "description": "DEX protocol filter (comma-separated for multiple)",
            "name": "dex",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 10000,
              "description": "Minimum liquidity in USD"
            },
            "required": false,
            "description": "Minimum liquidity in USD",
            "name": "minLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 1000000,
              "description": "Maximum liquidity in USD"
            },
            "required": false,
            "description": "Maximum liquidity in USD",
            "name": "maxLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 5000,
              "description": "Minimum 24h volume in USD"
            },
            "required": false,
            "description": "Minimum 24h volume in USD",
            "name": "minVolume",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 100,
              "description": "Minimum 24h transaction count"
            },
            "required": false,
            "description": "Minimum 24h transaction count",
            "name": "minTxns",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 1,
              "description": "Minimum pair age in hours"
            },
            "required": false,
            "description": "Minimum pair age in hours",
            "name": "minAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 24,
              "description": "Maximum pair age in hours"
            },
            "required": false,
            "description": "Maximum pair age in hours",
            "name": "maxAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "maximum": 100,
              "example": 50,
              "description": "Minimum safety score (0-100)"
            },
            "required": false,
            "description": "Minimum safety score (0-100)",
            "name": "minSafetyScore",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "example": 50,
              "description": "Number of results (max 200)"
            },
            "required": false,
            "description": "Number of results (max 200)",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 0,
              "description": "Offset for pagination"
            },
            "required": false,
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "New pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dex/boosted": {
      "get": {
        "tags": [
          "DEX"
        ],
        "summary": "Get boosted pairs",
        "description": "Get boosted/promoted trading pairs.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "solana",
                "ethereum",
                "base",
                "bsc",
                "polygon",
                "arbitrum",
                "optimism",
                "avalanche"
              ],
              "default": "solana",
              "example": "solana",
              "description": "Chain to query (default: solana)"
            },
            "required": false,
            "description": "Chain to query (default: solana)",
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "raydium",
              "description": "DEX protocol filter (comma-separated for multiple)"
            },
            "required": false,
            "description": "DEX protocol filter (comma-separated for multiple)",
            "name": "dex",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 10000,
              "description": "Minimum liquidity in USD"
            },
            "required": false,
            "description": "Minimum liquidity in USD",
            "name": "minLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 1000000,
              "description": "Maximum liquidity in USD"
            },
            "required": false,
            "description": "Maximum liquidity in USD",
            "name": "maxLiquidity",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "example": 5000,
              "description": "Minimum 24h volume in USD"
            },
            "required": false,
            "description": "Minimum 24h volume in USD",
            "name": "minVolume",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 100,
              "description": "Minimum 24h transaction count"
            },
            "required": false,
            "description": "Minimum 24h transaction count",
            "name": "minTxns",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 1,
              "description": "Minimum pair age in hours"
            },
            "required": false,
            "description": "Minimum pair age in hours",
            "name": "minAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 24,
              "description": "Maximum pair age in hours"
            },
            "required": false,
            "description": "Maximum pair age in hours",
            "name": "maxAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "maximum": 100,
              "example": 50,
              "description": "Minimum safety score (0-100)"
            },
            "required": false,
            "description": "Minimum safety score (0-100)",
            "name": "minSafetyScore",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "example": 50,
              "description": "Number of results (max 200)"
            },
            "required": false,
            "description": "Number of results (max 200)",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 0,
              "description": "Offset for pagination"
            },
            "required": false,
            "description": "Offset for pagination",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Boosted pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dex/pumpfun": {
      "get": {
        "tags": [
          "DEX"
        ],
        "summary": "Get Pumpfun trending pairs",
        "description": "Get trending pairs from Pumpfun launchpad.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "example": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "nullable": true,
              "minimum": 0,
              "example": 0
            },
            "required": false,
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 72,
              "example": 24,
              "description": "Maximum age in hours (1-72)"
            },
            "required": false,
            "description": "Maximum age in hours (1-72)",
            "name": "maxAge",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "nullable": true,
              "minimum": 0,
              "maximum": 100,
              "example": 95,
              "description": "Maximum launchpad progress percentage"
            },
            "required": false,
            "description": "Maximum launchpad progress percentage",
            "name": "maxProgress",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Pumpfun trending pairs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dex/query": {
      "post": {
        "tags": [
          "DEX"
        ],
        "summary": "Custom query with full filter control",
        "description": "Execute a custom query with comprehensive filter options. Supports minSafetyScore as a post-fetch filter.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DexQueryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Query results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexDataResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transfer": {
      "post": {
        "tags": [
          "Trading"
        ],
        "summary": "Transfer tokens",
        "description": "Transfer tokens to another address on Solana or EVM chains.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transfer result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/swap": {
      "post": {
        "tags": [
          "Trading"
        ],
        "summary": "Swap tokens",
        "description": "Swap tokens on the same chain. Uses Jupiter for Solana and Relay for EVM chains.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwapRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Swap result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwapResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/swap/quote": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "Get swap quote",
        "description": "Get a swap quote without executing. Useful for previewing the expected output.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "SOL",
              "description": "Input token address or symbol"
            },
            "required": true,
            "description": "Input token address or symbol",
            "name": "inputToken",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "USDC",
              "description": "Output token address or symbol"
            },
            "required": true,
            "description": "Output token address or symbol",
            "name": "outputToken",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^(\\d+(\\.\\d+)?|\\$\\d+(\\.\\d+)?|\\d+(\\.\\d+)?usd|\\d+(\\.\\d+)?%|max|all)$/i",
              "example": "1.5",
              "description": "Amount: decimal (1.5), USD ($100 or 100usd), percentage (50%), or max/all"
            },
            "required": true,
            "description": "Amount: decimal (1.5), USD ($100 or 100usd), percentage (50%), or max/all",
            "name": "amount",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "solana",
                "ethereum",
                "base",
                "arbitrum",
                "optimism",
                "polygon",
                "bsc"
              ],
              "default": "solana",
              "example": "solana",
              "description": "Chain (default: solana)"
            },
            "required": false,
            "description": "Chain (default: solana)",
            "name": "chain",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Swap quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwapQuoteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/bridge": {
      "post": {
        "tags": [
          "Bridge"
        ],
        "summary": "Bridge tokens between chains",
        "description": "Bridge tokens between chains including Solana and EVM chains (Ethereum, Base, Arbitrum, etc.). Supports Solana → EVM and EVM → Solana bridges.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BridgeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bridge result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/bridge/quote": {
      "get": {
        "tags": [
          "Bridge"
        ],
        "summary": "Get bridge quote",
        "description": "Get a bridge quote without executing. Useful for previewing fees and estimated time.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "USDC",
              "description": "Input token address or symbol"
            },
            "required": true,
            "description": "Input token address or symbol",
            "name": "inputToken",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "USDC",
              "description": "Output token (optional, same as input if not specified)"
            },
            "required": false,
            "description": "Output token (optional, same as input if not specified)",
            "name": "outputToken",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "100",
              "description": "Human-readable input amount"
            },
            "required": true,
            "description": "Human-readable input amount",
            "name": "amount",
            "in": "query"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/SupportedChain"
            },
            "required": true,
            "description": "Source chain",
            "name": "sourceChain",
            "in": "query"
          },
          {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SupportedChain"
                },
                {
                  "example": "base",
                  "description": "Destination chain"
                }
              ]
            },
            "required": true,
            "description": "Destination chain",
            "name": "destinationChain",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Bridge quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeQuoteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tokenize": {
      "post": {
        "tags": [
          "Tokenize"
        ],
        "summary": "Launch a new token",
        "description": "Launch a new token on Solana. Each agent can only launch one token. Requires SOL for deployment costs.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenizeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token launched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizeResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request (validation error or insufficient funds)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundResponse"
                }
              }
            }
          },
          "409": {
            "description": "Agent already has a launched token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConflictResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Tokenize"
        ],
        "summary": "Get agent's launched token",
        "description": "Get information about the agent's launched token.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Token information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTokenInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Token not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundResponse"
                }
              }
            }
          }
        }
      }
    },
    "/fees": {
      "get": {
        "tags": [
          "Fees"
        ],
        "summary": "Get fee status",
        "description": "Get fee status for the agent's launched token including total fees, splits, and claim status.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Fee status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeStatus"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Token not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundResponse"
                }
              }
            }
          }
        }
      }
    },
    "/fees/claim": {
      "post": {
        "tags": [
          "Fees"
        ],
        "summary": "Claim accumulated fees",
        "description": "Claim accumulated fees from the agent's token. Requires the agent to be the beneficiary.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Claim result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeClaimResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wallet or token not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundResponse"
                }
              }
            }
          }
        }
      }
    },
    "/fees/history": {
      "get": {
        "tags": [
          "Fees"
        ],
        "summary": "Get fee claim history",
        "description": "Get the history of all fee claims for the agent's token.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Fee claim history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeClaimHistory"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Token not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rpc": {
      "post": {
        "tags": [
          "RPC"
        ],
        "summary": "Universal RPC proxy",
        "description": "Proxy JSON-RPC requests to Solana or EVM chains. Uses QuickNode multichain endpoint.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "RPC response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RpcResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request (invalid chain, method, or params)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rpc/chains": {
      "get": {
        "tags": [
          "RPC"
        ],
        "summary": "Get supported chains",
        "description": "Get list of supported chains for RPC proxy.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of supported chains",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainsListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/ws/{chain}": {
      "get": {
        "tags": [
          "WebSocket"
        ],
        "summary": "Chain RPC WebSocket proxy",
        "description": "Connect to blockchain RPC via WebSocket for real-time subscriptions.\n\n**Connection:** `wss://api.loomlay.com/ws/{chain}?key=YOUR_API_KEY`\n\n**Supported chains:** solana, ethereum, base, arbitrum, optimism, polygon, bsc\n\n**Solana subscriptions:**\n- accountSubscribe - Monitor account changes\n- logsSubscribe - Subscribe to transaction logs\n- programSubscribe - Monitor program account changes\n- signatureSubscribe - Track transaction signatures\n- slotSubscribe - Subscribe to slot updates\n\n**EVM subscriptions:**\n- eth_subscribe(\"newHeads\") - New block headers\n- eth_subscribe(\"logs\") - Contract event logs\n- eth_subscribe(\"newPendingTransactions\") - Pending transactions\n\n**Example (Solana):**\n```json\n{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"accountSubscribe\",\"params\":[\"ADDRESS\"]}\n```",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "solana",
                "ethereum",
                "base",
                "arbitrum",
                "optimism",
                "polygon",
                "bsc"
              ],
              "example": "solana",
              "description": "Blockchain to connect to"
            },
            "required": true,
            "description": "Blockchain to connect to",
            "name": "chain",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "example": "agent_xxx",
              "description": "API key for authentication"
            },
            "required": true,
            "description": "API key for authentication",
            "name": "key",
            "in": "query"
          }
        ],
        "responses": {
          "101": {
            "description": "WebSocket upgrade successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WsUpgradeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported chain",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/ws/dex/subscribe": {
      "get": {
        "tags": [
          "WebSocket"
        ],
        "summary": "DEX data WebSocket subscription",
        "description": "Subscribe to real-time DEX data updates via WebSocket.\n\n**Connection:** `wss://api.loomlay.com/ws/dex/subscribe?key=YOUR_API_KEY`\n\n**Available subscriptions:**\n- `trending` - Trending pairs updates\n- `gainers` - Top price gainers\n- `losers` - Top price losers\n- `newPairs` - Newly created pairs\n- `volume` - Top volume pairs\n\n**Subscribe message:**\n```json\n{\n  \"type\": \"subscribe\",\n  \"channels\": [\"trending\", \"gainers\"],\n  \"chain\": \"solana\"\n}\n```\n\n**Unsubscribe message:**\n```json\n{\n  \"type\": \"unsubscribe\",\n  \"channels\": [\"trending\"]\n}\n```\n\n**Data format:** Same as REST endpoints but pushed in real-time.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "agent_xxx",
              "description": "API key for authentication"
            },
            "required": true,
            "description": "API key for authentication",
            "name": "key",
            "in": "query"
          }
        ],
        "responses": {
          "101": {
            "description": "WebSocket upgrade successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WsDexSubscribeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    }
  }
}