{
  "openapi": "3.1.0",
  "info": {
    "title": "TrenchyTools API",
    "version": "1.0.0",
    "summary": "Trading and launch API for pump.fun / PumpSwap (Solana) and pons (Robinhood chain)",
    "description": "Build unsigned transactions from live curve / pool state, sign locally, send through our RPC and Jito lanes, stream creates, migrations and trades. Keys never leave your process.\n\nAgent instructions: https://trenchy.tools/AGENTS.md · Full docs as text: https://trenchy.tools/llms-full.txt · Capability discovery: https://api.trenchy.tools/api/chains"
  },
  "servers": [
    {
      "url": "https://api.trenchy.tools"
    }
  ],
  "tags": [
    {
      "name": "Solana"
    },
    {
      "name": "Robinhood chain"
    },
    {
      "name": "BNB Chain"
    },
    {
      "name": "Ethereum"
    },
    {
      "name": "Arc"
    },
    {
      "name": "Elysium",
      "description": "EXPERIMENTAL — Hyperliquid L2 (chain 99901, HYPE gas), Ascend launchpad, pre-public-mainnet"
    },
    {
      "name": "Transfers"
    },
    {
      "name": "Account"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKeyQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "api-key"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "code"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "What went wrong, in plain words"
          },
          "code": {
            "type": "string",
            "description": "Stable snake_case code; see https://trenchy.tools/docs/errors"
          },
          "hint": {
            "type": "string",
            "description": "What to change"
          },
          "docs": {
            "type": "string",
            "format": "uri",
            "description": "The docs anchor for this code"
          },
          "retryAfterSec": {
            "type": "integer"
          }
        }
      }
    }
  },
  "paths": {
    "/api/sol/trade-local": {
      "post": {
        "operationId": "sol_trade",
        "tags": [
          "Solana"
        ],
        "summary": "Buy & sell",
        "description": "**Buy & sell** — Get an unsigned buy or sell transaction for your wallet, then sign and send it.\nBuilds a transaction that buys or sells a coin from **your** wallet. We never see your private key: you sign the transaction yourself, then send it with /api/sol/send (https://trenchy.tools/docs/sol/send).\nBy default the body is the **raw transaction bytes** (`application/octet-stream`). Add `?format=json` to get JSON instead:\n\n**Create a token** — Launch on pump.fun, letsbonk (Raydium LaunchLab) or a Meteora DBC curve, dev buy included.\nThree calls: `POST /api/ipfs` for the metadata URI, a fresh mint keypair (generated locally, it co-signs), then `trade-local` with `action: \"create\"`. The create and the dev buy are one transaction.\nA coin can be priced in something other than SOL: USDC, an xStocks tokenized stock (`SPYx`, `NVDAx`…), WBTC, PUMP or another pump.fun coin. Pass the pair as `quoteMint`; `amount` is then in that asset and **your wallet must hold it** (we answer `409 no_quote_balance` with `needed`, `have` and the token account to fund). Our fee is still a small SOL transfer. The list of pairs is live on GET /api/sol/pairs (https://trenchy.tools/docs/sol/pairs).\n\n**Jito bundles** — Up to 5 transactions that land together, all or nothing; up to 16 buyers with lookup tables.\nSend an **array** of up to 5 trade objects instead of one. You get back a list of transactions, one per object, in the same order. Sign each with its wallet, then send them together with POST /api/sol/bundle (https://trenchy.tools/docs/sol/send-bundle). They land in the same block, in order, or not at all.\nAdd `?format=json` to get `{ transactions: [{ transaction, expected: { tokens, sol }, feeSol, mint, action }] }` instead of a bare list: handy for showing each wallet how many tokens it will get.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/trade",
          "https://trenchy.tools/docs/sol/create",
          "https://trenchy.tools/docs/sol/bundles"
        ],
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json"
              ]
            },
            "description": "json: {transaction (base64), expected, feeSol, mint} instead of raw transaction bytes"
          }
        ],
        "responses": {
          "200": {
            "description": "Unsigned v0 transaction as raw bytes (application/octet-stream) with x-expected-tokens / x-expected-sol / x-fee-sol headers; with ?format=json a JSON object (or {transactions:[…]} for a bundle)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "transaction": "AQAAAAAAAAAAAAAA…",
                  "encoding": "base64",
                  "expected": {
                    "tokens": 291577.94,
                    "quoteAmount": 0.01,
                    "sol": 0.01
                  },
                  "feeSol": 0.00005,
                  "mint": "MINT_ADDRESS",
                  "action": "buy",
                  "quote": {
                    "mint": "So11111111111111111111111111111111111111112",
                    "symbol": "SOL",
                    "decimals": 9
                  },
                  "venue": "pump"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "publicKey",
                      "action",
                      "amount",
                      "denominatedInSol"
                    ],
                    "properties": {
                      "publicKey": {
                        "type": "string",
                        "description": "Your wallet address (base58)."
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell",
                          "create",
                          "collectCreatorFee"
                        ],
                        "description": "`buy` or `sell`."
                      },
                      "mint": {
                        "type": "string",
                        "description": "The coin's address."
                      },
                      "amount": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string"
                          }
                        ],
                        "description": "How much. The coin's quote asset (SOL for SOL coins; USDC / the stock / the coin on a custom pair) if `denominatedInSol` is `\"true\"`, tokens if `\"false\"`. Sells also accept a share of your balance, like `\"100%\"` or `\"50%\"`."
                      },
                      "denominatedInSol": {
                        "type": "string",
                        "enum": [
                          "true",
                          "false"
                        ],
                        "description": "Whether `amount` is in the quote asset (`\"true\"`) or in tokens (`\"false\"`). `denominatedInQuote` is the same switch under the name that reads right on a custom pair."
                      },
                      "slippage": {
                        "type": "number",
                        "description": "Worst price you accept, in percent. Default 10. Use 15–25 for coins in their first minutes."
                      },
                      "priorityFee": {
                        "type": "number",
                        "description": "Extra SOL to land faster. Default 0.00005."
                      },
                      "pool": {
                        "type": "string",
                        "description": "`pump` (bonding curve), `pump-amm` (PumpSwap) or `launchlab` (a letsbonk coin's LaunchLab curve) or `auto` (we pick). Default `pump`; `auto` resolves curve vs. AMM from chain state. `auto` follows a coin from the pump.fun curve to PumpSwap, and finds a LaunchLab (letsbonk) curve when there is no pump.fun one. `meteora-dbc` = a Meteora DBC curve (Bags, Moonit, Hooked, partner pads); `auto` detects it last."
                      },
                      "partialFill": {
                        "type": "boolean",
                        "description": "Mayhem coins only: a buy past the remaining supply takes what is left instead of failing. Other coins complete the curve and keep buying from the pool-to-be (synthetic migration)."
                      },
                      "tokenMetadata": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "`{ name, symbol, uri }`: `uri` is the `metadataUri` from /api/ipfs (https://trenchy.tools/docs/ipfs). Name up to 32 characters, symbol up to 10."
                      },
                      "denominatedInQuote": {
                        "type": "string",
                        "enum": [
                          "true"
                        ],
                        "description": "Same as `denominatedInSol`, the name that reads right on a custom pair."
                      },
                      "quoteMint": {
                        "type": "string",
                        "description": "What the coin is priced and traded in: a symbol or mint from GET /api/sol/pairs (https://trenchy.tools/docs/sol/pairs) (`USDC`, `SPYx`, `WBTC`, `PUMP`…) or any pump.fun coin's mint. Default SOL. See Custom pairs (https://trenchy.tools/docs/sol/pairs)."
                      },
                      "mayhemMode": {
                        "type": "boolean",
                        "description": "pump.fun's trading agent trades the coin for its first 24 h (2 B supply, no synthetic migration). SOL or USDC quotes only (`422 mayhem_quote_not_allowed`). See Mayhem mode (https://trenchy.tools/docs/sol/mayhem)."
                      },
                      "creatorFeeBps": {
                        "type": "number",
                        "description": "Your own creator fee in basis points (100 = 1 %), custom pairs only and within the on-chain range (`422 creator_fee_not_allowed` otherwise). Omit for pump.fun's schedule. Fixed at creation."
                      },
                      "holderReward": {
                        "type": "boolean",
                        "description": "The creator fee goes to the coin's holders instead of you, forever (the creator becomes the holder-rewards PDA). `422 holder_reward_disabled` while pump.fun has it off."
                      },
                      "venue": {
                        "type": "string",
                        "description": "`pump` (default), `launchlab` (Raydium LaunchLab, letsbonk) or `meteora-dbc` (a Meteora Dynamic Bonding Curve with you as the partner)."
                      },
                      "platform": {
                        "type": "string",
                        "description": "LaunchLab only. `bonk` (letsbonk.fun, default): classic SPL mint, 1 B supply, 793.1 M on the curve, graduates at 85 SOL to Raydium CPMM."
                      },
                      "config": {
                        "type": "string",
                        "description": "meteora-dbc: the public key of a fresh keypair for the partner config (it co-signs, like the mint)."
                      },
                      "curve": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "meteora-dbc: `{ initialMcapUsd, migrationMcapUsd, permanent }`, default `{ 5000, 69000, false }` (a permanent curve never graduates)."
                      },
                      "curveFeeBps": {
                        "type": "number",
                        "description": "meteora-dbc: the flat trade fee, 25–1000 bps, default 100 (1 %). It is paid to `feeClaimer` (default: you)."
                      },
                      "tokenType": {
                        "type": "string",
                        "description": "meteora-dbc: `token2022` (default) or `spl`."
                      },
                      "migrationFeePct": {
                        "type": "number",
                        "description": "meteora-dbc: percent of the raise taken by the partner at graduation, 0–50, default 0."
                      }
                    },
                    "title": "One transaction"
                  },
                  {
                    "type": "array",
                    "title": "Jito bundle (2–5 transactions, first priorityFee = tip)",
                    "minItems": 1,
                    "maxItems": 5,
                    "items": {
                      "type": "object",
                      "required": [
                        "publicKey",
                        "action",
                        "amount",
                        "denominatedInSol"
                      ],
                      "properties": {
                        "publicKey": {
                          "type": "string",
                          "description": "Your wallet address (base58)."
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "buy",
                            "sell",
                            "create",
                            "collectCreatorFee"
                          ],
                          "description": "`buy` or `sell`."
                        },
                        "mint": {
                          "type": "string",
                          "description": "The coin's address."
                        },
                        "amount": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "How much. The coin's quote asset (SOL for SOL coins; USDC / the stock / the coin on a custom pair) if `denominatedInSol` is `\"true\"`, tokens if `\"false\"`. Sells also accept a share of your balance, like `\"100%\"` or `\"50%\"`."
                        },
                        "denominatedInSol": {
                          "type": "string",
                          "enum": [
                            "true",
                            "false"
                          ],
                          "description": "Whether `amount` is in the quote asset (`\"true\"`) or in tokens (`\"false\"`). `denominatedInQuote` is the same switch under the name that reads right on a custom pair."
                        },
                        "slippage": {
                          "type": "number",
                          "description": "Worst price you accept, in percent. Default 10. Use 15–25 for coins in their first minutes."
                        },
                        "priorityFee": {
                          "type": "number",
                          "description": "Extra SOL to land faster. Default 0.00005."
                        },
                        "pool": {
                          "type": "string",
                          "description": "`pump` (bonding curve), `pump-amm` (PumpSwap) or `launchlab` (a letsbonk coin's LaunchLab curve) or `auto` (we pick). Default `pump`; `auto` resolves curve vs. AMM from chain state. `auto` follows a coin from the pump.fun curve to PumpSwap, and finds a LaunchLab (letsbonk) curve when there is no pump.fun one. `meteora-dbc` = a Meteora DBC curve (Bags, Moonit, Hooked, partner pads); `auto` detects it last."
                        },
                        "partialFill": {
                          "type": "boolean",
                          "description": "Mayhem coins only: a buy past the remaining supply takes what is left instead of failing. Other coins complete the curve and keep buying from the pool-to-be (synthetic migration)."
                        },
                        "tokenMetadata": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "`{ name, symbol, uri }`: `uri` is the `metadataUri` from /api/ipfs (https://trenchy.tools/docs/ipfs). Name up to 32 characters, symbol up to 10."
                        },
                        "denominatedInQuote": {
                          "type": "string",
                          "enum": [
                            "true"
                          ],
                          "description": "Same as `denominatedInSol`, the name that reads right on a custom pair."
                        },
                        "quoteMint": {
                          "type": "string",
                          "description": "What the coin is priced and traded in: a symbol or mint from GET /api/sol/pairs (https://trenchy.tools/docs/sol/pairs) (`USDC`, `SPYx`, `WBTC`, `PUMP`…) or any pump.fun coin's mint. Default SOL. See Custom pairs (https://trenchy.tools/docs/sol/pairs)."
                        },
                        "mayhemMode": {
                          "type": "boolean",
                          "description": "pump.fun's trading agent trades the coin for its first 24 h (2 B supply, no synthetic migration). SOL or USDC quotes only (`422 mayhem_quote_not_allowed`). See Mayhem mode (https://trenchy.tools/docs/sol/mayhem)."
                        },
                        "creatorFeeBps": {
                          "type": "number",
                          "description": "Your own creator fee in basis points (100 = 1 %), custom pairs only and within the on-chain range (`422 creator_fee_not_allowed` otherwise). Omit for pump.fun's schedule. Fixed at creation."
                        },
                        "holderReward": {
                          "type": "boolean",
                          "description": "The creator fee goes to the coin's holders instead of you, forever (the creator becomes the holder-rewards PDA). `422 holder_reward_disabled` while pump.fun has it off."
                        },
                        "venue": {
                          "type": "string",
                          "description": "`pump` (default), `launchlab` (Raydium LaunchLab, letsbonk) or `meteora-dbc` (a Meteora Dynamic Bonding Curve with you as the partner)."
                        },
                        "platform": {
                          "type": "string",
                          "description": "LaunchLab only. `bonk` (letsbonk.fun, default): classic SPL mint, 1 B supply, 793.1 M on the curve, graduates at 85 SOL to Raydium CPMM."
                        },
                        "config": {
                          "type": "string",
                          "description": "meteora-dbc: the public key of a fresh keypair for the partner config (it co-signs, like the mint)."
                        },
                        "curve": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "meteora-dbc: `{ initialMcapUsd, migrationMcapUsd, permanent }`, default `{ 5000, 69000, false }` (a permanent curve never graduates)."
                        },
                        "curveFeeBps": {
                          "type": "number",
                          "description": "meteora-dbc: the flat trade fee, 25–1000 bps, default 100 (1 %). It is paid to `feeClaimer` (default: you)."
                        },
                        "tokenType": {
                          "type": "string",
                          "description": "meteora-dbc: `token2022` (default) or `spl`."
                        },
                        "migrationFeePct": {
                          "type": "number",
                          "description": "meteora-dbc: percent of the raise taken by the partner at graduation, 0–50, default 0."
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/api/sol/pairs": {
      "get": {
        "operationId": "sol_pairs",
        "tags": [
          "Solana"
        ],
        "summary": "Custom pairs",
        "description": "**Custom pairs** — Custom pairs: launch a coin priced in a stock, USDC or another coin — and what trading one changes.\nA pump.fun coin is priced and traded in a **quote asset**. SOL is the default; a coin can instead be paired with USDC, an xStocks tokenized stock (`SPYx`, `NVDAx`, `TSLAx`…), WBTC, PUMP, other listed assets, or **any other pump.fun coin**. The pair is chosen at creation (`quoteMint` on Create a token (https://trenchy.tools/docs/sol/create)) and never changes; after graduation the coin's PumpSwap pool is priced in the same asset.\nThe list is read from chain (SOL, the Global whitelist, the QuoteControl list) and cached 10 minutes. Pump coins are not enumerated: pass a coin's mint as `quoteMint` and we resolve it (`422 quote_not_eligible` when the chain refuses it).",
        "x-docs": [
          "https://trenchy.tools/docs/sol/pairs"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "pairs": [
                    {
                      "mint": "So11111111111111111111111111111111111111112",
                      "symbol": "SOL",
                      "name": "Solana",
                      "decimals": 9,
                      "tokenProgram": "Tokenkeg…",
                      "source": "sol",
                      "kind": "sol",
                      "initialVirtualQuoteReserves": "30000000000",
                      "feeSchedule": "tiers"
                    },
                    {
                      "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                      "symbol": "USDC",
                      "name": "USD Coin",
                      "decimals": 6,
                      "tokenProgram": "Tokenkeg…",
                      "source": "global",
                      "kind": "stable",
                      "initialVirtualQuoteReserves": "…",
                      "feeSchedule": "stable"
                    },
                    {
                      "mint": "XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB",
                      "symbol": "SPYx",
                      "name": "SP500 xStock",
                      "decimals": 8,
                      "tokenProgram": "TokenzQd…",
                      "source": "quoteControl",
                      "kind": "stock",
                      "initialVirtualQuoteReserves": "…",
                      "feeSchedule": "exotic"
                    }
                  ],
                  "checkedAt": 1761177600000
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/lut": {
      "post": {
        "operationId": "sol_lut",
        "tags": [
          "Solana"
        ],
        "summary": "Lookup tables",
        "description": "**Lookup tables** — Launch with up to 16 buyers in one block: a lookup table lets several wallets buy in one transaction.\nA Jito bundle holds 5 transactions, so a plain launch bundle is the create plus 4 buyers. An **address lookup table** lists the accounts a coin's buys touch (its curve accounts, each wallet's token account), so one transaction can carry **about 4 buyers** instead of one, and a bundle about **16**. The table lives on chain under your wallet; its rent (about 0.002 SOL plus 32 bytes per address) comes back when you close it after the launch.\nYou get the table's address and one or more unsigned transactions: the first creates the table and adds the first addresses, the others add more. Sign each with `authority` and send them **in order** with /api/sol/send (https://trenchy.tools/docs/sol/send), waiting for the first to confirm.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/lut"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "lookupTable": "…",
                  "addresses": 14,
                  "rentSol": 0.0043,
                  "transactions": [
                    "base64…"
                  ],
                  "encoding": "base64"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "authority",
                  "mint",
                  "wallets"
                ],
                "properties": {
                  "authority": {
                    "type": "string",
                    "description": "The wallet that owns the table and pays its rent (the dev wallet is a good choice)."
                  },
                  "mint": {
                    "type": "string",
                    "description": "The coin (it may not exist yet: pass the new mint's public key)."
                  },
                  "wallets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Every wallet that will buy (up to 60)."
                  },
                  "creator": {
                    "type": "string",
                    "description": "The coin's creator (defaults to `authority`); needed when the coin does not exist yet."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/sol/creator-fees": {
      "get": {
        "operationId": "sol_creator_fees",
        "tags": [
          "Solana"
        ],
        "summary": "Creator fees",
        "description": "**Creator fees** — See and claim the creator fees your coins earned.\nEvery pump.fun coin pays its creator a share of each trade, on the bonding curve and after it moves to PumpSwap. Check what a creator wallet can claim, then claim it all in one transaction.\nAsk /api/sol/trade-local (https://trenchy.tools/docs/sol/trade) for `action: \"collectCreatorFee\"`. No mint needed: one transaction claims every coin's fees. Sign it with the creator wallet and send it. There is no API fee on claims.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/creator-fees"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The creator (dev) wallet."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "…",
                  "lamports": "18250000",
                  "sol": 0.01825
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/trade": {
      "post": {
        "operationId": "sol_lightning",
        "tags": [
          "Solana"
        ],
        "summary": "Lightning trade",
        "description": "**Lightning trade** — We build, sign with the wallet linked to your key, and send. One request, no signing code.\nSame fields as Buy & sell (https://trenchy.tools/docs/sol/trade), but no `publicKey`: we use the Solana wallet linked to your API key (create one with **Key + new wallets** on Get an API key (https://trenchy.tools/docs/api-keys)) and send the transaction for you. Fee: 1% instead of 0.5%.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/lightning"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "signature": "5Uf…",
                  "lanes": [
                    "rpc",
                    "jito:mainnet"
                  ],
                  "expected": {
                    "tokens": 291577.9,
                    "sol": 0.01
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/send": {
      "post": {
        "operationId": "sol_send",
        "tags": [
          "Solana"
        ],
        "summary": "Send a transaction",
        "description": "**Send a transaction** — Send a signed transaction through our RPC and every Jito region at once.\nTakes a **signed** transaction and pushes it through our premium Solana node and all Jito regions at the same time, so it lands as fast as possible. Works for any Solana transaction, not just ours.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/send"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "signature": "5Uf…",
                  "lanes": [
                    "rpc",
                    "jito:mainnet",
                    "jito:ny",
                    "jito:frankfurt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transaction"
                ],
                "properties": {
                  "transaction": {
                    "type": "string",
                    "description": "The signed transaction, base64 or base58."
                  },
                  "skipPreflight": {
                    "type": "boolean",
                    "description": "Default `false`: we simulate first and refuse a transaction that would fail. `true` sends without checking (faster)."
                  },
                  "jitoOnly": {
                    "type": "boolean",
                    "description": "Send only through Jito."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/sol/blockhash": {
      "get": {
        "operationId": "sol_blockhash",
        "tags": [
          "Solana"
        ],
        "summary": "Blockhash",
        "description": "**Blockhash** — A recent blockhash, for transactions you build yourself.\nMost transactions come ready-made from /api/sol/trade-local (https://trenchy.tools/docs/sol/trade). For the ones you build yourself (moving SOL between your wallets, closing empty token accounts) you need a recent blockhash: get it here, build and sign the transaction, then send it with /api/sol/send (https://trenchy.tools/docs/sol/send). No RPC of your own needed.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/blockhash"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "blockhash": "5tt5pLPN…",
                  "lastValidBlockHeight": 438211042
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/bundle": {
      "post": {
        "operationId": "sol_send_bundle",
        "tags": [
          "Solana"
        ],
        "summary": "Send a bundle",
        "description": "**Send a bundle** — Submit 1–5 signed transactions as one Jito bundle.\n",
        "x-docs": [
          "https://trenchy.tools/docs/sol/send-bundle"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "bundleId": "a1b2…",
                  "signatures": [
                    "…",
                    "…"
                  ],
                  "region": "ny"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transactions"
                ],
                "properties": {
                  "transactions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "1 to 5 signed transactions (base58 or base64). One must pay a Jito tip account; bundles from trade-local (https://trenchy.tools/docs/sol/bundles) already do."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/sol/tx/{signature}": {
      "get": {
        "operationId": "sol_tx",
        "tags": [
          "Solana"
        ],
        "summary": "Transaction status",
        "description": "**Transaction status** — Is my transaction confirmed?\n",
        "x-docs": [
          "https://trenchy.tools/docs/sol/tx"
        ],
        "parameters": [
          {
            "name": "signature",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "signature": "5Uf…",
                  "slot": 459926401,
                  "confirmationStatus": "confirmed",
                  "err": null
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/priority-fee": {
      "get": {
        "operationId": "sol_priority_fee",
        "tags": [
          "Solana"
        ],
        "summary": "Priority fee",
        "description": "**Priority fee** — Live suggestions for priorityFee and Jito tips.\nRead this before trading to pick a `priorityFee` that lands. `suggestedPriorityFeeSol` plugs straight into the `priorityFee` field.\nJito tip accounts (for building your own bundles): `GET /api/sol/jito/tip-accounts`.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/priority-fee"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "suggestedPriorityFeeSol": {
                    "low": 0.000006,
                    "medium": 0.000018,
                    "high": 0.000024,
                    "veryHigh": 0.000252
                  },
                  "jitoTipSol": {
                    "p25": 0.000001,
                    "p50": 0.000012,
                    "p75": 0.000077,
                    "p95": 0.00055
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/quote": {
      "get": {
        "operationId": "sol_quote",
        "tags": [
          "Solana"
        ],
        "summary": "Quote",
        "description": "**Quote** — See what a trade would give you before you make it.\n",
        "x-docs": [
          "https://trenchy.tools/docs/sol/quote"
        ],
        "parameters": [
          {
            "name": "mint",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin's address."
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`buy` or `sell`."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "The quote asset (SOL, or USDC / the stock / the coin on a custom pair) for a buy, tokens for a sell (by default)."
          },
          {
            "name": "denominatedInSol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Override the unit (`denominatedInQuote` is the same switch)."
          },
          {
            "name": "pool",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "`auto` (default), `pump` or `pump-amm`. `launchlab` quotes a letsbonk coin on its LaunchLab curve (SOL in / tokens out, every fee included); `auto` detects it."
          },
          {
            "name": "denominatedInQuote",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Same as `denominatedInSol`: `true` = `amount` is in the coin's quote asset, `false` = tokens."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "pool": "pump",
                  "action": "buy",
                  "quote": {
                    "mint": "So11111111111111111111111111111111111111112",
                    "symbol": "SOL",
                    "decimals": 9
                  },
                  "quoteIn": 0.1,
                  "solIn": 0.1,
                  "tokensOut": 2915779.4,
                  "avgPriceQuote": 3.4e-8,
                  "spotPriceQuote": 3.36e-8,
                  "avgPriceSol": 3.4e-8,
                  "spotPriceSol": 3.36e-8,
                  "priceImpactPct": 1.27,
                  "marketCapQuote": 33.6,
                  "marketCapSol": 33.6,
                  "bondingProgressPct": 4.7,
                  "complete": false,
                  "mayhem": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/token/{mint}": {
      "get": {
        "operationId": "sol_token",
        "tags": [
          "Solana"
        ],
        "summary": "Token info",
        "description": "**Token info** — Name, image link, quote asset, price, market cap, Mayhem / holder-reward / creator-fee flags and how close the coin is to graduating.\n",
        "x-docs": [
          "https://trenchy.tools/docs/sol/token"
        ],
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/balances": {
      "get": {
        "operationId": "sol_balances",
        "tags": [
          "Solana"
        ],
        "summary": "Balances",
        "description": "**Balances** — SOL and token balances of one wallet, or of up to 100 wallets in one call.\nA bundler checking its dev, bundle and holder wallets: pass `wallets` instead of `wallet` and get every SOL balance (and one coin's balance with `mint`) in a single request.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/balances"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Any Solana address."
          },
          {
            "name": "mints",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated coin addresses. Leave out to list every non-zero token (slow for wallets with thousands of tokens)."
          },
          {
            "name": "includeEmpty",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "description": "Also list token accounts holding 0, e.g. to close them and get the rent back."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Up to 100 comma-separated addresses."
          },
          {
            "name": "mint",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "One coin address: each row then carries that coin's balance too."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "…",
                  "sol": 1.25,
                  "tokens": [
                    {
                      "mint": "…",
                      "balance": 291577.94,
                      "raw": "291577940000",
                      "account": "…",
                      "program": "TokenzQd…"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/trades": {
      "get": {
        "operationId": "sol_trades",
        "tags": [
          "Solana"
        ],
        "summary": "Trade history",
        "description": "**Trade history** — The coin's past trades, newest first, in the live feed's shape.\nThe websocket only streams what happens after you subscribe. This call fills in what happened before: the coin's recent transactions, decoded with the same pump.fun / PumpSwap event decoder the feed uses, so a tape can show the dev buy and the bundle, then append the stream. Each entry has the same fields as a `subscribeTokenTrade` message.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/trades"
        ],
        "parameters": [
          {
            "name": "mint",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "How many recent transactions to scan, 1–200 (default 100). Transactions that are not trades of this coin are skipped."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "mint": "…",
                  "scanned": 50,
                  "trades": [
                    {
                      "txType": "buy",
                      "signature": "5Kx…",
                      "mint": "…",
                      "traderPublicKey": "…",
                      "solAmount": 0.5,
                      "tokenAmount": 17376518.17,
                      "pool": "pump",
                      "marketCapSol": 28.9,
                      "priceSol": 2.9e-8,
                      "slot": 462818085,
                      "timestamp": 1761720000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/pnl": {
      "get": {
        "operationId": "sol_pnl",
        "tags": [
          "Solana"
        ],
        "summary": "Profit / loss",
        "description": "**Profit / loss** — The exact SOL profit or loss of your wallets on one coin, fees included.\nFor each wallet, the API reads every transaction of that wallet that touched the coin and takes the wallet's real SOL change in it. So the result includes everything: the trade, pump.fun's and the creator's fees, the API fee, priority fees, Jito tips and account rent. Wrapped SOL the wallet owns counts as SOL.\nMoving SOL between your own wallets never touches the coin, so funding a buyer wallet is not a cost and collecting it back is not a profit. Claimed creator fees are not part of it (a claim does not touch the coin).",
        "x-docs": [
          "https://trenchy.tools/docs/sol/pnl"
        ],
        "parameters": [
          {
            "name": "mint",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "1 to 25 wallet addresses, comma separated."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: only read transactions from this time on (e.g. the launch time). Faster for wallets with a long history."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "mint": "…pump",
                  "since": null,
                  "spent": 0.7231,
                  "received": 0.9114,
                  "net": 0.1883,
                  "trades": 7,
                  "truncated": false,
                  "wallets": [
                    {
                      "wallet": "…",
                      "spent": 0.5174,
                      "received": 0.6522,
                      "net": 0.1348,
                      "tokensBought": 17231004.2,
                      "tokensSold": 17231004.2,
                      "truncated": false,
                      "txs": [
                        {
                          "signature": "…",
                          "time": 1794390000000,
                          "kind": "buy",
                          "sol": -0.5174,
                          "tokens": 17231004.2
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/sol/close-accounts": {
      "post": {
        "operationId": "sol_close_accounts",
        "tags": [
          "Solana"
        ],
        "summary": "Close empty token accounts",
        "description": "**Close empty token accounts** — Get back the rent (~0.002 SOL each) held by a wallet's empty token accounts.\nEvery coin a wallet ever held leaves a token account behind, and each one holds about 0.002 SOL of rent. Once the wallet has sold everything, those accounts are empty and the rent can come back. This endpoint builds the transactions that close them: classic SPL Token and Token-2022 accounts, only the ones holding 0 tokens.\n`payer` pays the network fee. A wallet that was just swept holds no SOL, so let another wallet (your main wallet) pay and receive the rent: sign each transaction with the payer and the owner, then send it with `POST /api/sol/send`. No fee is charged: this is account maintenance.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/close-accounts"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "owner": "…",
                  "destination": "…",
                  "payer": "…",
                  "transactions": [
                    "base64 v0 transaction"
                  ],
                  "encoding": "base64",
                  "accounts": [
                    {
                      "address": "…",
                      "mint": "…pump",
                      "rentSol": 0.00203928
                    }
                  ],
                  "rentSol": 0.00203928,
                  "note": "sign each transaction with the payer and the owner and send it (POST /api/sol/send)"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "owner"
                ],
                "properties": {
                  "owner": {
                    "type": "string",
                    "description": "The wallet that owns the token accounts. It signs."
                  },
                  "destination": {
                    "type": "string",
                    "description": "Where the rent goes. Default: the owner."
                  },
                  "payer": {
                    "type": "string",
                    "description": "Who pays the network fee and signs too. Default: the owner."
                  },
                  "accounts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Only close these token account addresses (still only the empty ones)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/sol/txs": {
      "get": {
        "operationId": "sol_txs",
        "tags": [
          "Solana"
        ],
        "summary": "Many transaction statuses",
        "description": "**Many transaction statuses** — The status of up to 100 transactions in one call.\nWhen your app waits on many transactions at once (funding a launch, a sell-all, a volume run), ask for all of them together instead of one `GET /api/sol/tx/:signature` per transaction. One call a second covers them all and stays far inside your rate limit.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/txs"
        ],
        "parameters": [
          {
            "name": "signatures",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "1 to 100 transaction signatures, comma separated."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "statuses": [
                    {
                      "signature": "SIG_1",
                      "slot": 380101234,
                      "confirmationStatus": "confirmed",
                      "err": null
                    },
                    {
                      "signature": "SIG_2",
                      "confirmationStatus": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/trade-local": {
      "post": {
        "operationId": "rh_trade",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Buy & sell",
        "description": "**Buy & sell** — Buy or sell any Robinhood launchpad coin: pons, pools.trade, circus, Sushi, pools.fun.\nReturns the transactions your wallet needs, in order, **unsigned**. Sign and send them one after another with your own wallet. If a transaction is labeled `approve`, `graduate` or `swap`, wait for it to confirm before sending the next one. Every buy and sell carries a min-out derived from the quote and your `slippage`, on the curve and on the v4 pool alike. Works for every supported launchpad: the API looks the token up (one call), routes to its curve or pool and labels the answer with `venue`.\n**Coins priced in a pair token** (USDG, NVDA, TSLA, SPY, cbBTC… — `quoteSymbol` on GET /api/rh/token/:token (https://trenchy.tools/docs/rh/token)) trade from ETH like any other: a buy becomes `swap` (ETH → pair token on Uniswap V4) · `approve` · `buy`, a sell becomes `approve` · `sell` · `swap` (pair token → ETH); once the coin has graduated it is **one** router swap over the whole path. The answer carries `route` (the legs) and `expected.quote` (the pair amount). Each leg spends the previous leg's guaranteed minimum, so a little pair token (the slippage remainder) can stay in the wallet. Details and the supported tokens: Pair tokens (https://trenchy.tools/docs/rh/pairs).\n\n**Create a token** — Launch on pons, pools.trade, circus, Sushi or pools.fun with one call, dev buy included.\n**Pair-token launches** (`pairToken`): the answer is `swap` (ETH → pair token) · `approve` · `create`, and `predicted.token` is still exact. The launch fee stays in ETH (`launchFeeEth`); `expected.quote` is the pair amount the dev buy spends. Send the three in order, each after the previous one confirms.\nAdd `venue` and the same body launches elsewhere. The answer keeps its shape: `transactions[]` in order, `predicted`, `launchFeeEth`, `expected`. pools.trade answers `create` + `buy` (send both, same wallet, next nonce, no waiting in between); circus, Sushi and pools.fun put the dev buy inside the one `create`. Each venue's rules are on Launchpads (https://trenchy.tools/docs/rh/venues).",
        "x-docs": [
          "https://trenchy.tools/docs/rh/trade",
          "https://trenchy.tools/docs/rh/create"
        ],
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "json"
              ]
            },
            "description": "ignored on Robinhood (always JSON)"
          }
        ],
        "responses": {
          "200": {
            "description": "Ordered unsigned EVM transactions: {chainId, transactions:[{from,to,data,value,gas,label}], expected, venue}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "chainId": 4663,
                  "transactions": [
                    {
                      "label": "approve",
                      "to": "0x…token",
                      "data": "0x…",
                      "value": "0",
                      "gas": "55971"
                    },
                    {
                      "label": "sell",
                      "to": "0x…curve",
                      "data": "0x…",
                      "value": "0"
                    },
                    {
                      "label": "fee",
                      "to": "0x…",
                      "data": "0x",
                      "value": "162873307575",
                      "valueEth": "0.000000162873307575"
                    }
                  ],
                  "expected": {
                    "tokens": 19761.65,
                    "eth": 0.0000326
                  },
                  "venue": "curve"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet",
                  "action",
                  "token",
                  "amount"
                ],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "Your 0x address."
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "buy",
                      "sell",
                      "create"
                    ],
                    "description": "`buy` or `sell`."
                  },
                  "token": {
                    "type": "string",
                    "description": "The coin's 0x address."
                  },
                  "amount": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "description": "Buys: ETH. Sells: tokens, or a share of your balance like `\"100%\"`."
                  },
                  "slippage": {
                    "type": "number",
                    "description": "Percent. Default 5."
                  },
                  "venue": {
                    "type": "string",
                    "description": "Optional. The launchpad is detected from the token; pass it only to assert one (`409 wrong_venue` if it disagrees). See Launchpads (https://trenchy.tools/docs/rh/venues)."
                  },
                  "denominatedInQuote": {
                    "type": "boolean",
                    "description": "Pair-token coins only (a curve priced in USDG, NVDA, SPY… — see Pair tokens (https://trenchy.tools/docs/rh/pairs)). `true`: `amount` is in the pair token and the wallet pays with pair tokens it already holds. Default `false`: `amount` is ETH and the API swaps it into the pair token first."
                  },
                  "receive": {
                    "type": "string",
                    "description": "Sells of pair-token coins: `eth` (default) swaps the pair token back to ETH in the same list; `quote` keeps the pair token."
                  },
                  "tokenMetadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ name, symbol, image, description?, twitter?, telegram?, website? }`."
                  },
                  "exemptWallets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "pons only. Up to 31 wallets that skip the launch-window snipe tax (your other buyers)."
                  },
                  "creatorFees": {
                    "type": "boolean",
                    "description": "pools.trade only. Default `true` (you receive the LP fee position); `false` launches fees-off."
                  },
                  "pairToken": {
                    "type": "string",
                    "description": "pons only. Price the curve in an ERC-20 instead of ETH: a symbol (`USDG`, `NVDA`, `TSLA`, `SPY`, `QQQ`, `SPCX`, `cbBTC`, `DIS`, `MCD`…) or any ERC-20 address. Graduation threshold and prices are then in that token. See Pair tokens (https://trenchy.tools/docs/rh/pairs)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/rh/venues": {
      "get": {
        "operationId": "rh_venues",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Launchpads",
        "description": "**Launchpads** — Five Robinhood launchpads behind one create call: pons, pools.trade, circus, Sushi and pools.fun.\nEvery launch goes through POST /api/rh/trade-local (https://trenchy.tools/docs/rh/create) with `action: \"create\"`. Pick the launchpad with `venue`; leave it out for pons. Buys and sells never need a venue: the API recognises the launchpad of any Robinhood coin in one call and routes the trade to its market (GET /api/rh/token/:token (https://trenchy.tools/docs/rh/token) shows what it found).\n**pools.trade** has no anti-snipe window: the pool trades at 0.25 % from the block the launch lands in, and the dev buy cannot ride inside the launch call. The answer is `create` then `buy`: send both from the same wallet with consecutive nonces **without waiting for the first receipt**. The token address is deterministic (name + symbol + wallet), so the same wallet can never launch the same pair twice (`409 already_launched`). Set `creatorFees: false` to launch through the fees-off strategy (the default mints you the LP fee position).",
        "x-docs": [
          "https://trenchy.tools/docs/rh/venues"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "chain": "robinhood",
                  "chainId": 4663,
                  "default": "pons",
                  "venues": [
                    {
                      "id": "pons",
                      "name": "pons",
                      "market": "bonding curve → Uniswap V4 pool …",
                      "launchFeeEth": "live",
                      "devBuy": "atomic",
                      "predictable": "exact",
                      "creatorFees": "…",
                      "notes": [
                        "…"
                      ],
                      "live": {}
                    },
                    {
                      "id": "sushi",
                      "…": "…",
                      "live": {
                        "launchFeeEth": 0.0005,
                        "sushiFeeBps": 3000,
                        "startTick": -199600
                      }
                    },
                    {
                      "id": "pools-fun",
                      "…": "…",
                      "live": {
                        "startTick": -199600,
                        "paused": true
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/pairs": {
      "get": {
        "operationId": "rh_pairs",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Pair tokens",
        "description": "**Pair tokens** — Launch and trade pons coins priced in USDG, tokenized stocks or cbBTC — paid in ETH, routed over Uniswap V4.\nA pons curve can be priced in an ERC-20 **pair token** instead of ETH: USDG (a dollar stablecoin), tokenized stocks (NVDA, TSLA, SPY, QQQ, SPCX, DIS, MCD…), cbBTC. About a quarter of pons launches use one. The API makes them work from ETH the way GMGN does: ETH is swapped into the pair token on Uniswap V4 (the pair's own hookless pools, directly or over the SPY / USDG hubs), the curve or the coin's hooked pool takes the pair token, and sells run the same path backwards. You never need to hold the pair token — but you can pay with it if you do.\nThe route table is live, not hard-coded: the pool keys are hashed into pool ids, read off the PoolManager and the best path is picked by a simulated 0.001 ETH swap (cached ten minutes). A token with no reachable pool reads `routableFromEth: false`; coins priced in it then need the pair token itself (`409 pair_unroutable` tells you so).",
        "x-docs": [
          "https://trenchy.tools/docs/rh/pairs"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "chain": "robinhood",
                  "default": "ETH",
                  "symbols": [
                    "USDG",
                    "SPY",
                    "NVDA",
                    "TSLA",
                    "SPCX",
                    "QQQ",
                    "CBBTC",
                    "DIS",
                    "MCD",
                    "ORBIO",
                    "PONS"
                  ],
                  "pairs": [
                    {
                      "symbol": "ETH",
                      "pairToken": "0x0000000000000000000000000000000000000000",
                      "decimals": 18,
                      "routableFromEth": true
                    },
                    {
                      "symbol": "USDG",
                      "pairToken": "0x5fc5…d168",
                      "decimals": 6,
                      "routableFromEth": true,
                      "route": "ETH→USDG (100/1)",
                      "probe": {
                        "ethIn": 0.001,
                        "out": 2.2189
                      }
                    },
                    {
                      "symbol": "TSLA",
                      "pairToken": "0x322f…3b2d",
                      "decimals": 18,
                      "routableFromEth": true,
                      "route": "ETH→USDG (100/1) · USDG→SPY (100/1) · SPY→TSLA (500/5)"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/creator-fees": {
      "get": {
        "operationId": "rh_creator_fees",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Creator fees",
        "description": "**Creator fees** — See and claim creator fees on pons, pools.trade, Sushi and pools.fun.\nEvery pons coin pays its creator 70 % of the curve fee and snipe tax, plus the whole creator tax, on every trade until graduation. The fees are booked on the coin's curve and move to a per-creator **escrow** when the curve is swept (by the creator, or at graduation); the escrow holds one ETH balance per creator across all their coins. Check what a creator wallet can claim, then claim it in one go.\nAsk /api/rh/trade-local (https://trenchy.tools/docs/rh/trade) for `action: \"collectCreatorFee\"` with `wallet` (and `token` to sweep that curve first). The answer is `[sweep?] claim`: sign and send them in order with the creator wallet; the claim pays the whole escrow balance. There is no API fee on claims.",
        "x-docs": [
          "https://trenchy.tools/docs/rh/creator-fees"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The creator (dev) wallet. Required for pons."
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A coin of that creator: adds what its curve still holds, and whether the claim can sweep it."
          },
          {
            "name": "venue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Detected from `token` when omitted; `pons` without a token."
          },
          {
            "name": "tokenId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "pools.trade: your fee position (the beneficiary NFT id)."
          },
          {
            "name": "launchTx",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "pools.trade: the launch transaction hash; the API reads the position id from it."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0x…",
                  "escrow": "0xd3AF…",
                  "claimableEth": 0.0124,
                  "curve": {
                    "token": "0x…",
                    "curve": "0x…",
                    "creator": "0x…",
                    "graduated": false,
                    "pendingEth": 0.0031,
                    "sweepable": true
                  },
                  "eth": 0.0155
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/trade": {
      "post": {
        "operationId": "rh_lightning",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Lightning trade",
        "description": "**Lightning trade** — We sign with the Robinhood wallet linked to your key and send everything in order.\nSame fields as Buy & sell (https://trenchy.tools/docs/rh/trade) without `wallet`. Answer: `{ hash, hashes }`. Fee: 1%.",
        "x-docs": [
          "https://trenchy.tools/docs/rh/lightning"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/send": {
      "post": {
        "operationId": "rh_send",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Send a transaction",
        "description": "**Send a transaction** — Broadcast a signed Robinhood transaction through our node.\n",
        "x-docs": [
          "https://trenchy.tools/docs/rh/send"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transaction"
                ],
                "properties": {
                  "transaction": {
                    "type": "string",
                    "description": "The signed raw transaction, `0x…`."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/rh/tx/{hash}": {
      "get": {
        "operationId": "rh_tx",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Transaction status",
        "description": "**Transaction status** — Did my transaction go through?\n",
        "x-docs": [
          "https://trenchy.tools/docs/rh/tx"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "block": 94883891,
                  "gasUsed": "113544"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/quote": {
      "get": {
        "operationId": "rh_quote",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Quote",
        "description": "**Quote** — An exact quote, simulated as your wallet.\npons charges a launch-window snipe tax that depends on **who** buys, so the quote is simulated as your wallet. Pass `wallet` for the exact number. Graduated coins are quoted on their Uniswap v4 pool by simulating the swap (`venue: \"v4\"`); pass `holder` for sells. pools.trade, circus, Sushi and pools.fun coins are quoted the same way, by simulating the real swap on their market (`launchpad` names it).\nA coin priced in a pair token answers with both units: `quoteSymbol`, `quoteIn` / `quoteOut` (pair token), `ethIn` / `ethOut` (through the route), `avgPriceQuote`, `avgPriceEth`, `route` (the legs, e.g. `[\"ETH\",\"USDG\"]`) and `routableFromEth`.",
        "x-docs": [
          "https://trenchy.tools/docs/rh/quote"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin's 0x address."
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`buy` (amount in ETH) or `sell` (amount in tokens)."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "How much."
          },
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Your address. Required for an exact sell quote (it must hold the tokens)."
          },
          {
            "name": "venue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional launchpad assertion; detected when omitted."
          },
          {
            "name": "denominatedInQuote",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Pair-token coins: `true` quotes a buy paid in the pair token (`amount` in USDG, NVDA…)."
          },
          {
            "name": "receive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pair-token sells: `quote` quotes the pair-token payout only; default `eth` adds `ethOut` through the live Uniswap V4 route."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "venue": "curve",
                  "action": "buy",
                  "ethIn": 0.01,
                  "tokensOut": 5822825.4,
                  "snipeTaxBps": 0,
                  "bondingProgressPct": 5.88
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/token/{token}": {
      "get": {
        "operationId": "rh_token",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Token info",
        "description": "**Token info** — Which launchpad a coin is on, its market, creator and state.\n`pairToken` / `quoteSymbol` say what the curve is priced in (`ETH` for most coins; `USDG`, `NVDA`… for pair-token coins), `graduationThreshold` is in that unit, and `curveState` carries `realQuote`, `graduationThresholdQuote`, `priceQuote` (the `…Eth` twins read `null` on a pair-token coin).",
        "x-docs": [
          "https://trenchy.tools/docs/rh/token"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/account": {
      "get": {
        "operationId": "rh_account",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Account (nonce & gas)",
        "description": "**Account (nonce & gas)** — Nonce, gas prices, chain id and ETH balance for one wallet: what a local signer needs\nEVM transactions are signed with a **nonce** and **gas prices** that only the chain knows. This call returns them for a wallet so your bot can sign `trade-local` transactions, plain ETH transfers and exchange deposits **without an RPC node**.",
        "x-docs": [
          "https://trenchy.tools/docs/rh/account"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Any 0x address."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0x…",
                  "chainId": 4663,
                  "nonce": 12,
                  "pendingNonce": 12,
                  "balanceEth": "0.0683",
                  "block": 95493312,
                  "gasPrice": "10000000",
                  "maxFeePerGas": "12000000",
                  "maxPriorityFeePerGas": "0",
                  "transferGas": "1600000",
                  "note": "Sign with chainId + pendingNonce (+1 per transaction you send in a row) and these fee values; a plain ETH transfer is {to, value, gas: 21000}."
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/balances": {
      "get": {
        "operationId": "rh_balances",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Balances",
        "description": "**Balances** — ETH and token balances of any wallet.\n",
        "x-docs": [
          "https://trenchy.tools/docs/rh/balances"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Any 0x address."
          },
          {
            "name": "tokens",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated token addresses."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses (≤ 100): ETH balance for many wallets in one call. Answer: `{ wallets: [{ wallet, eth }] }`."
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "With `wallets`: also that coin's balance of every wallet, in the same call. Answer: `{ token, decimals, wallets: [{ wallet, eth, token: { balance, raw } }] }`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0x…",
                  "eth": "0.0683",
                  "tokens": [
                    {
                      "token": "0x…",
                      "balance": "1889822.68"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/trades": {
      "get": {
        "operationId": "rh_trades",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Trade history",
        "description": "**Trade history** — The coin's past trades, newest first, in the live feed's shape.\nThe websocket only streams what happens after you subscribe. This call fills in what happened before: the curve's buys and sells from the launch block and, once graduated, the Uniswap v4 pool's swaps (trader = the transaction sender, as in the feed). Each entry has the same fields as a `subscribeTokenTrade` message; `ts` is interpolated between the launch block and the head.",
        "x-docs": [
          "https://trenchy.tools/docs/rh/trades"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "How many trades, newest first, 1–500 (default 100)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "curve": "0x…",
                  "launchBlock": 100768929,
                  "trades": [
                    {
                      "txType": "buy",
                      "hash": "0x…",
                      "token": "0x…",
                      "trader": "0x…",
                      "ethAmount": 0.001,
                      "tokenAmount": 5822825.4,
                      "priceEth": 1.7e-10,
                      "venue": "pons",
                      "block": 100768930,
                      "ts": 1761720000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/txs": {
      "get": {
        "operationId": "rh_txs",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Transaction statuses",
        "description": "**Transaction statuses** — The status of up to 100 transactions in one call.\nConfirming a batch of sends (a sell-all, a funding round) one `GET /api/rh/tx/:hash` per hash spends your rate limit fast. Ask for all of them at once: each entry is the same answer `/tx/:hash` gives.",
        "x-docs": [
          "https://trenchy.tools/docs/rh/txs"
        ],
        "parameters": [
          {
            "name": "hashes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x transaction hashes, 1–100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "statuses": [
                    {
                      "hash": "0x…",
                      "status": "success",
                      "block": 101234567,
                      "gasUsed": "412345"
                    },
                    {
                      "hash": "0x…",
                      "status": "pending_or_unknown"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/pnl": {
      "get": {
        "operationId": "rh_pnl",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Profit / loss",
        "description": "**Profit / loss** — The ETH profit or loss of your wallets on one coin, fees and gas included.\nReads the coin's trades (the same source as `GET /api/rh/trades`) and prices the ones your wallets made. A buy costs the ETH the transaction sent, its gas and the 0.5 % API fee; a sell brings what it paid out, minus its gas and the API fee. On Robinhood Chain the L1 data fee is part of the gas. Transfers between your wallets are not trades, so they never count. Approval gas before a wallet's first sell is left out (a few cents).",
        "x-docs": [
          "https://trenchy.tools/docs/rh/pnl"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses, 1–100."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: ignore trades before this (e.g. the launch time)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "spent": 0.2286,
                  "received": 0.5262,
                  "net": 0.2976,
                  "trades": 9,
                  "truncated": false,
                  "wallets": [
                    {
                      "wallet": "0x…",
                      "spent": 0.2211,
                      "received": 0.5244,
                      "net": 0.3033,
                      "buys": 1,
                      "sells": 3,
                      "gasEth": 0.000018
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/rh/created": {
      "get": {
        "operationId": "rh_created",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Created coin",
        "description": "**Created coin** — The coin a create transaction made, read from its receipt.\nMost launchpads let `trade-local` predict the coin's address (`predicted.token`). Where it cannot (or a CREATE launch was overtaken), ask this once the create landed: the ERC-20 minted in that transaction, the biggest mint when there are several.",
        "x-docs": [
          "https://trenchy.tools/docs/rh/created"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The 0x hash of the create transaction."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "token": "0x…",
                  "block": 56278567
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/transfer/networks": {
      "get": {
        "operationId": "wallets_networks",
        "tags": [
          "Transfers"
        ],
        "summary": "Networks",
        "description": "**Networks** — Every chain transfers support, which side each can be on, and every possible pair, live.\nSix chains. Any of them can **receive** through the exchange route; four can **send** (we build the deposit transaction from your wallet there). The same chain on both sides can always go `direct`. This endpoint answers the same table live, with the exchange's current state, and lists every possible `from → to` pair.\nAmounts are always in the sending chain's coin: SOL on `sol`, ETH on `rh`, HYPE on `hyperevm` and `elysium`.",
        "x-docs": [
          "https://trenchy.tools/docs/wallets/networks"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/transfer/routes": {
      "get": {
        "operationId": "wallets_routes",
        "tags": [
          "Transfers"
        ],
        "summary": "Quotes",
        "description": "**Quotes** — Everything available for a pair and amount right now: direct, best-rate exchange, fixed, private — with receive amount, fee, minimum and ETA.\nCall this before creating a transfer. The exchange minimum changes with the pair and the market; a create below it fails with `transfer_min_amount`.\nA same-chain pair also lists `{ \"route\": \"direct\", \"fee\": 0 }`. `exchange: \"off\"` means the server has no exchange route configured; `direct` still works. The exchange floor is a USD figure (about $12 at the time of writing): `exchangeMin` and every exchange route's `min` give it in the source token for this quote. An `amount` under the floor still answers, with the exchange routes marked `status: \"below_min\"` and `min` filled in, so you can raise the amount or fall back to `direct`.",
        "x-docs": [
          "https://trenchy.tools/docs/wallets/routes"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The sending chain: `sol`, `rh`, `hyperevm`, `elysium` (or any chain, for a quote only)."
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The destination chain: `sol`, `rh`, `eth`, `bnb`, `hyperevm`, `elysium`."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "In the source chain's native unit."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "from": "sol",
                  "to": "rh",
                  "amount": 0.5,
                  "routes": [
                    {
                      "route": "exchange",
                      "mode": "float",
                      "venue": "auto",
                      "receive": 0.02156,
                      "fee": 0.000054,
                      "networkFee": 0.00005,
                      "etaS": 40,
                      "min": 0.087,
                      "max": 200300
                    },
                    {
                      "route": "exchange",
                      "mode": "fixed",
                      "venue": "auto",
                      "receive": 0.02145,
                      "fee": 0.00255,
                      "networkFee": 0.00005,
                      "etaS": 40,
                      "min": 0.087
                    },
                    {
                      "route": "exchange",
                      "mode": "float",
                      "venue": "bybit",
                      "status": "open",
                      "receive": 0.02134,
                      "fee": 0.00505,
                      "etaS": 40,
                      "min": 0.087,
                      "note": "funds the destination from this exchange (breaks the wallet cluster); ~1 % extra"
                    },
                    {
                      "route": "exchange",
                      "mode": "float",
                      "venue": "htx",
                      "status": "closed",
                      "note": "switched off at the exchange right now"
                    },
                    {
                      "route": "exchange",
                      "mode": "private",
                      "venue": "auto",
                      "receive": 0.02134,
                      "fee": 0.00505,
                      "networkFee": 0.00005,
                      "etaS": 300,
                      "min": 0.087
                    }
                  ],
                  "venues": [
                    "auto",
                    "random",
                    "binance",
                    "bybit",
                    "kucoin",
                    "htx",
                    "mexc",
                    "bitget",
                    "gate"
                  ],
                  "chains": {
                    "sol": {
                      "source": true,
                      "destination": true
                    },
                    "rh": {
                      "source": true,
                      "destination": true
                    },
                    "eth": {
                      "source": false,
                      "destination": true
                    },
                    "bnb": {
                      "source": false,
                      "destination": true
                    }
                  },
                  "exchange": "on"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/transfer": {
      "post": {
        "operationId": "wallets_transfer",
        "tags": [
          "Transfers"
        ],
        "summary": "Create a transfer",
        "description": "**Create a transfer** — Open a transfer and get the deposit address plus the unsigned deposit transaction from your wallet.\nOne request: where from, where to, how much, which route and mode (see Wallet transfers (https://trenchy.tools/docs/wallets/overview) for what each means). The answer is a one-time deposit address and an unsigned deposit transaction from `from.wallet`; sign it, send it, then track it (https://trenchy.tools/docs/wallets/status).\nOn the EVM chains (`rh`, `hyperevm`, `elysium`) the deposit is `transaction.evm` (`{chainId, from, to, value, gas}`): sign and send it with viem like any `trade-local` transaction. Robinhood chain and Elysium fold the L1 data fee into gas, so keep the `gas` given (about 1.6 M and 200 k), never 21000. A `direct` transfer answers `200` with the same shape and no `deposit` deadline.",
        "x-docs": [
          "https://trenchy.tools/docs/wallets/transfer"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "transferId": "k9f3…",
                  "status": "awaiting_deposit",
                  "route": "exchange",
                  "mode": "float",
                  "venue": "binance",
                  "from": {
                    "chain": "sol",
                    "wallet": "…"
                  },
                  "to": {
                    "chain": "rh",
                    "address": "0x…"
                  },
                  "amount": 0.5,
                  "deposit": {
                    "chain": "sol",
                    "address": "<one-time address>",
                    "amount": 0.5,
                    "deadline": "2026-10-22T23:40:00Z"
                  },
                  "transaction": {
                    "chain": "sol",
                    "encoding": "base64",
                    "transaction": "<unsigned v0 tx: your wallet → deposit address>"
                  },
                  "poll": "/api/transfer/k9f3…"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to",
                  "amount"
                ],
                "properties": {
                  "from": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ chain, wallet }` — the wallet that will sign the deposit: `sol`, `rh`, `hyperevm` or `elysium` (see Networks (https://trenchy.tools/docs/wallets/networks))."
                  },
                  "to": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ chain, address }` — where the coins end up: `sol`, `rh`, `eth`, `bnb`, `hyperevm`, `elysium`. Validated for that chain."
                  },
                  "amount": {
                    "type": "number",
                    "description": "In the source chain's native coin (SOL on `sol`, ETH on `rh`, HYPE on `hyperevm` / `elysium`)."
                  },
                  "route": {
                    "type": "string",
                    "description": "`auto` (default: exchange when enabled), `direct` (same chain, one signed transfer), `exchange`."
                  },
                  "mode": {
                    "type": "string",
                    "description": "`float` (default, market rate, ~0.1–0.4 %), `fixed` (locked output, 0.8 %, deposit within ~15 min), `private` (privacy-coin leg, 1 %, 5+ min)."
                  },
                  "venue": {
                    "type": "string",
                    "description": "`auto` (best execution, default), `random` (an open venue rolled per transfer), or a named exchange (`bybit`, `kucoin`, `htx`, `mexc`, `bitget`, `gate`, `binance`) to force who pays the destination — the break-wallet-cluster option. Closed venues are refused (`transfer_route_off`); the answer says `venueHonoured`."
                  },
                  "refundAddress": {
                    "type": "string",
                    "description": "Where a failed order is refunded. Default: `from.wallet`."
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "transfer_list",
        "tags": [
          "Transfers"
        ],
        "summary": "Your recent transfers",
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "{transfers:[…]}"
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/transfer/batch": {
      "post": {
        "operationId": "wallets_batch",
        "tags": [
          "Transfers"
        ],
        "summary": "Many wallets",
        "description": "**Many wallets** — Fan one wallet out to many, or sweep many wallets back into one — one order and one unsigned deposit per leg.\nThe same transfer, repeated per leg, in one call. Legs are independent: a leg that fails (minimum, venue off, budget) is reported inline and the others proceed. Up to 25 legs.\nEach source gets its own order and its own unsigned deposit (signed by that wallet). `route: \"direct\"` makes every leg a plain transfer instead.",
        "x-docs": [
          "https://trenchy.tools/docs/wallets/batch"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "from": [
                    {
                      "chain": "sol",
                      "wallet": "WALLET_1",
                      "amount": 0.25
                    },
                    {
                      "chain": "sol",
                      "wallet": "WALLET_2",
                      "amount": 0.25
                    }
                  ],
                  "to": {
                    "chain": "sol",
                    "address": "TREASURY"
                  },
                  "mode": "float",
                  "venue": "auto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/transfer/{id}": {
      "get": {
        "operationId": "wallets_status",
        "tags": [
          "Transfers"
        ],
        "summary": "Track and support",
        "description": "**Track and support** — Where a transfer is, its receipt page, and what to do when one fails or stalls.\nWhen the status is terminal, or the order has not completed 30 minutes after the deposit confirmed, the answer adds `help`: what happened, what to do, our support ([t.me/trenchytools](https://t.me/trenchytools)) and the exchange route's own support (Telegram bot and email), with the exact details to include — `orderId`, `depositHash`, the deposit address, the time, the destination. The provider's name appears only here and in `receipt`.\n`GET /api/transfer` lists your last 50 transfers.",
        "x-docs": [
          "https://trenchy.tools/docs/wallets/status"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/ipfs": {
      "post": {
        "operationId": "ipfs",
        "tags": [
          "Account"
        ],
        "summary": "Upload metadata",
        "description": "**Upload metadata** — Upload a coin's image and details; get the link you need to create it.\nSend a normal file upload (multipart form). The answer works for both chains: Solana creates use `metadataUri`, Robinhood creates use `metadata.image`.",
        "x-docs": [
          "https://trenchy.tools/docs/ipfs"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "name",
                  "symbol"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PNG, JPG, GIF or WebP, up to 4 MB."
                  },
                  "name": {
                    "type": "string",
                    "description": "Coin name."
                  },
                  "symbol": {
                    "type": "string",
                    "description": "Ticker."
                  },
                  "description": {
                    "type": "string",
                    "description": ""
                  },
                  "twitter": {
                    "type": "string",
                    "description": "Full links."
                  },
                  "showName": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false"
                    ],
                    "description": "Default `\"true\"`."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ipfs/json": {
      "post": {
        "operationId": "ipfs_json",
        "tags": [
          "Account"
        ],
        "summary": "Pin a JSON document",
        "description": "**Pin a JSON document** — Pin one small JSON document as it is; get its ipfs:// link.\nFor launchpads whose metadata is not pump.fun's shape: Ascend's `ascend-metadata-1` document, Montra's token-URI document. Send the JSON as it should be pinned; nothing is added to it. Upload the image first with `POST /api/ipfs` and put its link inside the document.",
        "x-docs": [
          "https://trenchy.tools/docs/ipfs-json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "json"
                ],
                "properties": {
                  "json": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "The document to pin, up to 32 KB."
                  },
                  "name": {
                    "type": "string",
                    "description": "File name for the pin (letters, digits, `.`, `_`, `-`; `.json` is added). Default `metadata`."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ai/coin": {
      "post": {
        "operationId": "ai_coin",
        "tags": [
          "Account"
        ],
        "summary": "Generate a coin with AI",
        "description": "**Generate a coin with AI** — Name, ticker, description and logo for a meme coin, written and drawn by AI from your idea (or a surprise).\nGive it an idea in your own words (\"a frog who only buys the top\"), or nothing for a surprise. An AI writer turns it into a coin (name, ticker, one-line description) and an image model draws its logo. The logo comes back inline as a `data:` URI, so you can show it at once and upload it with `POST /api/ipfs` like a file the user picked.\nNothing is launched or pinned: you get the fields, edit them if you like, then upload and create as usual. Takes 10 to 40 seconds.",
        "x-docs": [
          "https://trenchy.tools/docs/ai-coin"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "name": "Top Frog",
                  "symbol": "TOPFROG",
                  "description": "Bought the top. Again. Calls it conviction.",
                  "image": "data:image/jpeg;base64,/9j/4AAQ…",
                  "via": {
                    "writer": "venice claude-sonnet-5-5",
                    "drawer": "fal flux-dev"
                  },
                  "left": {
                    "hour": 4,
                    "day": 9
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "idea": {
                    "type": "string",
                    "description": "Your idea, up to 200 characters. Empty = surprise me. Links and @handles are removed."
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "meme",
                      "mascot",
                      "clean"
                    ],
                    "description": "`meme` (default): a cartoon meme logo. `mascot`: one sticker-like character. `clean`: a flat two-colour logo mark with a product-like name."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "operationId": "account",
        "tags": [
          "Account"
        ],
        "summary": "Usage & key info",
        "description": "**Usage & key info** — Your key's linked wallets and the last 30 days of usage.\nRevoke a key you no longer trust with `POST /api/keys/revoke` and `{ \"apiKey\": \"…\" }`, or on Get an API key (https://trenchy.tools/docs/api-keys).",
        "x-docs": [
          "https://trenchy.tools/docs/account"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "keyPrefix": "k7Hx2Pq9",
                  "sol": {
                    "wallet": null
                  },
                  "robinhood": {
                    "wallet": null
                  },
                  "usage30d": [
                    {
                      "chain": "sol",
                      "endpoint": "trade-local",
                      "action": "buy",
                      "n": 42,
                      "volume": 3.1,
                      "fees": 0.0155
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/trade-local": {
      "post": {
        "operationId": "bnb_trade",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Buy and sell",
        "description": "**Buy and sell** — Buy or sell any four.meme, Flap or PancakeSwap V2 coin; the market is detected from the token.\nReturns the transactions your wallet needs, in order, **unsigned**: `[approve?] buy|sell [fee]`. The market is detected in one call: a four.meme curve (its PancakeSwap pair after graduation), a Flap curve (the Portal keeps routing it after graduation), or any WBNB pair on PancakeSwap V2. Every buy and sell carries a min-out from an exact quote and your `slippage`.\n\n**Create a token** — Launch on four.meme (…ffff tax token) or Flap (…7777 tax token) with the dev buy in the same transaction.\n**four.meme** signs the create server-side: creating is half off-chain, so the API logs your wallet in with your signature of their login message, uploads the logo to four.meme, asks for the signed `createArg` and hands you `createToken(createArg, signature)` with the dev buy as `msg.value` (exact). The token is a Token9 clone ending in `…ffff` when `tax.enabled` (default): the recipient share of the buy / sell tax is pushed to you as BNB on every trade — four.meme's only creator revenue. `tax.enabled: false` makes a plain `…4444` token with no revenue.\n**Flap** is fully on-chain: the metadata is pinned through Flap's own upload (their indexer reads only that), a salt is mined so the clone ends in `…7777`, and `newTokenV6` deploys the tax token with the dev buy as `msg.value`. The address is exact before you sign. The tax (1–10 % a side, immutable) accrues on the token's TaxProcessor and is pushed to the beneficiary as BNB by `dispatch()` — see creator fees (https://trenchy.tools/docs/bnb/creator-fees).",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/trade",
          "https://trenchy.tools/docs/bnb/create"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet",
                  "action",
                  "token",
                  "amount"
                ],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "Your 0x address."
                  },
                  "action": {
                    "type": "string",
                    "description": "`buy` or `sell`."
                  },
                  "token": {
                    "type": "string",
                    "description": "The coin's 0x address."
                  },
                  "amount": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "description": "Buys: BNB. Sells: tokens, or a share of your balance like `\"100%\"`."
                  },
                  "slippage": {
                    "type": "number",
                    "description": "Percent. Default 5."
                  },
                  "venue": {
                    "type": "string",
                    "description": "Optional assertion: `four-meme`, `flap` or `pancake` (`409 wrong_venue` if the chain disagrees)."
                  },
                  "tokenMetadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ name, symbol, image, description?, twitter?, telegram?, website? }`."
                  },
                  "fourMemeSignature": {
                    "type": "string",
                    "description": "four.meme: your wallet's signature of the message from `/fourmeme/login` (kept 20 minutes per wallet)."
                  },
                  "fourMeme": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "four.meme: `{ createArg, signature }` already signed by four.meme (from their site or API) skips the login; or `{ signature }` as above."
                  },
                  "tax": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "four.meme: `{ enabled, feeRatePct, feeRateSellPct, recipientRate, divideRate, burnRate, liquidityRate, minSharing }` (default 1 % / 1 %, 100 % to you). Flap: `{ buyTaxBps, sellTaxBps, taxDurationSec, antiFarmerSec }` (default 500 / 500 bps for a year)."
                  },
                  "taxRecipient": {
                    "type": "string",
                    "description": "four.meme: where the recipient share of the tax lands (default: your wallet)."
                  },
                  "beneficiary": {
                    "type": "string",
                    "description": "Flap: who receives the tax (default: your wallet)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/bnb/venues": {
      "get": {
        "operationId": "bnb_venues",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Launchpads",
        "description": "**Launchpads** — four.meme, Flap and PancakeSwap V2 behind one API, with each pad's rules and defaults.\n",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/venues"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/creator-fees": {
      "get": {
        "operationId": "bnb_creator_fees",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Creator fees",
        "description": "**Creator fees** — Flap: pending tax on the processor and the dispatch; four.meme: pushed automatically.\nFlap tax tokens accrue their tax on a TaxProcessor; anyone may call `dispatch()` and the beneficiary receives the BNB. four.meme tax tokens push the recipient share on every trade, so there is nothing to collect.\nClaim with /api/bnb/trade-local (https://trenchy.tools/docs/bnb/trade) and `action: \"collectCreatorFee\"` + `token`: the answer is one `collect` transaction (`dispatch()`), sendable by any wallet with gas.",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/creator-fees"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "launchpad": "flap",
                  "token": "0x…7777",
                  "processor": "0x…",
                  "beneficiary": "0x…",
                  "pendingBnb": 0.42,
                  "paidBnb": 3.1,
                  "note": "action \"collectCreatorFee\" builds dispatch(); anyone may send it, the beneficiary receives the BNB"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/quote": {
      "get": {
        "operationId": "bnb_quote",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Quote",
        "description": "**Quote** — Exact price for a buy or sell on the coin's market.\nfour.meme curves are priced with the curve's own math (fee and tax included; the on-chain helper ignores the tax). Flap asks the Portal's quoter as your wallet. PancakeSwap uses `getAmountsOut` minus the token's tax.",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/quote"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`buy` (amount in BNB) or `sell` (amount in tokens)."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "How much."
          },
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Your address (Flap quotes are per origin)."
          },
          {
            "name": "venue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional assertion."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "launchpad": "four-meme",
                  "venue": "four-meme",
                  "action": "buy",
                  "bnbIn": 0.05,
                  "tokensOut": 10517097.3,
                  "avgPriceBnb": 4.75e-9
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/token/{token}": {
      "get": {
        "operationId": "bnb_token",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Token info",
        "description": "**Token info** — Which launchpad a coin is on, its market and curve state.\n",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/token"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…ffff",
                  "name": "…",
                  "symbol": "…",
                  "decimals": 18,
                  "launchpad": "four-meme",
                  "venue": "four-meme-curve",
                  "graduated": false,
                  "bondingProgressPct": 3.2,
                  "priceBnb": 4.7e-9,
                  "raisedBnb": 0.58,
                  "raiseBnb": 18,
                  "taxToken": true,
                  "taxBuyPct": 1,
                  "taxSellPct": 1,
                  "founder": "0x…",
                  "pair": null
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/send": {
      "post": {
        "operationId": "bnb_send",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Send a transaction",
        "description": "**Send a transaction** — Broadcast a signed raw transaction on BNB Smart Chain.\nOr run the list on a copy of the chain first: `POST /api/bnb/simulate { transactions }` (the same list `trade-local` returned) answers `{ ok, steps[] }`.",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/send"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transaction"
                ],
                "properties": {
                  "transaction": {
                    "type": "string",
                    "description": "The signed raw transaction, 0x-hex."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/bnb/simulate": {
      "post": {
        "operationId": "bnb_simulate",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Simulate",
        "description": "**Simulate** — Run the transaction list in order on a copy of the chain before sending.\n",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/simulate"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "ok": true,
                  "steps": [
                    {
                      "label": "approve",
                      "ok": true,
                      "gasUsed": "49375"
                    },
                    {
                      "label": "sell",
                      "ok": true,
                      "gasUsed": "246609"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transactions"
                ],
                "properties": {
                  "transactions": {
                    "type": "string",
                    "description": "The list from `trade-local` (1–6); the fee transfer is skipped."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/bnb/tx/{hash}": {
      "get": {
        "operationId": "bnb_tx",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Transaction status",
        "description": "**Transaction status** — Receipt status of a BNB Chain transaction.\n",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/tx"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "block": 61234567,
                  "gasUsed": "273287"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/account": {
      "get": {
        "operationId": "bnb_account",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Account",
        "description": "**Account** — Nonce, gas price and balance for a local signer.\n",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/account"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your 0x address."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0x…",
                  "chainId": 56,
                  "nonce": 12,
                  "pendingNonce": 12,
                  "balanceBnb": "0.41",
                  "gasPrice": "50000000",
                  "transferGas": "21000"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/balances": {
      "get": {
        "operationId": "bnb_balances",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Balances",
        "description": "**Balances** — BNB and token balances of one wallet, or BNB of many.\n",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/balances"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "One wallet; add `tokens=a,b` (≤ 50) for token balances."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Up to 100 wallets, comma-separated: BNB for each."
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "With `wallets`: also that coin's balance of every wallet. Answer: `{ token, decimals, wallets: [{ wallet, native, eth, token: { balance, raw } }] }`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/fourmeme/login": {
      "post": {
        "operationId": "bnb_fourmeme_login",
        "tags": [
          "BNB Chain"
        ],
        "summary": "four.meme login",
        "description": "**four.meme login** — The message your wallet signs so four.meme will sign your create.\nfour.meme signs every create server-side after a wallet login. This returns the login message for your wallet; sign it (EIP-191 `personal_sign`) and pass the signature as `fourMemeSignature` on the create. The access token the login yields is kept 20 minutes per wallet, so one signature covers several creates. The API never sees your key.",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/fourmeme-login"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0x…",
                  "nonce": "…",
                  "message": "You are sign in Meme …",
                  "note": "EIP-191 personal_sign of `message` …"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet"
                ],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "The creator wallet."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/bnb/txs": {
      "get": {
        "operationId": "bnb_txs",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Transaction statuses",
        "description": "**Transaction statuses** — The status of up to 100 transactions in one call.\nConfirming a batch of sends one `GET /tx/:hash` per hash spends your rate limit fast: ask for all of them at once. Each entry is the answer `/tx/:hash` gives.",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/txs"
        ],
        "parameters": [
          {
            "name": "hashes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x transaction hashes, 1–100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "statuses": [
                    {
                      "hash": "0x…",
                      "status": "success",
                      "block": 1234567,
                      "gasUsed": "412345"
                    },
                    {
                      "hash": "0x…",
                      "status": "pending_or_unknown"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/trades": {
      "get": {
        "operationId": "bnb_trades",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Trade history",
        "description": "**Trade history** — The coin's past trades, newest first, in the live feed's shape.\nRead from the coin's ERC-20 Transfer logs, so every launchpad and pool is covered: one transaction is one trade by its sender. A buy's `ethAmount` is what it sent in BNB (or the wrapped coin); a sell's is the seller's BNB balance change in that block plus the gas. Poll it for a live tape: pass `fromBlock` = the last `head` + 1 and only new trades come back.",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/trades"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "How many trades, newest first, 1–500 (default 100)."
          },
          {
            "name": "fromBlock",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Only blocks from this one on (a poll: the previous answer's `head` + 1)."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: only trades after this."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "head": 133071161,
                  "windows": 1,
                  "trades": [
                    {
                      "txType": "buy",
                      "hash": "0x…",
                      "token": "0x…",
                      "trader": "0x…",
                      "tokenAmount": 1415205,
                      "ethAmount": 0.1,
                      "priceEth": 7.07e-8,
                      "venue": "bnb",
                      "block": 133071160,
                      "ts": 1762900000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/pnl": {
      "get": {
        "operationId": "bnb_pnl",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Profit / loss",
        "description": "**Profit / loss** — The BNB profit or loss of your wallets on one coin, gas and fees included.\nFrom the coin's trades (the same source as `GET /api/bnb/trades`): a buy costs what it sent + its gas + the 0.5 % API fee; a sell brings its block's BNB balance change (the gas and, when it landed in the same block, the fee transfer are already in it). Transfers between your wallets are not trades and never count.",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/pnl"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses, 1–100."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: ignore trades before this (e.g. the launch time)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "spent": 0.151,
                  "received": 0.067,
                  "net": -0.084,
                  "trades": 5,
                  "truncated": false,
                  "wallets": [
                    {
                      "wallet": "0x…",
                      "spent": 0.151,
                      "received": 0.067,
                      "net": -0.084,
                      "buys": 2,
                      "sells": 3,
                      "gasEth": 0.00004
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/bnb/created": {
      "get": {
        "operationId": "bnb_created",
        "tags": [
          "BNB Chain"
        ],
        "summary": "Created coin",
        "description": "**Created coin** — The coin a create transaction made, read from its receipt.\nMost launchpads let `trade-local` predict the coin's address (`predicted.token`). Where it cannot (or a CREATE launch was overtaken), ask this once the create landed: the ERC-20 minted in that transaction, the biggest mint when there are several.",
        "x-docs": [
          "https://trenchy.tools/docs/bnb/created"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The 0x hash of the create transaction."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "token": "0x…",
                  "block": 56278567
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/trade-local": {
      "post": {
        "operationId": "eth_trade",
        "tags": [
          "Ethereum"
        ],
        "summary": "Buy and sell",
        "description": "**Buy and sell** — Buy or sell any Sender or Stockereum coin; the launchpad is detected from the token.\nReturns the transactions your wallet needs, in order, **unsigned**: `[approve?] [approve?] buy|sell [fee]`. The launchpad is detected in one call (the Sender factory's launch record, the Stockereum hook's record under every known quote, and the token's own `factory()` pointer). Every buy and sell carries a min-out from an exact quote and your `slippage`.\n**Sender** coins trade on a Uniswap V4 pool against native ETH (1 % fee) through the UniversalRouter. A sell needs the router to pull your tokens through **Permit2**: the first time, the answer carries two `approve` steps (ERC-20 → Permit2, then Permit2 → router); later sells skip them. For the first three blocks after a launch the **LaunchGuard** hook caps each buy and each wallet; a buy inside that window is cut to fit and the answer says so under `guard`. Only ETH-paired Sender coins are routed (`409 unsupported_quote` otherwise).\n\n**Create a token** — Launch on Sender (default) or Stockereum with the dev buy in the same transaction.\n**Sender** (`launchWith`, launch fee 0.002 ETH + the dev buy as `msg.value`): the whole 1 B supply becomes one locked Uniswap V4 position; the dev buy is swapped for you inside the launch, in the block where the guard admits only the creator. The token is a clone whose salt hashes the launch count, so `predicted.token` is a preview that moves if someone else launches first. The metadata is a JSON we pin for you (`metadataUri` in the answer).\n**Stockereum** (`createLaunch` / `createLaunchAndBuy`, creation fee 0.001 ETH): every launch opens at a fixed USD valuation, so the factory wants the quote's USD price **signed by Stockereum**. The API fetches that signature last; it is valid about ten minutes (`priceDeadline`), after which the transaction reverts with `PriceExpired` — ask again. The metadata is written on-chain as JSON (nothing to host); `predicted.token` is exact for the simulated state.",
        "x-docs": [
          "https://trenchy.tools/docs/eth/trade",
          "https://trenchy.tools/docs/eth/create"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet",
                  "action",
                  "token",
                  "amount"
                ],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "Your 0x address."
                  },
                  "action": {
                    "type": "string",
                    "description": "`buy` or `sell`."
                  },
                  "token": {
                    "type": "string",
                    "description": "The coin's 0x address."
                  },
                  "amount": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "description": "Buys: ETH. Sells: tokens, or a share of your balance like `\"100%\"`."
                  },
                  "slippage": {
                    "type": "number",
                    "description": "Percent. Default 5."
                  },
                  "venue": {
                    "type": "string",
                    "description": "Optional assertion: `sender` or `stockereum` (`409 wrong_venue` if the chain disagrees)."
                  },
                  "quote": {
                    "type": "string",
                    "description": "Stockereum only: the quote asset the coin is paired with (symbol or 0x address), when the API answers `409 unknown_quote`."
                  },
                  "tokenMetadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ name, symbol, image, description?, twitter?, telegram?, website? }`."
                  },
                  "feePpm": {
                    "type": "number",
                    "description": "Stockereum: the pool's fee in parts per million, `10000` (1 %, default), `20000` or `30000`. Fixed at launch, paid in the quote asset."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/eth/venues": {
      "get": {
        "operationId": "eth_venues",
        "tags": [
          "Ethereum"
        ],
        "summary": "Launchpads",
        "description": "**Launchpads** — Sender and Stockereum behind one API, with each pad's rules, quotes and defaults.\n",
        "x-docs": [
          "https://trenchy.tools/docs/eth/venues"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/creator-fees": {
      "get": {
        "operationId": "eth_creator_fees",
        "tags": [
          "Ethereum"
        ],
        "summary": "Creator fees",
        "description": "**Creator fees** — What a coin's creator can claim, and the claim transaction.\n**Sender** keeps the launch's whole liquidity as one locked position in its LiquidityLocker; 70 % of the 1 % pool fee (both the ETH and the token side) belongs to the creator. The answer harvests the position in simulation, so `claimableEth` is what a claim pays **now**. **Stockereum** credits the creator's share of the hook fee to a FeeEscrow, per creator and per quote asset: one claim pays every coin of that creator paired with that quote.\nClaim with /api/eth/trade-local (https://trenchy.tools/docs/eth/trade) and `action: \"collectCreatorFee\"` + `token` from the creator wallet: Sender answers one `collect` (`collectAndClaim`); Stockereum answers `claim` and, for WETH, an `unwrap` to ETH. Another wallet gets `409 not_creator`; nothing owed gets `409 nothing_to_collect`.",
        "x-docs": [
          "https://trenchy.tools/docs/eth/creator-fees"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "quote",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Stockereum, when the API cannot resolve the pair."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "launchpad": "sender",
                  "token": "0x…",
                  "creator": "0x…",
                  "positionId": "473464",
                  "claimableEth": 0.00329,
                  "claimableTokens": 906940.77,
                  "note": "action \"collectCreatorFee\" builds collectAndClaim on the locker (creator only)"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/quote": {
      "get": {
        "operationId": "eth_quote",
        "tags": [
          "Ethereum"
        ],
        "summary": "Quote",
        "description": "**Quote** — Exact price for a buy or sell on the coin's pool.\nSender quotes come from the Uniswap V4 Quoter on the coin's pool (the guard hook runs, so a capped buy may be refused). Stockereum quotes come from its LaunchRouter, including the ETH → quote leg for non-WETH pairs and the current hook fee.",
        "x-docs": [
          "https://trenchy.tools/docs/eth/quote"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`buy` (amount in ETH) or `sell` (amount in tokens)."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "How much."
          },
          {
            "name": "venue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional assertion."
          },
          {
            "name": "quote",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Stockereum, when the API cannot resolve the pair."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "launchpad": "stockereum",
                  "venue": "stockereum",
                  "action": "buy",
                  "ethIn": 0.05,
                  "tokensOut": 28047243.9,
                  "avgPriceEth": 1.78e-9
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/token/{token}": {
      "get": {
        "operationId": "eth_token",
        "tags": [
          "Ethereum"
        ],
        "summary": "Token info",
        "description": "**Token info** — Which launchpad a coin is on, its pool, creator, guard or fee state.\n",
        "x-docs": [
          "https://trenchy.tools/docs/eth/token"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "name": "…",
                  "symbol": "…",
                  "decimals": 18,
                  "launchpad": "sender",
                  "venue": "uniswap-v4",
                  "poolId": "0x…",
                  "poolFee": 10000,
                  "tickSpacing": 200,
                  "hooks": "LaunchGuardHook",
                  "creator": "0x…",
                  "positionId": "473464",
                  "createdAt": 1792420427,
                  "quote": "0x0000…0000",
                  "ethPair": true,
                  "guard": {
                    "active": false,
                    "launchBlock": 26227247,
                    "capsLiftAtBlock": 26227250,
                    "buyCapTokens": 55000000,
                    "maxHoldTokens": 50000000
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/send": {
      "post": {
        "operationId": "eth_send",
        "tags": [
          "Ethereum"
        ],
        "summary": "Send a transaction",
        "description": "**Send a transaction** — Broadcast a signed raw transaction on Ethereum mainnet.\nOr run the list on a copy of the chain first: `POST /api/eth/simulate { transactions }` (the same list `trade-local` returned) answers `{ ok, steps[] }`.",
        "x-docs": [
          "https://trenchy.tools/docs/eth/send"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transaction"
                ],
                "properties": {
                  "transaction": {
                    "type": "string",
                    "description": "The signed raw transaction, 0x-hex."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/eth/simulate": {
      "post": {
        "operationId": "eth_simulate",
        "tags": [
          "Ethereum"
        ],
        "summary": "Simulate",
        "description": "**Simulate** — Run the transaction list in order on a copy of the chain before sending.\nA wallet that cannot pay for the batch answers `{ \"ok\": false, \"code\": \"insufficient_funds\", \"error\": \"…\" }` rather than an error status: the simulation runs with the wallet's real balance.",
        "x-docs": [
          "https://trenchy.tools/docs/eth/simulate"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "ok": true,
                  "steps": [
                    {
                      "label": "approve",
                      "ok": true,
                      "gasUsed": "46291"
                    },
                    {
                      "label": "sell",
                      "ok": true,
                      "gasUsed": "181072"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transactions"
                ],
                "properties": {
                  "transactions": {
                    "type": "string",
                    "description": "The list from `trade-local` (1–6); the fee transfer is skipped."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/eth/tx/{hash}": {
      "get": {
        "operationId": "eth_tx",
        "tags": [
          "Ethereum"
        ],
        "summary": "Transaction status",
        "description": "**Transaction status** — Receipt status of an Ethereum transaction.\n",
        "x-docs": [
          "https://trenchy.tools/docs/eth/tx"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "block": 26298308,
                  "gasUsed": "175048"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/account": {
      "get": {
        "operationId": "eth_account",
        "tags": [
          "Ethereum"
        ],
        "summary": "Account",
        "description": "**Account** — Nonce, EIP-1559 fees and balance for a local signer.\n",
        "x-docs": [
          "https://trenchy.tools/docs/eth/account"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your 0x address."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0x…",
                  "chainId": 1,
                  "nonce": 12,
                  "pendingNonce": 12,
                  "balanceEth": "0.41",
                  "block": 26298308,
                  "gasPrice": "812345678",
                  "maxFeePerGas": "1624691356",
                  "maxPriorityFeePerGas": "100000000",
                  "transferGas": "21000"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/balances": {
      "get": {
        "operationId": "eth_balances",
        "tags": [
          "Ethereum"
        ],
        "summary": "Balances",
        "description": "**Balances** — ETH and token balances of one wallet, or ETH of many.\n",
        "x-docs": [
          "https://trenchy.tools/docs/eth/balances"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "One wallet; add `tokens=a,b` (≤ 50) for token balances."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Up to 100 wallets, comma-separated: ETH for each."
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "With `wallets`: also that coin's balance of every wallet."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/txs": {
      "get": {
        "operationId": "eth_txs",
        "tags": [
          "Ethereum"
        ],
        "summary": "Transaction statuses",
        "description": "**Transaction statuses** — The status of up to 100 transactions in one call.\n",
        "x-docs": [
          "https://trenchy.tools/docs/eth/txs"
        ],
        "parameters": [
          {
            "name": "hashes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x transaction hashes, 1–100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "statuses": [
                    {
                      "hash": "0x…",
                      "status": "success",
                      "block": 1234567,
                      "gasUsed": "412345"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/trades": {
      "get": {
        "operationId": "eth_trades",
        "tags": [
          "Ethereum"
        ],
        "summary": "Trade history",
        "description": "**Trade history** — The coin's past trades, newest first, in the live feed's shape.\nRead from the coin's ERC-20 Transfer logs, so every launchpad and pool is covered. `ethAmount` is in ETH. Poll with `fromBlock` = the last `head` + 1 for a live tape.",
        "x-docs": [
          "https://trenchy.tools/docs/eth/trades"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "1–500 (default 100)."
          },
          {
            "name": "fromBlock",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Only blocks from this one on."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/pnl": {
      "get": {
        "operationId": "eth_pnl",
        "tags": [
          "Ethereum"
        ],
        "summary": "Profit / loss",
        "description": "**Profit / loss** — The ETH profit or loss of your wallets on one coin, gas and fees included.\n",
        "x-docs": [
          "https://trenchy.tools/docs/eth/pnl"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses, 1–100."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: ignore trades before this."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/eth/created": {
      "get": {
        "operationId": "eth_created",
        "tags": [
          "Ethereum"
        ],
        "summary": "Created coin",
        "description": "**Created coin** — The coin a create transaction made, read from its receipt.\nMost launchpads let `trade-local` predict the coin's address (`predicted.token`). Where it cannot (or a CREATE launch was overtaken), ask this once the create landed: the ERC-20 minted in that transaction, the biggest mint when there are several.",
        "x-docs": [
          "https://trenchy.tools/docs/eth/created"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The 0x hash of the create transaction."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "token": "0x…",
                  "block": 56278567
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/trade-local": {
      "post": {
        "operationId": "arc_trade",
        "tags": [
          "Arc"
        ],
        "summary": "Buy and sell",
        "description": "**Buy and sell** — Buy or sell any Tolly, Argus or pools.trade coin, or any USDC pool on Uniswap V3; the market is detected from the token.\nReturns the transactions your wallet needs, in order, **unsigned**: `[approve?] [approve?] buy|sell [fee]`. The market is detected in one call (the Argus portals, Tolly's pad, the pools.trade pool slot and the Uniswap V3 factory). Every buy and sell carries a min-out from an exact quote and your `slippage`.\n\n**Create a token** — Launch on Tolly (default), Argus or pools.trade with the dev buy in the same transaction.\n",
        "x-docs": [
          "https://trenchy.tools/docs/arc/trade",
          "https://trenchy.tools/docs/arc/create"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet",
                  "action",
                  "token",
                  "amount"
                ],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "Your 0x address."
                  },
                  "action": {
                    "type": "string",
                    "description": "`buy` or `sell`."
                  },
                  "token": {
                    "type": "string",
                    "description": "The coin's 0x address."
                  },
                  "amount": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "description": "Buys: USDC. Sells: tokens, or a share of your balance like `\"100%\"`."
                  },
                  "slippage": {
                    "type": "number",
                    "description": "Percent. Default 5."
                  },
                  "venue": {
                    "type": "string",
                    "description": "Optional assertion: `tolly`, `argus` or `pools-trade` (`409 wrong_venue` if the chain disagrees)."
                  },
                  "tokenMetadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ name, symbol, image, description?, twitter?, telegram?, website? }` (links as https:// or ipfs://)."
                  },
                  "buyTaxBps / sellTaxBps": {
                    "type": "number",
                    "description": "Argus: the coin's tax, default 100 / 100 (1 %); one side must be above 0; ≤ 2000."
                  },
                  "startFdvUsd / bondFdvUsd": {
                    "type": "number",
                    "description": "Argus: opening and bonding FDV in USD, default 2,500 / 45,000."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/arc/venues": {
      "get": {
        "operationId": "arc_venues",
        "tags": [
          "Arc"
        ],
        "summary": "Launchpads",
        "description": "**Launchpads** — The three Arc launchpads behind one API, with each pad's rules, fees, caps and creator-revenue path.\nDefault `tolly`. Activity in the eight days to 2026-10-29: Argus ≈ 117 launches, Tolly 4, pools.trade 3. The answer also lists `retired` venues (`arcpad`, `warp`, `sharc`: dormant, sites gone) that `create` refuses with `410 venue_retired`.",
        "x-docs": [
          "https://trenchy.tools/docs/arc/venues"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/creator-fees": {
      "get": {
        "operationId": "arc_creator_fees",
        "tags": [
          "Arc"
        ],
        "summary": "Creator fees",
        "description": "**Creator fees** — What a Tolly, Argus or pools.trade creator can claim, and the claim transactions.\n**Tolly** keeps the LP NFT in its fee locker: `collect(lpId)` harvests (anyone may call it; Tolly's keeper does), `claim(USDC)` pays the creator 64 % of the USDC-side fees. **Argus** credits the creator's share of the buy / sell tax on the launch's splitter: `distribute()` cranks the split, `claim(account)` pays the creator whoever sends it. **pools.trade** mints the creator a beneficiary NFT: `collectFees([id])` sweeps into the vault, `claim(id, 0, 0)` pays the NFT owner — pass `tokenId`, or `launchTx` + `wallet` and the API reads the id from the receipt. A plain V3 pool (`launchpad: null`) has no creator-fee path the API knows.\nClaim with /api/arc/trade-local (https://trenchy.tools/docs/arc/trade) and `action: \"collectCreatorFee\"` + `token` (or `tokenId` / `launchTx` for pools.trade): the answer is `collect` then `claim` when a harvest would succeed, `claim` alone otherwise. `409 nothing_to_collect` when nothing is owed; Tolly and pools.trade claims are creator / NFT-owner only (`409 not_creator`).",
        "x-docs": [
          "https://trenchy.tools/docs/arc/creator-fees"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The coin (Tolly / Argus)."
          },
          {
            "name": "tokenId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "pools.trade: the beneficiary NFT id."
          },
          {
            "name": "launchTx",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "pools.trade: the launch transaction hash (with `wallet`, the creator)."
          },
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "With `launchTx`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "launchpad": "argus",
                  "token": "0x…",
                  "creator": "0x…",
                  "splitter": "0x…",
                  "claimableUsdc": 9.14,
                  "claimableTokens": 0,
                  "distributeOk": true,
                  "note": "distribute() turns collected fees into a credit …"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/quote": {
      "get": {
        "operationId": "arc_quote",
        "tags": [
          "Arc"
        ],
        "summary": "Quote",
        "description": "**Quote** — Exact price for a buy or sell on the coin's market, in USDC.\n",
        "x-docs": [
          "https://trenchy.tools/docs/arc/quote"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`buy` (amount in USDC) or `sell` (amount in tokens)."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "How much."
          },
          {
            "name": "venue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional assertion."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "launchpad": "tolly",
                  "venue": "arc-v3",
                  "action": "buy",
                  "usdcIn": 5,
                  "tokensOut": 990708.9,
                  "avgPriceUsdc": 0.00000504
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/token/{token}": {
      "get": {
        "operationId": "arc_token",
        "tags": [
          "Arc"
        ],
        "summary": "Token info",
        "description": "**Token info** — Which launchpad and market a coin is on, its pool and creator.\n`launchpad: null` with `market: \"arc-v3\"` is a Uniswap V3 pool against USDC the API cannot attribute (a hand-opened pair, or a coin from a retired pad): it trades, creator fees are unknown.",
        "x-docs": [
          "https://trenchy.tools/docs/arc/token"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "name": "…",
                  "symbol": "…",
                  "decimals": 18,
                  "launchpad": "argus",
                  "venue": "uniswap-v4",
                  "market": "argus-v4",
                  "poolId": "0x…",
                  "poolFee": 10000,
                  "tickSpacing": 200,
                  "hooks": "0x…2044",
                  "portal": "0xB021…97Da",
                  "creator": "0x…",
                  "splitter": "0x…",
                  "positionId": "313661",
                  "quote": "0x3600…0000",
                  "quoteDecimals": 6,
                  "tokenIsCurrency0": false,
                  "buyTaxPct": 1,
                  "sellTaxPct": 1,
                  "snipeTaxPct": 0
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/send": {
      "post": {
        "operationId": "arc_send",
        "tags": [
          "Arc"
        ],
        "summary": "Send a transaction",
        "description": "**Send a transaction** — Broadcast a signed raw transaction on Arc.\n",
        "x-docs": [
          "https://trenchy.tools/docs/arc/send"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transaction"
                ],
                "properties": {
                  "transaction": {
                    "type": "string",
                    "description": "The signed raw transaction, 0x-hex."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/arc/simulate": {
      "post": {
        "operationId": "arc_simulate",
        "tags": [
          "Arc"
        ],
        "summary": "Simulate",
        "description": "**Simulate** — Run the transaction list in order on a copy of Arc before sending.\n",
        "x-docs": [
          "https://trenchy.tools/docs/arc/simulate"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "ok": true,
                  "steps": [
                    {
                      "label": "approve",
                      "ok": true,
                      "gasUsed": "55786"
                    },
                    {
                      "label": "buy",
                      "ok": true,
                      "gasUsed": "149468"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transactions"
                ],
                "properties": {
                  "transactions": {
                    "type": "string",
                    "description": "The list from `trade-local` (1–6); the fee transfer is skipped."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/arc/tx/{hash}": {
      "get": {
        "operationId": "arc_tx",
        "tags": [
          "Arc"
        ],
        "summary": "Transaction status",
        "description": "**Transaction status** — Receipt status of an Arc transaction.\nArc has no public mempool: `pending_or_unknown` ten seconds after a send usually means the transaction was never accepted (priced under the floor, or a bad nonce).",
        "x-docs": [
          "https://trenchy.tools/docs/arc/tx"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "block": 28478142,
                  "gasUsed": "149468"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/account": {
      "get": {
        "operationId": "arc_account",
        "tags": [
          "Arc"
        ],
        "summary": "Account",
        "description": "**Account** — Nonce, the floor-clamped fee suggestion and the USDC balance for a local signer.\n",
        "x-docs": [
          "https://trenchy.tools/docs/arc/account"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your 0x address."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0x…",
                  "chainId": 5042,
                  "nonce": 3,
                  "pendingNonce": 3,
                  "balanceUsdc": "12.5",
                  "block": 28478142,
                  "gasPrice": "25000000000",
                  "maxFeePerGas": "29000000000",
                  "maxPriorityFeePerGas": "1000000000",
                  "minGasPrice": "20000000000",
                  "transferGas": "21000",
                  "note": "a transaction priced under the 20 gwei floor is dropped silently …"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/balances": {
      "get": {
        "operationId": "arc_balances",
        "tags": [
          "Arc"
        ],
        "summary": "Balances",
        "description": "**Balances** — USDC and token balances of one wallet, or USDC of many.\n`usdc` is the native balance. The `0x3600…0000` ERC-20 face is the same pot with 6 decimals: never add the two.",
        "x-docs": [
          "https://trenchy.tools/docs/arc/balances"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "One wallet; add `tokens=a,b` (≤ 50) for token balances."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Up to 100 wallets, comma-separated: USDC for each."
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "With `wallets`: also that coin's balance of every wallet."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/txs": {
      "get": {
        "operationId": "arc_txs",
        "tags": [
          "Arc"
        ],
        "summary": "Transaction statuses",
        "description": "**Transaction statuses** — The status of up to 100 transactions in one call.\n",
        "x-docs": [
          "https://trenchy.tools/docs/arc/txs"
        ],
        "parameters": [
          {
            "name": "hashes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x transaction hashes, 1–100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "statuses": [
                    {
                      "hash": "0x…",
                      "status": "success",
                      "block": 1234567,
                      "gasUsed": "412345"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/trades": {
      "get": {
        "operationId": "arc_trades",
        "tags": [
          "Arc"
        ],
        "summary": "Trade history",
        "description": "**Trade history** — The coin's past trades, newest first, in the live feed's shape.\nRead from the coin's ERC-20 Transfer logs, so every launchpad and pool is covered. `ethAmount` is in USDC. Poll with `fromBlock` = the last `head` + 1 for a live tape.",
        "x-docs": [
          "https://trenchy.tools/docs/arc/trades"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "1–500 (default 100)."
          },
          {
            "name": "fromBlock",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Only blocks from this one on."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/pnl": {
      "get": {
        "operationId": "arc_pnl",
        "tags": [
          "Arc"
        ],
        "summary": "Profit / loss",
        "description": "**Profit / loss** — The USDC profit or loss of your wallets on one coin, gas and fees included.\n",
        "x-docs": [
          "https://trenchy.tools/docs/arc/pnl"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses, 1–100."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: ignore trades before this."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/arc/created": {
      "get": {
        "operationId": "arc_created",
        "tags": [
          "Arc"
        ],
        "summary": "Created coin",
        "description": "**Created coin** — The coin a create transaction made, read from its receipt.\nMost launchpads let `trade-local` predict the coin's address (`predicted.token`). Where it cannot (or a CREATE launch was overtaken), ask this once the create landed: the ERC-20 minted in that transaction, the biggest mint when there are several.",
        "x-docs": [
          "https://trenchy.tools/docs/arc/created"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The 0x hash of the create transaction."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "token": "0x…",
                  "block": 56278567
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/create": {
      "post": {
        "operationId": "elysium_create",
        "tags": [
          "Elysium"
        ],
        "summary": "Create a token",
        "description": "**Create a token** — Launch on Ascend with the dev buy in the same transaction (wrap + approve first). EXPERIMENTAL.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/create"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "Your 0x address (the creator)."
                  },
                  "tokenMetadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ name, symbol, image, description?, twitter?, telegram?, website? }`. `image` is an https:// or ipfs:// link — POST /api/ipfs returns one."
                  },
                  "amount": {
                    "type": "number",
                    "description": "Dev buy in HYPE, pulled as WHYPE inside the launch (wrap + approve are prepended). 0 = no buy."
                  },
                  "feePercent": {
                    "type": "number",
                    "description": "Launch fee 1–10 (default 1). Above 1 %, the excess is the creator's and claimable as it accrues; at 1 % the cut is held until graduation."
                  },
                  "feePpm": {
                    "type": "number",
                    "description": "The fee in hundredths of a bip (10000–100000) if you prefer it to feePercent."
                  },
                  "metadataUri": {
                    "type": "string",
                    "description": "An ipfs:// metadata CID to append to the calldata (Ascend's art is pinned through a Turnstile-gated API, so this is best-effort; attach art on the Ascend site with the launch key for certainty)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/elysium/trade-local": {
      "post": {
        "operationId": "elysium_trade",
        "tags": [
          "Elysium"
        ],
        "summary": "Buy and sell",
        "description": "**Buy and sell** — Unsigned buy or sell on Ascend, Montra, BOXA or Volta. A first sell includes the two Permit2 approvals.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/trade"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0xYourWallet",
                  "action": "buy",
                  "token": "0xCoin",
                  "amount": 0.25,
                  "slippage": 10
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet",
                  "action",
                  "token",
                  "amount"
                ],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "Your 0x address."
                  },
                  "action": {
                    "type": "string",
                    "description": "`buy` or `sell`."
                  },
                  "token": {
                    "type": "string",
                    "description": "The coin's 0x address."
                  },
                  "amount": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "description": "Buy: HYPE in. Sell: token amount, or a string like `\"100%\"`."
                  },
                  "slippage": {
                    "type": "number",
                    "description": "Percent (default 10)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/elysium/collect-fees": {
      "post": {
        "operationId": "elysium_collect_fees",
        "tags": [
          "Elysium"
        ],
        "summary": "Claim creator fees",
        "description": "**Claim creator fees** — The unsigned creator-fee claim for your launch, on Ascend, Montra, BOXA or Volta.\n**Ascend:** three transactions: `collect` moves the pool's fees into the creator escrow, `withdrawTo` pays them out (the escrow's `claim()` stays locked until the coin graduates), and `unwrap` turns the WHYPE into HYPE. **Montra:** one `claim(poolId, to)` on the hook. **BOXA:** one `claim(token, to)` on the hook. **Volta:** `withdrawFees` on the FeeEscrow, unwrapped to HYPE. Only the launch wallet can claim; a 409 means nothing is owed yet.",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/collect-fees"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0xYourWallet",
                  "token": "0xCoin"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet",
                  "token"
                ],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "The creator wallet."
                  },
                  "token": {
                    "type": "string",
                    "description": "Your coin's 0x address."
                  },
                  "venue": {
                    "type": "string",
                    "description": "ascend (default) | montra | boxa | volta."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/elysium/creator-fees": {
      "get": {
        "operationId": "elysium_creator_fees",
        "tags": [
          "Elysium"
        ],
        "summary": "Creator fees",
        "description": "**Creator fees** — What your coin's creator fees hold and what is claimable now, on Ascend, Montra, BOXA or Volta.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/creator-fees"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin's 0x address."
          },
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The creator wallet."
          },
          {
            "name": "venue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ascend (default) | montra | boxa | volta."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/rpc": {
      "get": {
        "operationId": "elysium_rpc",
        "tags": [
          "Elysium"
        ],
        "summary": "Connection health",
        "description": "**Connection health** — Latency and head block of the API's own Elysium connection.\nThe API reads, simulates and sends through one dedicated QuickNode Elysium endpoint (no community relays, no fan-out). This reports whether it answers, how fast, and the head block. There is nothing to configure on your side: sign what a build endpoint returns and POST it to `/send`.",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/rpc"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/quote": {
      "get": {
        "operationId": "elysium_quote",
        "tags": [
          "Elysium"
        ],
        "summary": "Quote",
        "description": "**Quote** — An exact-in quote from Ascend's V4 quoter. EXPERIMENTAL.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/quote"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin's 0x address."
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "`buy` (default) or `sell`."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "Buy: HYPE in. Sell: tokens in."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/token/{token}": {
      "get": {
        "operationId": "elysium_token",
        "tags": [
          "Elysium"
        ],
        "summary": "Token info",
        "description": "**Token info** — Name, symbol, supply, pool and creator for an Ascend coin. EXPERIMENTAL.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/token"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/venue-of": {
      "get": {
        "operationId": "elysium_venue_of",
        "tags": [
          "Elysium"
        ],
        "summary": "Venue of a coin",
        "description": "**Venue of a coin** — Which launchpad's pool a coin trades on (Ascend, Montra, BOXA or Volta), with its pool id. EXPERIMENTAL.\n`GET /api/elysium/venue-of?token=0x…` → `{ venue, poolId, poolManager?, hook?, tradable }`. `venue` is `ascend`, `montra`, `boxa`, `volta` or `none`. Pass the same value as `venue` to `/create`, `/trade-local` and `/quote`.",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/venue-of"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/venues": {
      "get": {
        "operationId": "elysium_venues",
        "tags": [
          "Elysium"
        ],
        "summary": "Launchpads",
        "description": "**Launchpads** — The Elysium venues, the endpoint list and the contract addresses. EXPERIMENTAL.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/venues"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/account": {
      "get": {
        "operationId": "elysium_account",
        "tags": [
          "Elysium"
        ],
        "summary": "Account",
        "description": "**Account** — Nonce, pending nonce, HYPE balance and gas for a wallet. EXPERIMENTAL.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/account"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The 0x address."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/balances": {
      "get": {
        "operationId": "elysium_balances",
        "tags": [
          "Elysium"
        ],
        "summary": "Balances",
        "description": "**Balances** — HYPE and token balances for a wallet. EXPERIMENTAL.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/balances"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The 0x address."
          },
          {
            "name": "tokens",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated coin addresses to include (up to 50)."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses (≤ 100): the HYPE balance of many wallets in one call."
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "With `wallets`: also that coin's balance of every wallet. Answer: `{ token, decimals, wallets: [{ wallet, native, eth, token: { balance, raw } }] }`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/simulate": {
      "post": {
        "operationId": "elysium_simulate",
        "tags": [
          "Elysium"
        ],
        "summary": "Simulate",
        "description": "**Simulate** — Dry-run the built transactions as a sequence (eth_simulateV1, falling back to per-call estimateGas). EXPERIMENTAL.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/simulate"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transactions"
                ],
                "properties": {
                  "transactions": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "The `transactions` array from a build endpoint (1–6)."
                  },
                  "fundHype": {
                    "type": "number",
                    "description": "Rehearse as if every signer held this much HYPE, so a build for a wallet you have not funded yet can be dry-run."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/elysium/send": {
      "post": {
        "operationId": "elysium_send",
        "tags": [
          "Elysium"
        ],
        "summary": "Send",
        "description": "**Send** — Broadcast one signed raw transaction through the API's Elysium connection.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/send"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transaction"
                ],
                "properties": {
                  "transaction": {
                    "type": "string",
                    "description": "The 0x… signed raw transaction bytes."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/elysium/tx/{hash}": {
      "get": {
        "operationId": "elysium_tx",
        "tags": [
          "Elysium"
        ],
        "summary": "Transaction status",
        "description": "**Transaction status** — Receipt → success | reverted | pending_or_unknown.\n",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/tx"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/txs": {
      "get": {
        "operationId": "elysium_txs",
        "tags": [
          "Elysium"
        ],
        "summary": "Transaction statuses",
        "description": "**Transaction statuses** — The status of up to 100 transactions in one call.\nConfirming a batch of sends one `GET /tx/:hash` per hash spends your rate limit fast: ask for all of them at once. Each entry is the answer `/tx/:hash` gives.",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/txs"
        ],
        "parameters": [
          {
            "name": "hashes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x transaction hashes, 1–100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "statuses": [
                    {
                      "hash": "0x…",
                      "status": "success",
                      "block": 1234567,
                      "gasUsed": "412345"
                    },
                    {
                      "hash": "0x…",
                      "status": "pending_or_unknown"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/trades": {
      "get": {
        "operationId": "elysium_trades",
        "tags": [
          "Elysium"
        ],
        "summary": "Trade history",
        "description": "**Trade history** — The coin's past trades, newest first, in the live feed's shape.\nRead from the coin's ERC-20 Transfer logs, so every launchpad and pool is covered: one transaction is one trade by its sender. A buy's `ethAmount` is what it sent in HYPE (or the wrapped coin); a sell's is the seller's HYPE balance change in that block plus the gas. Poll it for a live tape: pass `fromBlock` = the last `head` + 1 and only new trades come back.",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/trades"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "How many trades, newest first, 1–500 (default 100)."
          },
          {
            "name": "fromBlock",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Only blocks from this one on (a poll: the previous answer's `head` + 1)."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: only trades after this."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "head": 133071161,
                  "windows": 1,
                  "trades": [
                    {
                      "txType": "buy",
                      "hash": "0x…",
                      "token": "0x…",
                      "trader": "0x…",
                      "tokenAmount": 1415205,
                      "ethAmount": 0.1,
                      "priceEth": 7.07e-8,
                      "venue": "elysium",
                      "block": 133071160,
                      "ts": 1762900000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/pnl": {
      "get": {
        "operationId": "elysium_pnl",
        "tags": [
          "Elysium"
        ],
        "summary": "Profit / loss",
        "description": "**Profit / loss** — The HYPE profit or loss of your wallets on one coin, gas and fees included.\nFrom the coin's trades (the same source as `GET /api/elysium/trades`): a buy costs what it sent + its gas + the 0.5 % API fee; a sell brings its block's HYPE balance change (the gas and, when it landed in the same block, the fee transfer are already in it). Transfers between your wallets are not trades and never count.",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/pnl"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses, 1–100."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: ignore trades before this (e.g. the launch time)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "spent": 0.151,
                  "received": 0.067,
                  "net": -0.084,
                  "trades": 5,
                  "truncated": false,
                  "wallets": [
                    {
                      "wallet": "0x…",
                      "spent": 0.151,
                      "received": 0.067,
                      "net": -0.084,
                      "buys": 2,
                      "sells": 3,
                      "gasEth": 0.00004
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/elysium/created": {
      "get": {
        "operationId": "elysium_created",
        "tags": [
          "Elysium"
        ],
        "summary": "Created coin",
        "description": "**Created coin** — The coin a create transaction made, read from its receipt.\nMost launchpads let `trade-local` predict the coin's address (`predicted.token`). Where it cannot (or a CREATE launch was overtaken), ask this once the create landed: the ERC-20 minted in that transaction, the biggest mint when there are several.",
        "x-docs": [
          "https://trenchy.tools/docs/elysium/created"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The 0x hash of the create transaction."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "token": "0x…",
                  "block": 56278567
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/trade-local": {
      "post": {
        "operationId": "base_trade",
        "tags": [
          "Base"
        ],
        "summary": "Create, buy, sell, claim",
        "description": "**Create, buy, sell, claim** — A Clanker V5 launch, any Clanker V5 trade, the creator fee claim: unsigned transactions.\n`create` → `[create, fee?]` + `predicted.token` (built by clanker-sdk for your wallet: a dev buy is simulated as that wallet, so fund it first). `buy` / `sell` → `[approve…] buy|sell [fee]` (a first sell approves the token to Permit2 and Permit2 to the router). `collectCreatorFee` → `[claim]` (the whole balance the fee escrow holds for your wallet).",
        "x-docs": [
          "https://trenchy.tools/docs/base/trade"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet",
                  "action"
                ],
                "properties": {
                  "wallet": {
                    "type": "string",
                    "description": "Your 0x address."
                  },
                  "action": {
                    "type": "string",
                    "description": "`create`, `buy`, `sell` or `collectCreatorFee`."
                  },
                  "token": {
                    "type": "string",
                    "description": "The coin (buy, sell, collectCreatorFee)."
                  },
                  "amount": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "description": "Create: the dev buy in ETH (0 = none). Buy: ETH. Sell: tokens, or `\"100%\"`."
                  },
                  "tokenMetadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Create: `{ name, symbol, image, description?, twitter?, telegram?, website? }` (image: an https:// or ipfs:// link)."
                  },
                  "taxPercent": {
                    "type": "number",
                    "description": "Create: the coin's buy and sell tax, 1–10 (default 1)."
                  },
                  "slippage": {
                    "type": "number",
                    "description": "Percent. Default 10."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/base/quote": {
      "get": {
        "operationId": "base_quote",
        "tags": [
          "Base"
        ],
        "summary": "Quote",
        "description": "**Quote** — Exact buy quotes from the V4 quoter (the tax in it); sells priced from the pool.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/quote"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "`buy` (amount in ETH) or `sell` (amount in tokens)."
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "description": "The amount."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "venue": "clanker",
                  "action": "buy",
                  "ethIn": 0.001,
                  "tokensOut": 504102.47,
                  "buyTaxPct": 2
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/token/{token}": {
      "get": {
        "operationId": "base_token",
        "tags": [
          "Base"
        ],
        "summary": "Token",
        "description": "**Token** — Name, symbol, supply, the Clanker pool (taxes, anti-snipe window) and the spot price.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/token"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "name": "Chinese Spy",
                  "symbol": "SPY",
                  "totalSupply": 1000000000,
                  "launchpad": "clanker",
                  "creator": "0x…",
                  "poolId": "0x…",
                  "buyTaxPct": 2,
                  "sellTaxPct": 2,
                  "antiSnipe": {
                    "startPct": 99,
                    "windowS": 20,
                    "launchTime": 1762900000
                  },
                  "priceEth": 1.9e-9
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/creator-fees": {
      "get": {
        "operationId": "base_creator_fees",
        "tags": [
          "Base"
        ],
        "summary": "Creator fees",
        "description": "**Creator fees** — The creator's tax share waiting in Clanker's fee escrow.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/creator-fees"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The recipient (default: the coin's creator fee recipient)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "launchpad": "clanker",
                  "token": "0x…",
                  "wallet": "0x…",
                  "eth": 0.0123,
                  "claimableEth": 0.0123
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/send": {
      "post": {
        "operationId": "base_send",
        "tags": [
          "Base"
        ],
        "summary": "Send",
        "description": "**Send** — Broadcast a signed transaction.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/send"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transaction"
                ],
                "properties": {
                  "transaction": {
                    "type": "string",
                    "description": "The 0x… signed raw transaction."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/base/simulate": {
      "post": {
        "operationId": "base_simulate",
        "tags": [
          "Base"
        ],
        "summary": "Simulate",
        "description": "**Simulate** — Run trade-local transactions in order on a copy of the chain.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/simulate"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "ok": true,
                  "steps": [
                    {
                      "label": "create",
                      "ok": true,
                      "gasUsed": "2319703",
                      "error": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transactions"
                ],
                "properties": {
                  "transactions": {
                    "type": "string",
                    "description": "1–6 transactions from /api/base/trade-local (the fee leg is skipped)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/base/tx/{hash}": {
      "get": {
        "operationId": "base_tx",
        "tags": [
          "Base"
        ],
        "summary": "Transaction status",
        "description": "**Transaction status** — success, reverted or pending_or_unknown.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/tx"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "block": 56281800,
                  "gasUsed": "412345"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/account": {
      "get": {
        "operationId": "base_account",
        "tags": [
          "Base"
        ],
        "summary": "Account",
        "description": "**Account** — Nonce, gas prices, chain id and ETH balance: what a local signer needs.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/account"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Any 0x address."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallet": "0x…",
                  "chainId": 8453,
                  "nonce": 3,
                  "pendingNonce": 3,
                  "balanceEth": "0.0123",
                  "maxFeePerGas": "…",
                  "maxPriorityFeePerGas": "…",
                  "transferGas": "21000"
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/balances": {
      "get": {
        "operationId": "base_balances",
        "tags": [
          "Base"
        ],
        "summary": "Balances",
        "description": "**Balances** — ETH and token balances of one wallet, or many.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/balances"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "One 0x address (with `tokens`: those coins' balances)."
          },
          {
            "name": "tokens",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated token addresses."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses (≤ 100): ETH for many wallets at once."
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "With `wallets`: also that coin's balance of every wallet."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "wallets": [
                    {
                      "wallet": "0x…",
                      "native": "0.0123",
                      "eth": "0.0123",
                      "token": {
                        "balance": "504102.4",
                        "raw": "…"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/venues": {
      "get": {
        "operationId": "base_venues",
        "tags": [
          "Base"
        ],
        "summary": "Venues",
        "description": "**Venues** — The Base launchpads behind one create call.\n",
        "x-docs": [
          "https://trenchy.tools/docs/base/venues"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/txs": {
      "get": {
        "operationId": "base_txs",
        "tags": [
          "Base"
        ],
        "summary": "Transaction statuses",
        "description": "**Transaction statuses** — The status of up to 100 transactions in one call.\nConfirming a batch of sends one `GET /tx/:hash` per hash spends your rate limit fast: ask for all of them at once. Each entry is the answer `/tx/:hash` gives.",
        "x-docs": [
          "https://trenchy.tools/docs/base/txs"
        ],
        "parameters": [
          {
            "name": "hashes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x transaction hashes, 1–100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "statuses": [
                    {
                      "hash": "0x…",
                      "status": "success",
                      "block": 1234567,
                      "gasUsed": "412345"
                    },
                    {
                      "hash": "0x…",
                      "status": "pending_or_unknown"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/trades": {
      "get": {
        "operationId": "base_trades",
        "tags": [
          "Base"
        ],
        "summary": "Trade history",
        "description": "**Trade history** — The coin's past trades, newest first, in the live feed's shape.\nRead from the coin's ERC-20 Transfer logs, so every launchpad and pool is covered: one transaction is one trade by its sender. A buy's `ethAmount` is what it sent in ETH (or the wrapped coin); a sell's is the seller's ETH balance change in that block plus the gas. Poll it for a live tape: pass `fromBlock` = the last `head` + 1 and only new trades come back.",
        "x-docs": [
          "https://trenchy.tools/docs/base/trades"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "How many trades, newest first, 1–500 (default 100)."
          },
          {
            "name": "fromBlock",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Only blocks from this one on (a poll: the previous answer's `head` + 1)."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: only trades after this."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "head": 133071161,
                  "windows": 1,
                  "trades": [
                    {
                      "txType": "buy",
                      "hash": "0x…",
                      "token": "0x…",
                      "trader": "0x…",
                      "tokenAmount": 1415205,
                      "ethAmount": 0.1,
                      "priceEth": 7.07e-8,
                      "venue": "base",
                      "block": 133071160,
                      "ts": 1762900000000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/pnl": {
      "get": {
        "operationId": "base_pnl",
        "tags": [
          "Base"
        ],
        "summary": "Profit / loss",
        "description": "**Profit / loss** — The ETH profit or loss of your wallets on one coin, gas and fees included.\nFrom the coin's trades (the same source as `GET /api/base/trades`): a buy costs what it sent + its gas + the 0.5 % API fee; a sell brings its block's ETH balance change (the gas and, when it landed in the same block, the fee transfer are already in it). Transfers between your wallets are not trades and never count.",
        "x-docs": [
          "https://trenchy.tools/docs/base/pnl"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The coin."
          },
          {
            "name": "wallets",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated 0x addresses, 1–100."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Unix seconds: ignore trades before this (e.g. the launch time)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "token": "0x…",
                  "spent": 0.151,
                  "received": 0.067,
                  "net": -0.084,
                  "trades": 5,
                  "truncated": false,
                  "wallets": [
                    {
                      "wallet": "0x…",
                      "spent": 0.151,
                      "received": 0.067,
                      "net": -0.084,
                      "buys": 2,
                      "sells": 3,
                      "gasEth": 0.00004
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/base/created": {
      "get": {
        "operationId": "base_created",
        "tags": [
          "Base"
        ],
        "summary": "Created coin",
        "description": "**Created coin** — The coin a create transaction made, read from its receipt.\nMost launchpads let `trade-local` predict the coin's address (`predicted.token`). Where it cannot (or a CREATE launch was overtaken), ask this once the create landed: the ERC-20 minted in that transaction, the biggest mint when there are several.",
        "x-docs": [
          "https://trenchy.tools/docs/base/created"
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The 0x hash of the create transaction."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hash": "0x…",
                  "status": "success",
                  "token": "0x…",
                  "block": 56278567
                }
              }
            }
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/create-api-key": {
      "get": {
        "operationId": "create_api_key",
        "tags": [
          "Account"
        ],
        "summary": "Create an API key (no account needed)",
        "description": "Free. 5 per hour per IP. The key is shown once; store it in an environment variable.",
        "security": [],
        "parameters": [
          {
            "name": "label",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiKey": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "apiKey": "YOUR_API_KEY"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/keys/revoke": {
      "post": {
        "operationId": "revoke_key",
        "tags": [
          "Account"
        ],
        "summary": "Revoke an API key",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apiKey"
                ],
                "properties": {
                  "apiKey": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/chains": {
      "get": {
        "operationId": "chains",
        "tags": [
          "Account"
        ],
        "summary": "Capability discovery: chains, launchpads, operations and what is live",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/fees": {
      "get": {
        "operationId": "fees",
        "tags": [
          "Account"
        ],
        "summary": "Fee schedule",
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "health",
        "tags": [
          "Account"
        ],
        "summary": "Liveness + how the server sees your IP",
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/transfer/venues": {
      "get": {
        "operationId": "transfer_venues",
        "tags": [
          "Transfers"
        ],
        "summary": "Which exchange routes are open right now (break-wallet-cluster option)",
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "{exchange, checkedAt, venues:{binance:{status,default}, bybit:{status}, …}}"
          }
        }
      }
    },
    "/api/transfer/{id}/sent": {
      "post": {
        "operationId": "transfer_sent",
        "tags": [
          "Transfers"
        ],
        "summary": "Record the signature of a direct transfer you sent",
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "hash"
                ],
                "properties": {
                  "hash": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/sol/simulate": {
      "post": {
        "operationId": "sol_simulate",
        "tags": [
          "Solana"
        ],
        "summary": "Simulate before sending (nothing is broadcast)",
        "description": "{transaction}: a signed or unsigned transaction (base58 or base64). Returns {ok, err, unitsConsumed, logs}.",
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/rh/simulate": {
      "post": {
        "operationId": "rh_simulate",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Simulate before sending (nothing is broadcast)",
        "description": "{transactions:[…]} from trade-local, run in order on a copy of the chain. Returns {ok, steps:[{label, ok, gasUsed, error}]}.",
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad request: a field is missing or malformed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or unknown API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Token / pool / resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State conflict (graduated, no balance, launch disabled…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Would fail on chain, or could not be quoted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; honour retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "A node, Jito or an upstream service refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-websockets": [
    {
      "path": "/api/sol/data",
      "chain": "sol",
      "url": "wss://api.trenchy.tools/api/sol/data?api-key=YOUR_API_KEY",
      "summary": "New coins, graduations and trades the moment they happen.",
      "docs": "https://trenchy.tools/docs/sol/websocket",
      "messages": [
        "subscribeNewToken",
        "subscribeMigration",
        "subscribeTokenTrade {keys:[mint]}",
        "subscribeAccountTrade {keys:[wallet]}",
        "unsubscribe* (same shapes)"
      ]
    },
    {
      "path": "/api/rh/data",
      "chain": "rh",
      "url": "wss://api.trenchy.tools/api/rh/data?api-key=YOUR_API_KEY",
      "summary": "New pons coins, graduations and trades as they happen.",
      "docs": "https://trenchy.tools/docs/rh/websocket",
      "messages": [
        "subscribeNewToken",
        "subscribeMigration",
        "subscribeTokenTrade {keys:[mint]}",
        "subscribeAccountTrade {keys:[wallet]}",
        "unsubscribe* (same shapes)"
      ]
    }
  ],
  "x-legacy-aliases": {
    "description": "The Solana routes also answer at /api/<path> without the /sol segment",
    "paths": [
      "/api/trade-local",
      "/api/trade",
      "/api/send",
      "/api/bundle",
      "/api/quote",
      "/api/token/{mint}",
      "/api/balances",
      "/api/data (ws)"
    ]
  }
}
