{
  "openapi": "3.1.0",
  "info": {
    "title": "heaven-tx-api",
    "description": "",
    "license": {
      "name": ""
    },
    "version": "0.1.14"
  },
  "servers": [
    {
      "url": "https://tx.api.heaven.xyz"
    }
  ],
  "paths": {
    "/data/pool-info": {
      "post": {
        "tags": [
          "Data API"
        ],
        "description": "Fetch detailed information about a liquidity pool including current reserves, fees collected, market cap, creator verification status, and migration state.\n\nThis is the primary endpoint for displaying pool data in a UI. It returns human-readable values (UI amounts with decimals applied).",
        "operationId": "fetch_liquidity_pool_info",
        "summary": "Get Liquidity Pool Info",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FetchLiquidityPoolInfoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchLiquidityPoolInfoResponse"
                }
              }
            }
          }
        }
      }
    },
    "/data/pool-state": {
      "post": {
        "tags": [
          "Data API"
        ],
        "description": "Fetch the raw on-chain state of a liquidity pool by its mint address.\n\nReturns the full deserialized `LiquidityPoolState` account data. Useful for advanced integrations that need access to all pool parameters.",
        "operationId": "fetch_liquidity_pool_state",
        "summary": "Get Liquidity Pool State",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FetchLiquidityPoolStateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchLiquidityPoolStateResponse"
                }
              }
            }
          }
        }
      }
    },
    "/data/protocol-config-state": {
      "post": {
        "tags": [
          "Data API"
        ],
        "description": "Fetch the on-chain protocol configuration for a given version.\n\nThe protocol config contains fee structures, pool creation parameters, and other protocol-wide settings. Different versions may have different fee tiers.",
        "operationId": "fetch_protocol_config",
        "summary": "Get Protocol Config State",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FetchProtocolConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchProtocolConfigResponse"
                }
              }
            }
          }
        }
      }
    },
    "/quote/buy": {
      "post": {
        "tags": [
          "Standard Pool API"
        ],
        "description": "Get a quote for buying tokens in a standard pool.\n\nReturns the estimated token output, fees, and minimum output after slippage. Pass the full response object to `/tx/buy` to build the transaction.\n\n**Note:** The quote is calculated at the current on-chain state and may change by the time the transaction is submitted. Use `slippage_bps` to protect against price movements.",
        "operationId": "quote_buy",
        "summary": "Quote Buy",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteBuyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Use the response to create a buy transaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteBuyResponse"
                }
              }
            }
          }
        }
      }
    },
    "/quote/initial-buy": {
      "post": {
        "tags": [
          "Standard Pool API"
        ],
        "description": "Estimate the cost of purchasing a percentage of the initial token supply when creating a new standard pool.\n\nUseful for calculating how much SOL is needed for the initial dev buy during pool creation.",
        "operationId": "quote_initial_buy",
        "summary": "Quote Initial Buy",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteInitialBuyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteInitialBuyResponse"
                }
              }
            }
          }
        }
      }
    },
    "/quote/sell": {
      "post": {
        "tags": [
          "Standard Pool API"
        ],
        "description": "Get a quote for selling tokens in a standard pool.\n\nReturns the estimated SOL output, fees, and minimum output after slippage. Pass the full response object to `/tx/sell` to build the transaction.",
        "operationId": "quote_sell",
        "summary": "Quote Sell",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteSellRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteSellResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/buy": {
      "post": {
        "tags": [
          "Standard Pool API"
        ],
        "description": "Generate a Base64 encoded buy transaction for a standard pool.\n\n**Flow:** First call `/quote/buy` to get a quote, then pass the `quote_response` here to build the transaction. The returned transaction must be signed by the payer and submitted to the Solana network.\n\nThe transaction includes: compute budget instructions, wSOL wrapping, token ATA creation (if needed), the buy instruction, and wSOL unwrapping.",
        "operationId": "create_buy_tx",
        "summary": "Create Buy Transaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBuyTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateBuyTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/claim-creator-trading-fees": {
      "post": {
        "tags": [
          "Standard Pool API"
        ],
        "description": "Generate a Base64 encoded creator fee claim transaction for client-side signing and submission.",
        "operationId": "create_claim_creator_trading_fee_tx",
        "summary": "Create Claim Creator Trading Fee Transaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClaimCreatorTradingFeeTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateClaimCreatorTradingFeeTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/create-standard-liquidity-pool": {
      "post": {
        "tags": [
          "Standard Pool API"
        ],
        "description": "Generate a transaction to create a new standard liquidity pool with a vanity mint address.\n\nThis creates a new Token-2022 mint, sets up metadata, creates the pool, toggles it live, and optionally executes an initial buy \u2014 all in a single transaction. The pool uses Heaven's standardized parameters (virtual SOL seeding, fixed fee structure).",
        "operationId": "create_standard_vanity_liquidity_pool_tx",
        "summary": "Create Pool Transaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStandardLiquidityPoolTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateStandardLiquidityPoolTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/sell": {
      "post": {
        "tags": [
          "Standard Pool API"
        ],
        "description": "Generate a Base64 encoded sell transaction for a standard pool.\n\n**Flow:** First call `/quote/sell` to get a quote, then pass the `quote_response` here to build the transaction. The returned transaction must be signed by the payer and submitted to the Solana network.",
        "operationId": "create_sell_tx",
        "summary": "Create Sell Transaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSellTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSellTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/create": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Create a new pro liquidity pool using an existing SPL token.\n\n### Fee configuration\n\nAll fees default to **0%** except protocol fee (**0.3%**, set by protocol config). All fee fields are optional.\n\n| Field | Fee type | Default |\n|---|---|---|\n| `creator_trading_fee` | Claimable by pool creator | 0% |\n| `reflection_trading_fee` | Distributed to token holders | 0% |\n| `liquidity_provider_trading_fee` | Distributed to LP providers | 0% |\n| `creator_slot_trading_fee` | Slot-based sniper resistance | Disabled |\n\nEach fee type accepts an array of `FeeBracketInput` with `market_cap_upper_bound`, `buy_fee_bps`, and `sell_fee_bps`. 1 bps = 0.01%, so 100 bps = 1%.\n\n### Feature toggles\n\nAll optional, wrapped in a `features` object:\n\n| Toggle | Default | Description |\n|---|---|---|\n| `enable_swap` | `true` | Allow buying and selling |\n| `enable_deposit_liquidity` | `true` | Allow depositing liquidity |\n| `enable_withdraw_liquidity` | `true` | Allow withdrawing liquidity |\n| `enable_update_creator_trading_fee` | `true` | Allow fee bracket updates |\n| `enable_same_slot_trading` | `false` | Allow buy+sell in same slot |\n| `enable_sandwich_resistant_mode` | `false` | MEV sandwich protection |",
        "operationId": "create_pro_liquidity_pool_tx",
        "summary": "Create Pro Pool",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProLiquidityPoolTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProLiquidityPoolTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/buy": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Generate a buy transaction for a pro pool.\n\n**Flow:** First call `/quote/pro/buy` to get a quote, then pass the `quote_response` and `pool` address here. The returned transaction wraps SOL, executes the swap, and unwraps remaining SOL.\n\nPro pool buys work identically to standard pool buys but reference the pro pool's state account directly.",
        "operationId": "create_pro_buy_tx",
        "summary": "Create Pro Buy Transaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProBuyTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProBuyTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/sell": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Generate a sell transaction for a pro pool.\n\n**Flow:** First call `/quote/pro/sell` to get a quote, then pass the `quote_response` and `pool` address here. The transaction sells tokens for SOL.",
        "operationId": "create_pro_sell_tx",
        "summary": "Create Pro Sell Transaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProSellTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProSellTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/quote/pro/buy": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Get a buy quote for a pro pool.\n\nReturns the estimated token output, fees, and minimum output after slippage. Unlike standard quotes, pro pool quotes require the `pool` address since pro pool PDAs include the creator in their derivation.\n\nPass the full response to `/tx/pro/buy` to build the transaction.",
        "operationId": "quote_pro_buy",
        "summary": "Quote Pro Buy",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteProBuyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteBuyResponse"
                }
              }
            }
          }
        }
      }
    },
    "/quote/pro/sell": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Get a sell quote for a pro pool.\n\nReturns the estimated SOL output, fees, and minimum output after slippage. Requires the `pool` address.\n\nPass the full response to `/tx/pro/sell` to build the transaction.",
        "operationId": "quote_pro_sell",
        "summary": "Quote Pro Sell",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteProSellRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteSellResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/add-liquidity": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Deposit liquidity to a pro pool.\n\nDeposits token A and SOL proportional to the current pool ratio. You receive LP tokens representing your share of the pool. If this is your first time adding liquidity, a new LP position PDA is created for your wallet.\n\n**Parameters:** Specify `max_token_a` and `max_token_b` as upper bounds \u2014 the actual deposited amounts will match the pool's current ratio. Set `min_lp_tokens` to protect against slippage (use 0 to accept any amount).",
        "operationId": "create_add_liquidity_pro_pool_tx",
        "summary": "Deposit Liquidity",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddLiquidityProPoolTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddLiquidityProPoolTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/remove-liquidity": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Withdraw liquidity from a pro pool by burning LP tokens.\n\nYou receive token A and SOL proportional to your share of the pool. Use `min_token_a` and `min_token_b` to set minimum acceptable amounts (slippage protection).",
        "operationId": "create_remove_liquidity_pro_pool_tx",
        "summary": "Withdraw Liquidity",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveLiquidityProPoolTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveLiquidityProPoolTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/claim-creator-fees": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Claim accumulated creator trading fees from a pro pool.\n\nCreator fees accrue in SOL as users trade in the pool. The fee rate is determined by the pool's market cap based fee brackets. Only the designated fee receiver (initially the pool creator) can claim.",
        "operationId": "create_claim_pro_creator_fees_tx",
        "summary": "Claim Creator Fees",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimProCreatorFeesTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimProCreatorFeesTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/claim-lp-fees": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Claim accumulated LP provider trading fees from a pro pool.\n\nLP fees accrue proportionally to your LP token balance. Fees are automatically tracked per LP position and can be claimed at any time.",
        "operationId": "create_claim_pro_lp_fees_tx",
        "summary": "Claim LP Fees",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimProLpFeesTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimProLpFeesTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/toggle-swap": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Enable or disable swapping on a pro pool. Only the pool creator can call this.\n\nWhen swapping is disabled, all buy and sell transactions will fail. Useful for pausing trading during migrations or emergencies.",
        "operationId": "create_pro_toggle_swap_tx",
        "summary": "Toggle Swap",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProToggleSwapTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProToggleSwapTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/toggle-deposit": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Enable or disable deposits on a pro pool. Only the pool creator can call this.\n\nWhen deposits are disabled, no new deposits can be made. Existing LP positions and withdrawals are unaffected.",
        "operationId": "create_pro_toggle_deposit_tx",
        "summary": "Toggle Deposit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProToggleDepositTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProToggleDepositTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/toggle-withdraw": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Enable or disable withdrawals on a pro pool. Only the pool creator can call this.\n\nWhen withdrawals are disabled, LP holders cannot withdraw. Use with caution as this locks LP funds.",
        "operationId": "create_pro_toggle_withdraw_tx",
        "summary": "Toggle Withdraw",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProToggleWithdrawTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProToggleWithdrawTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/set-market-cap-creator-fee": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Set market cap based creator fee brackets on a pro pool. Only the pool creator can call this.\n\nBrackets are evaluated from lowest to highest `market_cap_upper_bound`. Use `9223372036854775807` (max int64) for the final catch-all bracket.\n\n**Example** \u2014 charge 2% below $100k, 1% up to $1M, 0.5% above:\n\n| `market_cap_upper_bound` | `buy_fee_bps` | `sell_fee_bps` | Effective rate |\n|---|---|---|---|\n| `100000000000` | `200` | `200` | 2% below $100k |\n| `1000000000000` | `100` | `100` | 1% up to $1M |\n| `9223372036854775807` | `50` | `50` | 0.5% above $1M |",
        "operationId": "create_pro_set_market_cap_creator_fee_tx",
        "summary": "Set Creator Fee",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProSetMarketCapCreatorFeeTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProSetMarketCapCreatorFeeTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/set-slot-creator-fee": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Set slot-offset based creator fee brackets on a pro pool. Useful for **sniper resistance** \u2014 charge high fees in the first few seconds after launch that decay over time.\n\nEach Solana slot is ~400ms. When active, slot fees **take precedence** over market cap based creator fees. Only the pool creator can call this.\n\n**Example** \u2014 50% for first ~2s, 10% for next ~4s, then normal fees:\n\n| `slot_offset_upperbound` | `buy_fee_bps` | `sell_fee_bps` | Timing |\n|---|---|---|---|\n| `5` | `5000` | `5000` | First ~2 seconds (50%) |\n| `15` | `1000` | `1000` | Next ~4 seconds (10%) |\n\nSet `max_slot_offset: 15`, `max_fee_bps: 5000`, `enabled: true`.",
        "operationId": "create_pro_set_slot_creator_fee_tx",
        "summary": "Set Slot Fee",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProSetSlotCreatorFeeTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProSetSlotCreatorFeeTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/update-creator-fee-receiver": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Transfer creator fee receiver rights to a new wallet.\n\nBoth the current creator and the new receiver must sign the transaction. The pool must have:\n- Fee claim status set to \"Processed\" (no pending claims)\n- Fee distribution set to \"Creator\" mode\n\nAfter the transfer, the new receiver can claim future creator trading fees.",
        "operationId": "create_pro_update_creator_fee_receiver_tx",
        "summary": "Update Creator Fee Receiver",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProUpdateCreatorFeeReceiverTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProUpdateCreatorFeeReceiverTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/transfer-lp": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Transfer LP tokens between users within a pro pool.\n\nIf the receiver doesn't have an existing LP position, a new one is created automatically (the payer covers the rent). The sender's LP balance is reduced and the receiver's is increased.\n\nLP tokens represent a proportional share of the pool's reserves and accumulated fees.",
        "operationId": "create_pro_transfer_lp_tx",
        "summary": "Transfer LP Tokens",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProTransferLpTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProTransferLpTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/data/lp-balance": {
      "post": {
        "tags": [
          "Data API"
        ],
        "description": "Fetch a user's LP position in a pro pool.\n\nReturns the LP token balance, pending fees, and whether the position exists on-chain. If the user has never added liquidity (or received LP tokens via transfer), `exists` will be `false` and all values will be zero.\n\nThe `lp_position_address` is the PDA derived from `[USER_LP_POSITION, pool, user]` \u2014 useful for monitoring the account directly via WebSocket subscriptions.",
        "operationId": "fetch_lp_balance",
        "summary": "Get LP Balance",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FetchLpBalanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchLpBalanceResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/set-reflection-fee": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Set market cap based reflection fee brackets on a pro pool. Reflection fees are automatically distributed to token holders on each trade. Only the pool creator can call this.\n\n**Example** \u2014 flat 0.25% reflection fee:\n\n| `market_cap_upper_bound` | `buy_fee_bps` | `sell_fee_bps` | Effective rate |\n|---|---|---|---|\n| `9223372036854775807` | `25` | `25` | 0.25% at all market caps |",
        "operationId": "create_pro_set_reflection_fee_tx",
        "summary": "Set Reflection Fee",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProSetReflectionFeeTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProSetReflectionFeeTxResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tx/pro/set-lp-fee": {
      "post": {
        "tags": [
          "Pro Pool API"
        ],
        "description": "Set market cap based LP provider fee brackets on a pro pool. LP fees are distributed proportionally to liquidity providers. Only the pool creator can call this.\n\n**Example** \u2014 0.3% below $500k, 0.1% above:\n\n| `market_cap_upper_bound` | `buy_fee_bps` | `sell_fee_bps` | Effective rate |\n|---|---|---|---|\n| `500000000000` | `30` | `30` | 0.3% below $500k |\n| `9223372036854775807` | `10` | `10` | 0.1% above $500k |",
        "operationId": "create_pro_set_lp_fee_tx",
        "summary": "Set LP Fee",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProSetLpFeeTxRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProSetLpFeeTxResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateBuyTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "quote_response",
          "encoded_user_defined_event_data"
        ],
        "properties": {
          "compute_unit_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum compute units to use for the transaction",
            "default": 200000,
            "minimum": 0
          },
          "compute_unit_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Price per compute unit in micro-lamports",
            "default": 40000000,
            "minimum": 0
          },
          "encoded_user_defined_event_data": {
            "type": "string",
            "description": "Arbitrary user-defined event data to include in the transaction for tracking purposes",
            "example": ""
          },
          "payer": {
            "type": "string",
            "description": "Public key of the account that will pay for the transaction",
            "example": "GrX8TXKsPNokXKzfUg7tYmWs6MLhNseScc4PnzyiqpP7"
          },
          "quote_response": {
            "$ref": "#/components/schemas/QuoteBuyResponse",
            "description": "The full quote response object from the Quote Buy endpoint. Pass the entire response without modification."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public key of the token account to debit tokens from. If not provided, the payer's associated token account will be used.",
            "example": "GrX8TXKsPNokXKzfUg7tYmWs6MLhNseScc4PnzyiqpP7"
          }
        }
      },
      "CreateBuyTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "A Base64 encoded transaction that can be signed and submitted to the Solana network.",
            "example": "BASE64_ENCODED_TRANSACTION"
          }
        }
      },
      "CreateClaimCreatorTradingFeeTxRequest": {
        "type": "object",
        "required": [
          "mint",
          "version",
          "payer",
          "program_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "description": "Amount of creator trading fees (Lamports) to claim ",
            "default": 0,
            "minimum": 0
          },
          "compute_unit_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Compute unit limit for the transaction",
            "default": 130000,
            "minimum": 0
          },
          "compute_unit_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Compute unit price for the transaction",
            "default": 20000000,
            "minimum": 0
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the liquidity pool",
            "default": "LiGHtkg3uTa9836RaNkKLLriqTNRcMdRAhqjGWNv777",
            "example": "LiGHtkg3uTa9836RaNkKLLriqTNRcMdRAhqjGWNv777"
          },
          "payer": {
            "type": "string",
            "description": "Payer of the transaction",
            "default": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zk",
            "example": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zk"
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program",
            "default": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o",
            "example": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"
          },
          "version": {
            "type": "integer",
            "description": "Protocol config version of the liquidity pool",
            "default": 2,
            "minimum": 0
          }
        }
      },
      "CreateClaimCreatorTradingFeeTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded transaction"
          }
        }
      },
      "CreateSellTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "quote_response",
          "encoded_user_defined_event_data"
        ],
        "properties": {
          "compute_unit_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional compute unit limit for the transaction",
            "default": 200000,
            "example": 200000,
            "minimum": 0
          },
          "compute_unit_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional compute unit price for the transaction",
            "default": 40000000,
            "example": 40000000,
            "minimum": 0
          },
          "encoded_user_defined_event_data": {
            "type": "string",
            "description": "Encoded user defined event data",
            "example": "custom_event_data"
          },
          "payer": {
            "type": "string",
            "description": "Payer of the transaction",
            "example": "G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K"
          },
          "quote_response": {
            "$ref": "#/components/schemas/QuoteSellResponse",
            "description": "The full quote response object from the Quote Sell endpoint. Pass the entire response without modification."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional source token account for the sell operation. If not provided, the payer's associated token account will be used.",
            "example": "G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K"
          }
        }
      },
      "CreateSellTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded transaction"
          }
        }
      },
      "CreateStandardLiquidityPoolTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "creator",
          "encoded_user_defined_event_data",
          "name",
          "uri",
          "symbol",
          "config_version",
          "program_id",
          "initial_purchase_amount",
          "lut_address"
        ],
        "properties": {
          "compute_unit_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Compute unit limit for the transaction",
            "example": 400000,
            "minimum": 0
          },
          "compute_unit_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Compute unit price for the transaction",
            "example": 2000000,
            "minimum": 0
          },
          "config_version": {
            "type": "integer",
            "description": "Protocol config version",
            "default": 1,
            "minimum": 0
          },
          "creator": {
            "type": "string",
            "description": "Creator of the liquidity pool",
            "example": "3N6yV1v1f6Yz8bX9n4bF7vZ5X9J8vY9X9J8vY9X9J8vY"
          },
          "encoded_user_defined_event_data": {
            "type": "string",
            "description": "Arbitrary string data emitted as an on-chain event for tracking."
          },
          "initial_purchase_amount": {
            "type": "integer",
            "description": "Initial purchase amount of token A in native amount. Please use /quote/initial-buy to estimate required SOL amount.",
            "example": 1000000,
            "minimum": 0
          },
          "lut_address": {
            "type": "string",
            "description": "Please use `3DENDMbqpVuarsEvk3MYJMpcZqsrQanK8Z8cVeDf53oR` for Community Token (1), and `4utvsPEpB2EYKKAh1UXgRfVteYamYmoUnTvetQKvcZMA` for Creator Token (2)",
            "default": "3DENDMbqpVuarsEvk3MYJMpcZqsrQanK8Z8cVeDf53oR",
            "example": "3DENDMbqpVuarsEvk3MYJMpcZqsrQanK8Z8cVeDf53oR"
          },
          "max_sol_spend": {
            "type": [
              "number",
              "null"
            ],
            "description": "Maximum amount of SOL to spend for the initial buy operation",
            "example": 1.0
          },
          "name": {
            "type": "string",
            "description": "Name of the token",
            "example": "My Token"
          },
          "payer": {
            "type": "string",
            "description": "Payer of the transaction",
            "example": "3N6yV1v1f6Yz8bX9n4bF7vZ5X9J8vY9X9J8vY9X9J8vY"
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program",
            "default": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o",
            "example": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"
          },
          "symbol": {
            "type": "string",
            "description": "Symbol of the token",
            "example": "MYTKN"
          },
          "uri": {
            "type": "string",
            "description": "URI of the token metadata",
            "example": "https://mytoken.com/metadata.json"
          }
        }
      },
      "CreateStandardLiquidityPoolTxResponse": {
        "type": "object",
        "required": [
          "tx",
          "mint"
        ],
        "properties": {
          "mint": {
            "type": "string",
            "description": "Mint address of the newly created token"
          },
          "tx": {
            "type": "string",
            "description": "Base64 encoded transaction"
          }
        }
      },
      "FetchLiquidityPoolInfoRequest": {
        "type": "object",
        "required": [
          "program_id",
          "mint"
        ],
        "properties": {
          "mint": {
            "type": "string",
            "description": "Mint address of the token",
            "default": "LiGHtkg3uTa9836RaNkKLLriqTNRcMdRAhqjGWNv777",
            "example": "LiGHtkg3uTa9836RaNkKLLriqTNRcMdRAhqjGWNv777"
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program",
            "default": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o",
            "example": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"
          }
        }
      },
      "FetchLiquidityPoolInfoResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LiquidityPoolInfo",
            "description": "Detailed pool information object."
          }
        }
      },
      "FetchLiquidityPoolStateRequest": {
        "type": "object",
        "required": [
          "program_id",
          "mint"
        ],
        "properties": {
          "mint": {
            "type": "string",
            "description": "Mint address of the token",
            "default": "LiGHtkg3uTa9836RaNkKLLriqTNRcMdRAhqjGWNv777",
            "example": "LiGHtkg3uTa9836RaNkKLLriqTNRcMdRAhqjGWNv777"
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program",
            "default": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o",
            "example": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"
          }
        }
      },
      "FetchLiquidityPoolStateResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string",
            "description": "JSON encoded LiquidityPoolState struct"
          }
        }
      },
      "FetchProtocolConfigRequest": {
        "type": "object",
        "required": [
          "config_version",
          "program_id"
        ],
        "properties": {
          "config_version": {
            "type": "integer",
            "description": "Protocol config version",
            "default": 1,
            "minimum": 0
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program",
            "default": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o",
            "example": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"
          }
        }
      },
      "FetchProtocolConfigResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string",
            "description": "JSON encoded ProtocolConfig struct"
          }
        }
      },
      "LiquidityPoolInfo": {
        "type": "object",
        "required": [
          "creator",
          "protocol_config_version",
          "trading_volume_threshold_usd",
          "current_buy_fee_pct",
          "current_sell_fee_pct",
          "current_trading_volume_usd",
          "current_creator_fee_recipient",
          "current_creator_fee_claim_status",
          "current_creator_fee_distribution",
          "is_creator_fee_claimable",
          "current_market_cap_usd",
          "current_base_reserve",
          "current_quote_reserve",
          "current_sol_price_usd",
          "current_creator_fee_collected_sol",
          "current_creator_fee_collected_usd",
          "current_creator_fee_claim_by_creator",
          "is_migrated",
          "migration_market_cap_threshold",
          "classification"
        ],
        "properties": {
          "classification": {
            "$ref": "#/components/schemas/TokenClassification",
            "description": "Token classification (Creator, Community, or Blocked)."
          },
          "creator": {
            "type": "string",
            "description": "Creator of the liquidity pool",
            "example": "G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K"
          },
          "current_base_reserve": {
            "type": "number",
            "description": "Current base reserve in UI amount"
          },
          "current_buy_fee_pct": {
            "type": "number",
            "description": "Current buy fee percentage e.g. 1.5 for 1.5%"
          },
          "current_creator_fee_claim_by_creator": {
            "type": "number",
            "description": "Current creator fee claimed by creator in SOL"
          },
          "current_creator_fee_claim_status": {
            "type": "string",
            "description": "Current creator fee claim status",
            "example": "Unclaimed, Submitted, Processed"
          },
          "current_creator_fee_collected_sol": {
            "type": "number",
            "description": "Current creator fee collected in SOL"
          },
          "current_creator_fee_collected_usd": {
            "type": "number",
            "description": "Current creator fee collected in USD"
          },
          "current_creator_fee_distribution": {
            "type": "string",
            "description": "Current creator fee distribution",
            "example": "Community, Creator, Blocked, Shared"
          },
          "current_creator_fee_recipient": {
            "type": "string",
            "description": "Current creator fee recipient",
            "example": "G2pX3b4Y8m7v5xX9L5f6y7z8A9B0C1D2E3F4G5H6I7J8K"
          },
          "current_market_cap_usd": {
            "type": "number",
            "description": "Current FDV in USD"
          },
          "current_quote_reserve": {
            "type": "number",
            "format": "Current quote reserve in UI amount",
            "description": "Current SOL reserve in the pool (lamports)."
          },
          "current_sell_fee_pct": {
            "type": "number",
            "description": "Current sell fee percentage e.g. 1.5 for 1.5%"
          },
          "current_sol_price_usd": {
            "type": "number",
            "description": "Current SOL price in USD"
          },
          "current_trading_volume_usd": {
            "type": "number",
            "description": "Current trading volume in USD"
          },
          "is_creator_fee_claimable": {
            "type": "boolean",
            "description": "Indicates if the creator fee is claimable by the creator"
          },
          "is_migrated": {
            "type": "boolean",
            "description": "Indicates if the pool has reached migration threshold"
          },
          "migration_market_cap_threshold": {
            "type": "integer",
            "description": "Market cap threshold in USD for migration eligibility",
            "minimum": 0
          },
          "protocol_config_version": {
            "type": "integer",
            "description": "Protocol config version of the liquidity pool",
            "minimum": 0
          },
          "trading_volume_threshold_usd": {
            "type": "number",
            "description": "Trading volume threshold in USD for creator fee claim"
          }
        }
      },
      "QuoteBuyRequest": {
        "type": "object",
        "required": [
          "config_version",
          "mint",
          "program_id",
          "max_sol_spend",
          "slippage_bps"
        ],
        "properties": {
          "config_version": {
            "type": "integer",
            "description": "Use 1 for Community Token and 2 for Creator Token",
            "default": 1,
            "minimum": 0
          },
          "max_sol_spend": {
            "type": "number",
            "description": "Maximum amount of SOL to spend for the buy operation",
            "example": 1.0
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the token",
            "example": "LiGHtkg3uTa9836RaNkKLLriqTNRcMdRAhqjGWNv777"
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program",
            "default": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"
          },
          "slippage_bps": {
            "type": "integer",
            "description": "Slippage in basis points (bps), e.g., 50 bps = 0.5%",
            "example": 50,
            "minimum": 0
          }
        }
      },
      "QuoteBuyResponse": {
        "type": "object",
        "required": [
          "max_sol_spend",
          "max_lamport_spend",
          "minimum_out",
          "minimum_out_ui",
          "config_version",
          "mint",
          "program_id",
          "slippage_bps"
        ],
        "properties": {
          "config_version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version used for the quote."
          },
          "max_lamport_spend": {
            "type": "integer",
            "description": "Maximum amount of lamports to spend for the buy operation",
            "minimum": 0
          },
          "max_sol_spend": {
            "type": "number",
            "description": "Maximum amount of SOL to spend for the buy operation"
          },
          "minimum_out": {
            "type": "integer",
            "description": "Minimum amount of tokens to receive from the buy operation",
            "minimum": 0
          },
          "minimum_out_ui": {
            "type": "number",
            "description": "Minimum amount of tokens to receive from the buy operation in UI format"
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the token being bought."
          },
          "program_id": {
            "type": "string",
            "description": "Heaven DEX program ID used."
          },
          "slippage_bps": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Slippage tolerance applied (basis points)."
          }
        }
      },
      "QuoteInitialBuyRequest": {
        "type": "object",
        "required": [
          "config_version",
          "program_id",
          "initial_purchase_percent"
        ],
        "properties": {
          "config_version": {
            "type": "integer",
            "description": "Protocol config version",
            "default": 1,
            "minimum": 0
          },
          "initial_purchase_percent": {
            "type": "number",
            "description": "Percentage of the initial token A amount to purchase (e.g., 1 for 1%)",
            "default": 1.0,
            "example": 1.0
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program",
            "default": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o",
            "example": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"
          },
          "slippage_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Slippage percentage (e.g., 0.005 for 0.5%)",
            "default": 0.005,
            "example": 0.005
          }
        }
      },
      "QuoteInitialBuyResponse": {
        "type": "object",
        "required": [
          "cost_sol",
          "cost_usd",
          "cost_lamports",
          "initial_purchase_amount",
          "initial_purchase_amount_ui"
        ],
        "properties": {
          "cost_lamports": {
            "type": "integer",
            "description": "Cost of the initial purchase in lamports",
            "minimum": 0
          },
          "cost_sol": {
            "type": "number",
            "description": "Cost of the initial purchase in SOL"
          },
          "cost_usd": {
            "type": "number",
            "description": "Cost of the initial purchase in USD"
          },
          "initial_purchase_amount": {
            "type": "integer",
            "description": "Amount of tokens to purchase in the initial buy",
            "minimum": 0
          },
          "initial_purchase_amount_ui": {
            "type": "number",
            "description": "Amount of tokens to purchase in the initial buy in UI format"
          }
        }
      },
      "QuoteSellRequest": {
        "type": "object",
        "required": [
          "config_version",
          "mint",
          "program_id",
          "amount_in_ui",
          "slippage_bps"
        ],
        "properties": {
          "amount_in_ui": {
            "type": "number",
            "description": "Amount of tokens to sell in UI format",
            "example": 100.0
          },
          "config_version": {
            "type": "integer",
            "description": "Use 1 for Community Token and 2 for Creator Token",
            "default": 1,
            "minimum": 0
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the token",
            "example": "LiGHtkg3uTa9836RaNkKLLriqTNRcMdRAhqjGWNv777"
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program",
            "default": "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o"
          },
          "slippage_bps": {
            "type": "integer",
            "description": "Slippage in basis points (bps), e.g., 50 bps = 0.5%",
            "example": 50,
            "minimum": 0
          }
        }
      },
      "QuoteSellResponse": {
        "type": "object",
        "required": [
          "amount_in",
          "amount_in_ui",
          "minimum_out",
          "minimum_out_ui",
          "config_version",
          "mint",
          "program_id",
          "slippage_bps"
        ],
        "properties": {
          "amount_in": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Amount of tokens to sell (native units)."
          },
          "amount_in_ui": {
            "type": "number",
            "format": "double",
            "description": "Amount of tokens to sell (human-readable with decimals)."
          },
          "config_version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version used for the quote."
          },
          "minimum_out": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Minimum SOL output after slippage (lamports)."
          },
          "minimum_out_ui": {
            "type": "number",
            "format": "double",
            "description": "Minimum SOL output after slippage (human-readable)."
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the token being sold."
          },
          "program_id": {
            "type": "string",
            "description": "Heaven DEX program ID used."
          },
          "slippage_bps": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Slippage tolerance applied (basis points)."
          }
        }
      },
      "TokenClassification": {
        "type": "string",
        "enum": [
          "Community",
          "Creator"
        ]
      },
      "CreateProLiquidityPoolTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "creator",
          "encoded_user_defined_event_data",
          "config_version",
          "program_id",
          "mint",
          "initial_token_a_amount",
          "initial_token_b_amount",
          "lut_address"
        ],
        "properties": {
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "creator": {
            "type": "string",
            "description": "Public key of the pool creator. This wallet will have creator privileges (toggle features, set fees, claim creator fees)."
          },
          "encoded_user_defined_event_data": {
            "type": "string",
            "description": "Arbitrary string data emitted as an on-chain event. Useful for tracking or attributing transactions."
          },
          "config_version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version. Use 1 for community tokens, 2 for creator tokens, 3 for pro pools."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the SPL token (token A) in the pool."
          },
          "initial_token_a_amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Amount of token A (in native/smallest units) to deposit as initial liquidity. Must be large enough to satisfy the minimum liquidity requirement."
          },
          "initial_token_b_amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Amount of SOL (in lamports) to deposit as initial liquidity. Together with token A, this sets the initial price."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          },
          "lut_address": {
            "type": "string",
            "description": "Address of an on-chain Address Lookup Table (ALT) to compress the transaction size."
          },
          "features": {
            "$ref": "#/components/schemas/PoolFeatureToggles",
            "nullable": true,
            "description": "Optional feature toggles for the pool. Controls whether swapping, deposits, withdrawals, and other features are enabled at creation time. All default to sensible values if omitted."
          },
          "creator_trading_fee": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeBracketInput"
            },
            "nullable": true,
            "description": "Creator trading fee brackets. Up to 4 brackets with market cap thresholds. Uses protocol config defaults if omitted."
          },
          "creator_slot_trading_fee": {
            "$ref": "#/components/schemas/SlotFeeInput",
            "nullable": true,
            "description": "Optional slot-offset based creator fee for sniper resistance. When active, takes precedence over market cap based creator fees."
          },
          "reflection_trading_fee": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeBracketInput"
            },
            "nullable": true,
            "description": "Optional reflection trading fee brackets. Reflection fees are distributed to token holders. Uses protocol defaults if omitted."
          },
          "liquidity_provider_trading_fee": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeBracketInput"
            },
            "nullable": true,
            "description": "Optional LP provider trading fee brackets. LP fees are distributed to liquidity providers. Uses protocol defaults if omitted."
          }
        },
        "description": "Request to create a new pro liquidity pool. Unlike standard pools, pro pools use an existing SPL token and give creators full control over initial liquidity, fee structure, and pool features."
      },
      "CreateProLiquidityPoolTxResponse": {
        "type": "object",
        "required": [
          "tx",
          "pool"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the payer (and creator if different), and submit to the Solana network."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the newly created pool state account. Save this to interact with the pool later."
          }
        }
      },
      "CreateProBuyTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "quote_response",
          "encoded_user_defined_event_data",
          "pool"
        ],
        "properties": {
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "quote_response": {
            "$ref": "#/components/schemas/QuoteBuyResponse",
            "description": "The full quote response object from the Quote Pro Buy endpoint. Contains the calculated amounts, fees, and slippage parameters."
          },
          "encoded_user_defined_event_data": {
            "type": "string",
            "description": "Arbitrary string data emitted as an on-chain event. Useful for tracking or attributing transactions."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "Optional source wallet. If different from payer, tokens will be debited from this wallet. Defaults to payer if omitted."
          }
        },
        "description": "Request to create a buy transaction for a pro pool. First call Quote Pro Buy to get the quote_response, then pass it here."
      },
      "CreateProBuyTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the payer, and submit to the Solana network."
          }
        }
      },
      "CreateProSellTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "quote_response",
          "encoded_user_defined_event_data",
          "pool"
        ],
        "properties": {
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "quote_response": {
            "$ref": "#/components/schemas/QuoteSellResponse",
            "description": "The full quote response object from the Quote Pro Sell endpoint. Contains the calculated amounts, fees, and slippage parameters."
          },
          "encoded_user_defined_event_data": {
            "type": "string",
            "description": "Arbitrary string data emitted as an on-chain event. Useful for tracking or attributing transactions."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "Optional source wallet. If different from payer, tokens will be debited from this wallet. Defaults to payer if omitted."
          }
        },
        "description": "Request to create a sell transaction for a pro pool. First call Quote Pro Sell to get the quote_response, then pass it here."
      },
      "CreateProSellTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the payer, and submit to the Solana network."
          }
        }
      },
      "QuoteProBuyRequest": {
        "type": "object",
        "required": [
          "config_version",
          "mint",
          "program_id",
          "max_sol_spend",
          "slippage_bps",
          "pool"
        ],
        "properties": {
          "config_version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version. Use 1 for community tokens, 2 for creator tokens, 3 for pro pools."
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the SPL token (token A) in the pool."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "max_sol_spend": {
            "type": "number",
            "format": "double",
            "description": "Maximum SOL to spend (in SOL, not lamports). For example, 1.5 means 1.5 SOL."
          },
          "slippage_bps": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Maximum acceptable slippage in basis points. 50 = 0.5%. Set to 0 for no slippage tolerance."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          }
        },
        "description": "Request a buy quote for a pro pool. Returns the estimated token output and fee breakdown."
      },
      "QuoteProSellRequest": {
        "type": "object",
        "required": [
          "config_version",
          "mint",
          "program_id",
          "amount_in_ui",
          "slippage_bps",
          "pool"
        ],
        "properties": {
          "config_version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version. Use 1 for community tokens, 2 for creator tokens, 3 for pro pools."
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the SPL token (token A) in the pool."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "amount_in_ui": {
            "type": "number",
            "format": "double",
            "description": "Amount of tokens to sell in UI format (human-readable with decimals). For example, 1000.5 for a 9-decimal token means 1000500000000 native units."
          },
          "slippage_bps": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Maximum acceptable slippage in basis points. 50 = 0.5%. Set to 0 for no slippage tolerance."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          }
        },
        "description": "Request a sell quote for a pro pool. Returns the estimated SOL output and fee breakdown."
      },
      "AddLiquidityProPoolTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "mint",
          "config_version",
          "program_id",
          "max_token_a",
          "max_token_b",
          "min_lp_tokens",
          "pool"
        ],
        "properties": {
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the SPL token (token A) in the pool."
          },
          "config_version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version. Use 1 for community tokens, 2 for creator tokens, 3 for pro pools."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "max_token_a": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Maximum amount of token A (native units) to deposit. The actual amount may be less to maintain the pool ratio."
          },
          "max_token_b": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Maximum amount of SOL (lamports) to deposit. The actual amount may be less to maintain the pool ratio."
          },
          "min_lp_tokens": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Minimum LP tokens to receive. Set to 0 to accept any amount. Higher values protect against slippage."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Deposit liquidity to a pro pool. The amounts deposited will be proportional to the current pool reserves. You receive LP tokens representing your share of the pool."
      },
      "AddLiquidityProPoolTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign, and submit."
          }
        }
      },
      "RemoveLiquidityProPoolTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "mint",
          "config_version",
          "program_id",
          "lp_tokens_to_burn",
          "min_token_a",
          "min_token_b",
          "pool"
        ],
        "properties": {
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the SPL token (token A) in the pool."
          },
          "config_version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version. Use 1 for community tokens, 2 for creator tokens, 3 for pro pools."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "lp_tokens_to_burn": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Amount of LP tokens to burn. You will receive token A and SOL proportional to your pool share."
          },
          "min_token_a": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Minimum amount of token A to receive. Protects against slippage."
          },
          "min_token_b": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Minimum amount of SOL (lamports) to receive. Protects against slippage."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Withdraw liquidity from a pro pool by burning LP tokens. You receive token A and SOL proportional to your share of the pool."
      },
      "RemoveLiquidityProPoolTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign, and submit."
          }
        }
      },
      "ClaimProCreatorFeesTxRequest": {
        "type": "object",
        "required": [
          "mint",
          "version",
          "payer",
          "program_id",
          "amount",
          "pool"
        ],
        "properties": {
          "mint": {
            "type": "string",
            "description": "Mint address of the SPL token (token A) in the pool."
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version for the pool."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Amount of creator trading fees (in lamports) to claim."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Claim accumulated creator trading fees from a pro pool. The payer must be the pool creator or the designated fee receiver."
      },
      "ClaimProCreatorFeesTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign, and submit."
          }
        }
      },
      "ClaimProLpFeesTxRequest": {
        "type": "object",
        "required": [
          "payer",
          "mint",
          "config_version",
          "program_id",
          "pool"
        ],
        "properties": {
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the SPL token (token A) in the pool."
          },
          "config_version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version. Use 1 for community tokens, 2 for creator tokens, 3 for pro pools."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Claim accumulated LP provider trading fees from a pro pool. Only users with an active LP position can claim."
      },
      "ClaimProLpFeesTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign, and submit."
          }
        }
      },
      "ProToggleSwapTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "payer",
          "program_id",
          "enabled"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "enabled": {
            "type": "boolean",
            "description": "Set to `true` to enable the feature, `false` to disable it."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Request to toggle swapping on a pro pool. Only the pool creator can call this."
      },
      "ProToggleSwapTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the creator wallet, and submit to the Solana network."
          }
        }
      },
      "ProToggleDepositTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "payer",
          "program_id",
          "enabled"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "enabled": {
            "type": "boolean",
            "description": "Set to `true` to enable the feature, `false` to disable it."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Request to toggle liquidity deposits on a pro pool. Only the pool creator can call this."
      },
      "ProToggleDepositTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the creator wallet, and submit to the Solana network."
          }
        }
      },
      "ProToggleWithdrawTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "payer",
          "program_id",
          "enabled"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "enabled": {
            "type": "boolean",
            "description": "Set to `true` to enable the feature, `false` to disable it."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Request to toggle liquidity withdrawals on a pro pool. Only the pool creator can call this."
      },
      "ProToggleWithdrawTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the creator wallet, and submit to the Solana network."
          }
        }
      },
      "ProSetMarketCapCreatorFeeTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "payer",
          "program_id",
          "brackets"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "brackets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeBracketInput"
            },
            "description": "Array of fee brackets (max 4). Each bracket defines buy/sell fees in basis points below a market cap threshold. Brackets should be ordered by ascending market_cap_upper_bound."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Set market cap based creator trading fee brackets on a pro pool. Allows the creator to define different fee rates at different market cap levels. Only the pool creator can call this."
      },
      "ProSetMarketCapCreatorFeeTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the creator wallet, and submit."
          }
        }
      },
      "ProSetSlotCreatorFeeTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "payer",
          "program_id",
          "brackets",
          "max_slot_offset",
          "max_fee_bps",
          "enabled"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "brackets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlotFeeBracketInput"
            },
            "description": "Array of slot fee brackets (max 42). Each bracket defines buy/sell fees at a specific slot offset range from pool creation."
          },
          "max_slot_offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Maximum slot offset at which slot-based fees apply. After this many slots, the fees revert to normal."
          },
          "max_fee_bps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Maximum fee in basis points across all slot brackets."
          },
          "enabled": {
            "type": "boolean",
            "description": "Set to `true` to enable slot-based fees, `false` to disable them."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Set slot-offset based creator fee brackets on a pro pool. Useful for implementing time-decaying fees (e.g. high fees right after launch for sniper resistance that decay over slots)."
      },
      "ProSetSlotCreatorFeeTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the creator wallet, and submit."
          }
        }
      },
      "ProUpdateCreatorFeeReceiverTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "mint",
          "version",
          "payer",
          "new_receiver",
          "program_id"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "mint": {
            "type": "string",
            "description": "Mint address of the SPL token (token A) in the pool."
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Protocol config version for the pool."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "new_receiver": {
            "type": "string",
            "description": "Public key of the new wallet that will receive future creator trading fees. This wallet must also sign the transaction."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Transfer the creator fee receiver to a new wallet. Both the current creator and the new receiver must sign the transaction. The pool must have its fee claim status set to \"Processed\" and fee distribution set to \"Creator\"."
      },
      "ProUpdateCreatorFeeReceiverTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Requires two signatures: the current creator (index 0) and the new receiver (index 1)."
          }
        }
      },
      "ProTransferLpTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "sender",
          "payer",
          "receiver",
          "program_id",
          "amount"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "sender": {
            "type": "string",
            "description": "Public key of the LP token sender. Must be a signer."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the wallet that will sign and pay for the transaction."
          },
          "receiver": {
            "type": "string",
            "description": "Public key of the LP token receiver. A new LP position will be created for them if one does not exist."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          },
          "amount": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Amount of LP tokens to transfer."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction. Higher values allow more complex operations but cost more. Defaults to a sensible value if omitted."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit. Higher values increase transaction priority. Defaults to a sensible value if omitted."
          }
        },
        "description": "Transfer LP tokens from one user to another within a pro pool. The receiver will get a new LP position PDA if they don't have one yet. The payer covers the account creation rent."
      },
      "ProTransferLpTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the sender (and payer if different), and submit."
          }
        }
      },
      "FetchLpBalanceRequest": {
        "type": "object",
        "required": [
          "pool",
          "user",
          "program_id"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account. Returned in the response when creating a pool."
          },
          "user": {
            "type": "string",
            "description": "Public key of the wallet to check the LP balance for."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program. Use `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet."
          }
        },
        "description": "Query a user's LP token balance in a pro pool. Returns zero values if the user has never added liquidity."
      },
      "FetchLpBalanceResponse": {
        "type": "object",
        "required": [
          "lp_token_balance",
          "reward_debt",
          "pending_fees",
          "lp_position_address",
          "exists"
        ],
        "properties": {
          "lp_token_balance": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Current LP token balance for this user in the pool."
          },
          "reward_debt": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Accumulated reward debt used internally for fee distribution calculations."
          },
          "pending_fees": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Pending trading fees claimable by this LP position."
          },
          "lp_position_address": {
            "type": "string",
            "description": "On-chain PDA address of the user's LP position account."
          },
          "exists": {
            "type": "boolean",
            "description": "Whether the LP position account exists on-chain. False if the user has never added liquidity to this pool."
          }
        },
        "description": "LP position information for a user in a pro pool."
      },
      "PoolFeatureToggles": {
        "type": "object",
        "properties": {
          "enable_swap": {
            "type": "boolean",
            "nullable": true,
            "description": "Allow users to buy and sell tokens in this pool. Default: true."
          },
          "enable_deposit_liquidity": {
            "type": "boolean",
            "nullable": true,
            "description": "Allow users to deposit liquidity to this pool. Default: true."
          },
          "enable_withdraw_liquidity": {
            "type": "boolean",
            "nullable": true,
            "description": "Allow users to withdraw liquidity from this pool. Default: true."
          },
          "enable_update_creator_trading_fee": {
            "type": "boolean",
            "nullable": true,
            "description": "Allow the creator to update trading fee brackets after pool creation. Default: true."
          },
          "enable_same_slot_trading": {
            "type": "boolean",
            "nullable": true,
            "description": "Allow buying and selling in the same Solana slot (same transaction). Default: false."
          },
          "enable_sandwich_resistant_mode": {
            "type": "boolean",
            "nullable": true,
            "description": "Enable sandwich attack resistance. When enabled, trades are protected against MEV sandwich attacks. Default: false."
          }
        },
        "description": "Feature toggles for a pro pool. All fields are optional and default to sensible values."
      },
      "FeeBracketInput": {
        "type": "object",
        "description": "A single fee bracket for market cap based fees. Fees apply when the pool market cap is below the upper bound. Brackets are evaluated from lowest to highest market_cap_upper_bound.",
        "required": [
          "market_cap_upper_bound",
          "buy_fee_bps",
          "sell_fee_bps"
        ],
        "properties": {
          "market_cap_upper_bound": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Upper bound of this bracket in USD (as integer). Use max int64 (9223372036854775807) for the final bracket to cover all market caps above the previous bracket.",
            "example": 100000000000
          },
          "buy_fee_bps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Fee charged on buy transactions in basis points (1 bps = 0.01%). For example, 100 = 1%.",
            "example": 100
          },
          "sell_fee_bps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Fee charged on sell transactions in basis points (1 bps = 0.01%). For example, 100 = 1%.",
            "example": 100
          }
        },
        "example": {
          "market_cap_upper_bound": 100000000000,
          "buy_fee_bps": 100,
          "sell_fee_bps": 100
        }
      },
      "SlotFeeBracketInput": {
        "type": "object",
        "description": "A single fee bracket for slot-offset based fees. Higher fees at lower slot offsets can be used for sniper resistance. Slots are ~400ms on Solana, so 5 slots \u2248 2 seconds.",
        "required": [
          "buy_fee_bps",
          "sell_fee_bps",
          "slot_offset_upperbound"
        ],
        "properties": {
          "buy_fee_bps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Fee charged on buy transactions in basis points for this slot offset range.",
            "example": 5000
          },
          "sell_fee_bps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Fee charged on sell transactions in basis points for this slot offset range.",
            "example": 5000
          },
          "slot_offset_upperbound": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Upper bound of this bracket in slots since pool creation. Slots are ~400ms on Solana.",
            "example": 5
          }
        },
        "example": {
          "buy_fee_bps": 5000,
          "sell_fee_bps": 5000,
          "slot_offset_upperbound": 5
        }
      },
      "SlotFeeInput": {
        "type": "object",
        "description": "Slot-offset based fee configuration for sniper resistance. Fees decay as more slots pass since pool creation. When active, slot fees take precedence over market cap fees.",
        "required": [
          "brackets",
          "max_slot_offset",
          "max_fee_bps",
          "enabled"
        ],
        "properties": {
          "brackets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlotFeeBracketInput"
            },
            "description": "Array of slot fee brackets (max 42). Each defines buy/sell fees at a slot offset range. Must be ordered by ascending slot_offset_upperbound."
          },
          "max_slot_offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Maximum slot offset at which slot-based fees apply. After this many slots (~400ms each), fees revert to market cap based fees.",
            "example": 15
          },
          "max_fee_bps": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "description": "Maximum fee in basis points across all slot brackets.",
            "example": 5000
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether slot-based fees are active.",
            "example": true
          }
        },
        "example": {
          "brackets": [
            {
              "buy_fee_bps": 5000,
              "sell_fee_bps": 5000,
              "slot_offset_upperbound": 5
            },
            {
              "buy_fee_bps": 1000,
              "sell_fee_bps": 1000,
              "slot_offset_upperbound": 15
            }
          ],
          "max_slot_offset": 15,
          "max_fee_bps": 5000,
          "enabled": true
        }
      },
      "ProSetReflectionFeeTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "payer",
          "program_id",
          "brackets"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the pool creator wallet."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program."
          },
          "brackets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeBracketInput"
            },
            "description": "Fee brackets (max 4). Each defines buy/sell basis points below a market cap threshold."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit."
          }
        },
        "description": "Request to set reflection trading fee brackets on a pro pool."
      },
      "ProSetReflectionFeeTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the creator wallet, and submit."
          }
        }
      },
      "ProSetLpFeeTxRequest": {
        "type": "object",
        "required": [
          "pool",
          "payer",
          "program_id",
          "brackets"
        ],
        "properties": {
          "pool": {
            "type": "string",
            "description": "On-chain address of the pro pool state account."
          },
          "payer": {
            "type": "string",
            "description": "Public key of the pool creator wallet."
          },
          "program_id": {
            "type": "string",
            "description": "Program ID of the Heaven DEX program."
          },
          "brackets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeeBracketInput"
            },
            "description": "Fee brackets (max 4). Each defines buy/sell basis points below a market cap threshold."
          },
          "compute_unit_limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "description": "Maximum compute units for the transaction."
          },
          "compute_unit_price": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "description": "Priority fee in micro-lamports per compute unit."
          }
        },
        "description": "Request to set LP provider trading fee brackets on a pro pool."
      },
      "ProSetLpFeeTxResponse": {
        "type": "object",
        "required": [
          "tx"
        ],
        "properties": {
          "tx": {
            "type": "string",
            "description": "Base64 encoded versioned transaction. Decode, sign with the creator wallet, and submit."
          }
        }
      }
    },
    "securitySchemes": {
      "x-api-key": {
        "type": "apiKey",
        "in": "header",
        "name": "apikey"
      }
    }
  },
  "tags": [
    {
      "name": "heaven-api",
      "description": "Heaven API"
    }
  ]
}
