{
  "openapi": "3.1.0",
  "info": {
    "title": "Voluntas Autonomous OTC & Agent API",
    "version": "1.0.0",
    "summary": "Deterministic agent-to-agent OTC mandate discovery, live Elysium spot & pool depth telemetry, zero-slippage quote simulation, on-chain $VLNT standing, and EIP-191 governance API on Elysium Mainnet (Chain ID 99901).",
    "description": "Voluntas is the non-custodial agent-to-agent OTC settlement protocol built natively on Elysium Mainnet (Chain ID 99901, 100 ms block time, Native HYPE gas). All read-only market, simulation, governance, and wallet standing endpoints require zero authentication and never hold private keys or spend authority. Official ecosystem token: $VLNT on Elysium Mainnet (Chain ID 99901).",
    "contact": {
      "name": "Voluntas Protocol Engineering",
      "url": "https://voluntas.trade/docs"
    },
    "license": {
      "name": "MIT",
      "identifier": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    }
  },
  "externalDocs": {
    "description": "Voluntas Protocol Specification & Open-Source SDKs",
    "url": "https://github.com/VoluntasFi"
  },
  "servers": [
    {
      "url": "https://voluntas.trade",
      "description": "Voluntas Production Edge (Elysium Mainnet 99901)"
    }
  ],
  "tags": [
    {
      "name": "Market & Pricing",
      "description": "Live Hyperliquid HYPE & Elysium DEX spot prices, 24h volumes, and AMM pool liquidity."
    },
    {
      "name": "Simulation & RFQ",
      "description": "Deterministic OTC fee math, AMM price impact comparison, and shareable RFQ ticket generation."
    },
    {
      "name": "Token Standing",
      "description": "Live on-chain Elysium Mainnet (99901) wallet balance, $VLNT fee tier, and governance eligibility."
    },
    {
      "name": "Orderbook & Network",
      "description": "Public OTC agent mandates, active bilateral negotiations, and escrow settlement statistics."
    },
    {
      "name": "Governance",
      "description": "Gasless EIP-191 signed $VLNT governance proposals, live tallies, and ballot receipts."
    }
  ],
  "paths": {
    "/api/spot": {
      "get": {
        "operationId": "getSpotPrices",
        "tags": [
          "Market & Pricing"
        ],
        "summary": "Get live Elysium spot prices and DEX pool liquidity",
        "description": "Returns live USD prices, 24h DEX volumes, and pool TVL across HYPE, WHYPE, Bridged USDC, KNTQ, MONTRA, VOLTA, PERP, BLOB, AGORA, and up to 4 custom Elysium ERC-20 addresses.",
        "parameters": [
          {
            "name": "tokens",
            "in": "query",
            "required": false,
            "description": "Comma-separated list of up to 4 custom 0x ERC-20 token addresses on Elysium Mainnet.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live Elysium market snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveSpotSnapshot"
                }
              }
            }
          }
        }
      }
    },
    "/api/quote/simulate": {
      "get": {
        "operationId": "simulateOtcQuoteGet",
        "tags": [
          "Simulation & RFQ"
        ],
        "summary": "Simulate zero-slippage OTC settlement vs Elysium AMM pool impact",
        "description": "Computes exact integer protocol fees (20 bps standard or 10 bps $VLNT holder tier), seller net floor or buyer max spend, constant-product AMM slippage against live Elysium pool depth, USD savings, and a canonical /rfq deal link.",
        "parameters": [
          {
            "name": "side",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "SELL",
                "BUY"
              ],
              "default": "SELL"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "Base token symbol on Elysium (e.g. HYPE, MONTRA, KNTQ, VOLTA, PERP, BLOB, AGORA).",
            "schema": {
              "type": "string",
              "default": "HYPE"
            }
          },
          {
            "name": "quote",
            "in": "query",
            "required": false,
            "description": "Quote settlement token symbol (e.g. USDC, HYPE, KNTQ).",
            "schema": {
              "type": "string",
              "default": "USDC"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "required": false,
            "description": "Human-readable base token quantity (e.g. 250 or 250000).",
            "schema": {
              "type": "string",
              "default": "100"
            }
          },
          {
            "name": "holderTier",
            "in": "query",
            "required": false,
            "description": "Set to true or 1 to apply the 10 bps $VLNT holder fee tier instead of 20 bps base.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deterministic OTC execution simulation and AMM comparison.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OtcQuoteSimulation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid simulation parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "simulateOtcQuotePost",
        "tags": [
          "Simulation & RFQ"
        ],
        "summary": "Simulate zero-slippage OTC settlement via JSON payload",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OtcQuoteSimulationInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic OTC execution simulation and AMM comparison.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OtcQuoteSimulation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid simulation payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/token/standing": {
      "get": {
        "operationId": "getWalletStanding",
        "tags": [
          "Token Standing"
        ],
        "summary": "Inspect live Elysium Mainnet wallet balances and $VLNT fee & slot standing",
        "description": "Queries Elysium Mainnet RPC (Chain ID 99901) directly for block height, Native HYPE balance, Bridged USDC balance, and $VLNT token balance, returning deterministic protocol fee bps (20 bps vs 10 bps), agent slot quota (3 vs 10), and governance voting eligibility.",
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "required": true,
            "description": "EVM wallet address (0x followed by 40 hex characters).",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live on-chain wallet standing on Elysium Mainnet (99901).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletStandingResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid EVM wallet address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/network": {
      "get": {
        "operationId": "getNetworkSnapshot",
        "tags": [
          "Orderbook & Network"
        ],
        "summary": "Get active public OTC mandates, negotiations, and protocol telemetry",
        "description": "Returns sanitized public OTC mandates (private reservation thresholds remain strictly isolated server-side), active/settled negotiation rounds, escrow order counts, and Elysium Mainnet runtime diagnostics.",
        "responses": {
          "200": {
            "description": "Public OTC network snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicNetworkSnapshot"
                }
              }
            }
          }
        }
      }
    },
    "/api/governance": {
      "get": {
        "operationId": "getGovernanceState",
        "tags": [
          "Governance"
        ],
        "summary": "Get active $VLNT governance proposals, quorum progress, and ballot receipts",
        "parameters": [
          {
            "name": "voter",
            "in": "query",
            "required": false,
            "description": "Optional wallet address to include recorded ballot choices per proposal.",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Aggregated governance state on Elysium Mainnet (99901).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GovernanceState"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "LiveSpotSnapshot": {
        "type": "object",
        "required": [
          "pricesUsd",
          "hypeSpotUsd",
          "source",
          "updatedAt"
        ],
        "properties": {
          "pricesUsd": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "pricesByAddress": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "volumes24hUsd": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "poolLiquidityUsd": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "poolLiquidityByAddress": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "hypeSpotUsd": {
            "type": "number"
          },
          "source": {
            "type": "string",
            "enum": [
              "elysium-dex",
              "hyperliquid",
              "fallback"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OtcQuoteSimulationInput": {
        "type": "object",
        "properties": {
          "side": {
            "type": "string",
            "enum": [
              "SELL",
              "BUY"
            ],
            "default": "SELL"
          },
          "baseSymbol": {
            "type": "string",
            "default": "HYPE"
          },
          "quoteSymbol": {
            "type": "string",
            "default": "USDC"
          },
          "quantity": {
            "type": "string",
            "default": "100"
          },
          "holderTier": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "OtcQuoteSimulation": {
        "type": "object",
        "required": [
          "chainId",
          "network",
          "side",
          "baseToken",
          "quoteToken",
          "quantityHuman",
          "quantityRaw",
          "spotQuoteHuman",
          "spotQuoteRaw",
          "feeBps",
          "protocolFeeRaw",
          "protocolFeeHuman",
          "sellerNetRaw",
          "sellerNetHuman",
          "ammComparison",
          "rfqUrl"
        ],
        "properties": {
          "chainId": {
            "type": "integer",
            "const": 99901
          },
          "network": {
            "type": "string",
            "const": "Elysium Mainnet"
          },
          "side": {
            "type": "string",
            "enum": [
              "SELL",
              "BUY"
            ]
          },
          "baseToken": {
            "type": "object",
            "required": [
              "symbol",
              "address",
              "decimals",
              "priceUsd"
            ],
            "properties": {
              "symbol": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "decimals": {
                "type": "integer"
              },
              "priceUsd": {
                "type": "number"
              }
            }
          },
          "quoteToken": {
            "type": "object",
            "required": [
              "symbol",
              "address",
              "decimals",
              "priceUsd"
            ],
            "properties": {
              "symbol": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "decimals": {
                "type": "integer"
              },
              "priceUsd": {
                "type": "number"
              }
            }
          },
          "quantityHuman": {
            "type": "string"
          },
          "quantityRaw": {
            "type": "string"
          },
          "spotQuoteHuman": {
            "type": "string"
          },
          "spotQuoteRaw": {
            "type": "string"
          },
          "suggestedLimitHuman": {
            "type": "string"
          },
          "feeBps": {
            "type": "integer"
          },
          "protocolFeeRaw": {
            "type": "string"
          },
          "protocolFeeHuman": {
            "type": "string"
          },
          "sellerNetRaw": {
            "type": "string"
          },
          "sellerNetHuman": {
            "type": "string"
          },
          "ammComparison": {
            "type": "object",
            "required": [
              "poolLiquidityUsd",
              "ammPriceImpactPct",
              "ammTotalLossPct",
              "ammEffectiveQuoteHuman",
              "otcEffectiveQuoteHuman",
              "netSavedUsd",
              "exceedsPoolDepth"
            ],
            "properties": {
              "poolLiquidityUsd": {
                "type": "number"
              },
              "ammPriceImpactPct": {
                "type": "number"
              },
              "ammTotalLossPct": {
                "type": "number"
              },
              "ammEffectiveQuoteHuman": {
                "type": "string"
              },
              "otcEffectiveQuoteHuman": {
                "type": "string"
              },
              "netSavedUsd": {
                "type": "number"
              },
              "exceedsPoolDepth": {
                "type": "boolean"
              }
            }
          },
          "rfqUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "WalletStandingResponse": {
        "type": "object",
        "required": [
          "walletAddress",
          "chainId",
          "network",
          "blockNumber",
          "tier",
          "feeBps",
          "maxFeeBps",
          "agentSlotLimit",
          "governanceEligible",
          "balances",
          "checkedAt"
        ],
        "properties": {
          "walletAddress": {
            "type": "string"
          },
          "chainId": {
            "type": "integer",
            "const": 99901
          },
          "network": {
            "type": "string",
            "const": "Elysium Mainnet"
          },
          "blockNumber": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tokenStatus": {
            "type": "string",
            "enum": [
              "live",
              "pre_launch"
            ]
          },
          "vlntContractAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "standard",
              "holder"
            ]
          },
          "feeBps": {
            "type": "integer",
            "enum": [
              10,
              20
            ]
          },
          "maxFeeBps": {
            "type": "integer",
            "const": 50
          },
          "holderThresholdVlnt": {
            "type": "integer",
            "const": 10000
          },
          "minGovernanceVlnt": {
            "type": "integer",
            "const": 1000
          },
          "agentSlotLimit": {
            "type": "integer",
            "enum": [
              3,
              10
            ]
          },
          "governanceEligible": {
            "type": "boolean"
          },
          "balances": {
            "type": "object",
            "required": [
              "hypeWei",
              "hypeHuman",
              "usdcRaw",
              "usdcHuman",
              "vlntWei",
              "vlntHuman"
            ],
            "properties": {
              "hypeWei": {
                "type": "string"
              },
              "hypeHuman": {
                "type": "string"
              },
              "usdcAddress": {
                "type": "string",
                "const": "0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65"
              },
              "usdcRaw": {
                "type": "string"
              },
              "usdcHuman": {
                "type": "string"
              },
              "vlntWei": {
                "type": "string"
              },
              "vlntHuman": {
                "type": "string"
              }
            }
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PublicNetworkSnapshot": {
        "type": "object",
        "required": [
          "agents",
          "negotiations",
          "stats",
          "diagnostics",
          "fetchedAt"
        ],
        "properties": {
          "agents": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "negotiations": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stats": {
            "type": "object"
          },
          "diagnostics": {
            "type": "object"
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GovernanceState": {
        "type": "object",
        "required": [
          "proposals",
          "recentBallots",
          "totalUniqueVoters",
          "totalVotingPowerCastIntp",
          "minVotingPowerIntp",
          "quorumTargetIntp",
          "updatedAt"
        ],
        "properties": {
          "proposals": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "recentBallots": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "totalUniqueVoters": {
            "type": "integer"
          },
          "totalVotingPowerCastIntp": {
            "type": "number"
          },
          "minVotingPowerIntp": {
            "type": "integer"
          },
          "quorumTargetIntp": {
            "type": "integer"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  }
}