{
  "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": "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 a pump.fun coin with its image, links and a first buy, in one transaction: priced in SOL, or in a custom pair (USDC, a tokenized stock, another coin), with Mayhem mode and holder rewards as options.\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 `auto` (we pick). Default `pump`; `auto` resolves curve vs. AMM from chain state."
                      },
                      "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."
                      }
                    },
                    "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 `auto` (we pick). Default `pump`; `auto` resolves curve vs. AMM from chain state."
                        },
                        "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."
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/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/vanity": {
      "post": {
        "operationId": "sol_vanity",
        "tags": [
          "Solana"
        ],
        "summary": "Vanity mint",
        "description": "**Vanity mint** — A mint that ends in `pump` (or another short pattern): instant from our warm pool, a bounded job for other patterns, or the SDK grinder on your own CPU.\npump.fun coins conventionally end in `pump`, letsbonk coins in `bonk`. The address is the mint keypair's public key, so a pattern means grinding keypairs until one matches (a 4-character suffix averages 11 million tries). Three tiers: **warm pool** — we keep a few `…pump` and `…bonk` keys ready, so the common request answers at once; **job** — other patterns up to 4 characters are ground on our workers (up to 10 minutes); **local** — the SDK grinder on your own CPU, no limits, the key never exists anywhere else (the recommended default for anything custom).\n`GET /api/sol/vanity/:jobId` → `status` `running` (with `attempts`, `elapsedMs`), `failed` (with `reason`, e.g. the 10-minute limit), or `done` with `publicKey` and `secretKey` — once. `pooled: true` marks a key that came from the warm pool. A second read says `collected: true`. Results are kept 10 minutes. One running job per key; when the workers are busy you get `429 vanity_busy`: retry in a minute or grind locally.",
        "x-docs": [
          "https://trenchy.tools/docs/sol/vanity"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "jobId": "k3Jt…",
                  "status": "running",
                  "suffix": "pump",
                  "caseSensitive": true,
                  "expectedAttempts": 11316496,
                  "limits": {
                    "maxChars": 4,
                    "workersPerJob": 3,
                    "timeoutS": 600,
                    "maxJobs": 2,
                    "pool": {
                      "ready": {
                        "pump": 5,
                        "bonk": 3
                      }
                    }
                  },
                  "poll": "/api/sol/vanity/k3Jt…"
                }
              }
            }
          },
          "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": {
                  "suffix": {
                    "type": "string",
                    "description": "Base58 characters the address must end with, e.g. `pump`. Case-sensitive by default."
                  },
                  "prefix": {
                    "type": "string",
                    "description": "Base58 characters it must start with. `suffix` + `prefix` together ≤ 4 characters on our workers; longer patterns → `vanity_too_long`, grind locally."
                  },
                  "caseSensitive": {
                    "type": "boolean",
                    "description": "Default `true` (pump.fun shows the exact case). `false` matches letters in either case and is ~30 % faster per character."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/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`."
          },
          {
            "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/rh/trade-local": {
      "post": {
        "operationId": "rh_trade",
        "tags": [
          "Robinhood chain"
        ],
        "summary": "Buy & sell",
        "description": "**Buy & sell** — Get the ordered transactions for a pons buy or sell, then send them in order.\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`, 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.\n\n**Create a token** — Launch a pons coin with a first buy in one transaction, and know its address before you sign.\n",
        "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."
                  },
                  "tokenMetadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ name, symbol, image, description?, twitter?, telegram?, website? }`."
                  },
                  "exemptWallets": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Up to 31 wallets that skip the launch-window snipe tax (your other buyers)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/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.",
        "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)."
          }
        ],
        "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** — The coin's curve, phase, price and graduation progress.\n",
        "x-docs": [
          "https://trenchy.tools/docs/rh/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": "0x6Fbc…",
                  "name": "Pheal",
                  "symbol": "PHEAL",
                  "venue": "pons-curve",
                  "curve": "0x…",
                  "graduated": false,
                  "creator": "0x…",
                  "curveState": {
                    "realEth": 0.29,
                    "graduationThresholdEth": 5,
                    "bondingProgressPct": 5.88,
                    "snipeTaxBps": 0,
                    "priceEth": 2.2e-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/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": "21000",
                  "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 }] }`."
          }
        ],
        "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/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.",
        "x-docs": [
          "https://trenchy.tools/docs/wallets/routes"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Source chain: `sol` or `rh`."
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Destination chain: `sol`, `rh`, `eth`, `bnb`."
          },
          {
            "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 Robinhood chain the deposit is `transaction.evm` (`{chainId, from, to, value, gas}`): sign and send it with viem like any `trade-local` transaction. 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` or `rh`."
                  },
                  "to": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "`{ chain, address }` — where the coins end up. Any supported chain; validated for that chain."
                  },
                  "amount": {
                    "type": "number",
                    "description": "In the source chain's native coin (SOL on `sol`, ETH on `rh`)."
                  },
                  "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/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/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/vanity/{jobId}": {
      "get": {
        "operationId": "sol_vanity_status",
        "tags": [
          "Solana"
        ],
        "summary": "Vanity job status; a finished job returns the keypair once",
        "security": [
          {
            "apiKeyQuery": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "running | failed | done ({publicKey, secretKey} once)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "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)"
    ]
  }
}
