openapi: 3.1.0
info:
  title: Minter Node & Gate HTTP API v2
  version: 3.3.0
  summary: Canonical gRPC-Gateway HTTP/JSON & WebSocket API for Minter Node v3.3.0 (Tendermint v0.34.19 + IAVL v0.17.3)
  description: |
    Complete OpenAPI 3.1.0 specification covering all **41 RPC / HTTP v2 methods** exposed by `Minter Node v3.3.0` (`node-grpc-gateway` commit `53ffbb191668`, default HTTP port `28843`, gRPC port `28842`).

    The public mainnet and testnet gateways are listed per operation. Paths without public server entries are reference for your own node. The Playground runs only the shared public read operations.

    ### Monetary & Encoding Invariants
    - **Integer Pip Representation:** Every balance, reserve, stake, liquidity share, and commission is serialized as a base-10 integer string in atomic `pip` (`1 coin = 10^18 pip`). Parse with `BigInt(value)` rather than floating-point numbers.
    - **Historical State (`height`):** Passing `height > 0` queries the immutable IAVL v0.17.3 version at that block height (subject to node `keep_last_states` retention). Omitting `height` or passing `0` reads the latest committed state.
    - **Consensus Finality:** Minter Node v3.3.0 runs embedded **Tendermint v0.34.19** BFT consensus with single-block finality (`5 s` nominal block interval) and no chain reorganizations.
  contact:
    name: Minter Network Engineering
  license:
    name: MIT
x-spec-id: gate
servers:
  - url: https://{nodeHost}
    description: Your own Minter node or reverse proxy for the full Node API. Public servers are listed on supported operations below.
    variables:
      nodeHost:
        default: your-node.example
tags:
  - name: Chain & Status
    description: Node health, Tendermint v0.34.19 sync height, gas bounds, genesis, halts, and real-time event subscription.
  - name: Transactions & Commissions
    description: Exact atomic pip fee estimation, mempool broadcast (CheckTx), transaction lookup, and tag search.
  - name: Accounts & Staking
    description: Address balances, nonces, multisig weights, active delegations, unbonding/frozen queues, and 1,000-slot waitlist.
  - name: Swap Pools & Limit OrderBook
    description: Hybrid DEX (0.20% AMM pools + on-chain limit orderbook), reserves, LP shares, and multi-hop swap quotes.
  - name: Coins & Tariffs
    description: Custom CRR reserve coins, non-reserve tokens, LP tokens, and all 48 USDTE-pegged PriceCommission tariff fields (`VoteCommission 0x20` encodes 51 RLP items).
  - name: Blocks & Events
    description: Committed blocks, failed transactions, and height-indexed protocol events (rewards, slashes, order expirations).
  - name: Validators & Governance
    description: Masternode candidates (3-key roles), Tendermint validator set, missed-block bitmasks, and on-chain governance votes.

paths:
  /v2/estimate_tx_commission/{tx}:
    get:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Transactions & Commissions]
      summary: Estimate exact transaction commission in pip (Canonical Node v2 GET route)
      description: Canonical Minter Go Node v3.3.0 HTTP binding for `EstimateTxCommission` (`api/v2/service/estimate_tx_commission.go:18`). Decodes the `0x`-prefixed raw RLP transaction and calculates exact `pip` commission in `gasCoin` (accounting for UTF-8 `payload <= 10000` bytes at `+$0.0002/byte`, swap hops, and `Smart Gas Coin` conversion).
      operationId: EstimateTxCommission
      x-grpc-method: EstimateTxCommission
      parameters:
        - name: tx
          in: path
          required: true
          description: 0x-prefixed hex-encoded signed 10-field RLP transaction bytes (Mainnet example is canonical `Send 0x01` with `chainId = 1` from `test-vectors.json`; for Testnet `chainId = 2` / `MNT` use `0xf8840102018001a0df80946fac4d18c912343bf86fa7049364dd4e424ab9c088ad78ebc5ac62000094696e766f6963653a746573746e65742d64656d6f8001b845f8431ba00b00e01747dddf76b52bd275d2762fccb161f35e6a7073cf06a4dd0d812cc4d7a0293cd5da784f7fd75cac1bf0c7ac2302932dac8930c2cd1161f632904a85d3d1`).
          schema:
            type: string
            default: "0xf87f0101018001a0df80946fac4d18c912343bf86fa7049364dd4e424ab9c088ad78ebc5ac6200008f696e766f6963653a323032362d31318001b845f8431ba04acb879e7e90f8475c553a23e4c2f11c7ba71ff8a36cc4ae15dc1a74f2fdc511a04da0b3d26cde48103cde55dd74e9d867e539cbbb8516f74cb3dd085b4dc951de"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Exact atomic pip commission quote
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EstimateTxCommissionResponse"
              example:
                commission: "143200000000000000000"
        "400":
          $ref: "#/components/responses/ErrorResponse"

  /v2/status:
    get:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Chain & Status]
      summary: Get node synchronization & Tendermint status
      description: Returns Minter Node version (`3.3.0`), network chain identifier, latest committed block height/hash/timestamp, `keep_last_states` depth, total BIP emission in `pip`, and Tendermint validator status.
      operationId: Status
      x-grpc-method: Status
      responses:
        "200":
          description: Current node & consensus status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponse"
              example:
                version: "3.3.0"
                network: "minter-mainnet-5"
                initial_height: "40703409"
                latest_block_hash: "5B6BF20E24EAF2DE5D4C73A69F2CEA7E071F99FE3BEEC0978DE7A17974B99926"
                latest_app_hash: "EF997F114B7C9BA0293D045B03A862F7899392B80A73FDD554F17406213D2EF7"
                latest_block_height: "40848268"
                latest_block_time: "2026-11-15T07:55:28.204818029Z"
                keep_last_states: "100000"
                total_slashed: "16028875206760744882919348"
                current_emission: "8857469301763545817407859549"
                catching_up: false
                public_key: "Mp02b92266814e92b84a4021ed7684dcbffd0d8d59a4a127ad9bc28c4565e2d53c"
                moniker: "minter-node-1"

  /v2/version_network:
    get:
      tags: [Chain & Status]
      summary: Get active protocol upgrade history
      description: Lists the active protocol version name (e.g. `v330`) and historical upgrade activation heights.
      operationId: VersionNetwork
      x-grpc-method: VersionNetwork
      responses:
        "200":
          description: Active and historical network protocol versions
          content:
            application/json:
              schema:
                type: object
                properties:
                  current:
                    type: string
                  versions:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        height:
                          type: string

  /v2/net_info:
    get:
      tags: [Chain & Status]
      summary: Get Tendermint P2P network peers & listeners
      description: Returns Tendermint v0.34.19 P2P listening status (`26656`), peer count, and connected peer metadata.
      operationId: NetInfo
      x-grpc-method: NetInfo
      responses:
        "200":
          description: P2P network peer information
          content:
            application/json:
              schema:
                type: object
                properties:
                  listening:
                    type: boolean
                  listeners:
                    type: array
                    items:
                      type: string
                  count_peers:
                    type: string
                  peers:
                    type: array
                    items:
                      type: object

  /v2/genesis:
    get:
      tags: [Chain & Status]
      summary: Get chain genesis document
      description: Reassembles chunked Tendermint genesis data and returns the initial chain parameters and genesis app state.
      operationId: Genesis
      x-grpc-method: Genesis
      responses:
        "200":
          description: Genesis document
          content:
            application/json:
              schema:
                type: object
                properties:
                  genesis_time:
                    type: string
                  chain_id:
                    type: string
                  initial_height:
                    type: string
                  consensus_params:
                    type: object
                  app_hash:
                    type: string

  /v2/min_gas_price:
    get:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Chain & Status]
      summary: Get current minimum mempool gas price multiplier
      description: Returns the minimum `gasPrice` multiplier currently accepted by this node's mempool (typically `"1"` under normal load).
      operationId: MinGasPrice
      x-grpc-method: MinGasPrice
      responses:
        "200":
          description: Minimum gas price multiplier
          content:
            application/json:
              schema:
                type: object
                required: [min_gas_price]
                properties:
                  min_gas_price:
                    type: string
                    example: "1"

  /v2/max_gas_price:
    get:
      tags: [Chain & Status]
      summary: Get protocol maximum gas price bound
      description: Returns the maximum gas price multiplier configured in consensus state at the requested height.
      operationId: MaxGasPrice
      x-grpc-method: MaxGasPrice
      parameters:
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Maximum gas price multiplier
          content:
            application/json:
              schema:
                type: object
                required: [max_gas_price]
                properties:
                  max_gas_price:
                    type: string

  /v2/halts/{height}:
    get:
      tags: [Chain & Status]
      summary: Get scheduled halt votes for a target block height
      description: Lists validator `SetHaltBlock (0x0F)` public keys scheduled for the specified target halt height.
      operationId: Halts
      x-grpc-method: Halts
      parameters:
        - name: height
          in: path
          required: true
          description: Target halt block height.
          schema:
            type: string
            default: "40848268"
      responses:
        "200":
          description: Validator public keys voting to halt at height
          content:
            application/json:
              schema:
                type: object
                properties:
                  public_keys:
                    type: array
                    items:
                      type: string

  /v2/subscribe:
    get:
      tags: [Chain & Status]
      summary: Subscribe to live Tendermint events (WebSocket / Stream)
      description: Streams real-time Tendermint event bus notifications (`tm.event = 'NewBlock'`, `tm.event = 'Tx'`) via WebSocket upgrade or chunked gRPC-Gateway stream. For production UIs and payment gateways, prefer **Centrifugo v6 WebSocket** (`/connection/websocket`).
      operationId: Subscribe
      x-grpc-method: Subscribe
      parameters:
        - name: query
          in: query
          required: true
          description: "Tendermint query string (e.g. `tm.event = 'NewBlock'` or `tm.event = 'Tx'`)."
          schema:
            type: string
            default: "tm.event = 'NewBlock'"
      responses:
        "200":
          description: Newline-delimited JSON / WebSocket event frames
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object

  /v2/test/block:
    get:
      tags: [Blocks & Events]
      summary: Get synthetic fixture block (testnet builds only)
      description: Returns a static example `BlockResponse` fixture when running a testnet-tagged node binary (returns HTTP 403/400 on mainnet builds).
      operationId: TestBlock
      x-grpc-method: TestBlock
      responses:
        "200":
          description: Synthetic example block
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BlockResponse"

  /v2/price_commissions:
    get:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Coins & Tariffs]
      summary: Get all 48 on-chain USDTE-pegged fee tariff fields in pip
      description: |
        Returns the complete 48-tariff `PriceCommission` schedule for Minter v3.3.0 (`VoteCommissionDataV3` `0x20` encodes 51 RLP items: `pub_key`, `height`, `coin` + 48 `uint256` fee fields) denominated in `coin.id = 1993` (`USDTE`) atomic `pip` (`10^18 pip = $1.00`), including ticker issuance fees (`$50,000 / $10,000 / $2,000 / $400 / $100`), `send ($0.01)`, `multisend ($0.01 + $0.005 * (N - 1))`, `swap_pool ($0.03 + $0.005/hop)`, `edit_candidate ($0.10 = 10^17)`, `edit_ticker_owner ($100.00 = 10^20)`, `payload_byte ($0.0002, payload <= 10,000 bytes)`, and `failed_tx ($0.01)`.
      operationId: PriceCommission
      x-grpc-method: PriceCommission
      parameters:
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Complete 48-field PriceCommission schedule in pip
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PriceCommissionResponse"
              example:
                coin:
                  id: "1993"
                  symbol: "USDTE"
                payload_byte: "200000000000000"
                send: "10000000000000000"
                buy_bancor: "30000000000000000"
                sell_bancor: "30000000000000000"
                sell_all_bancor: "30000000000000000"
                buy_pool_base: "30000000000000000"
                buy_pool_delta: "5000000000000000"
                sell_pool_base: "30000000000000000"
                sell_pool_delta: "5000000000000000"
                sell_all_pool_base: "30000000000000000"
                sell_all_pool_delta: "5000000000000000"
                create_ticker3: "50000000000000000000000"
                create_ticker4: "10000000000000000000000"
                create_ticker5: "2000000000000000000000"
                create_ticker6: "400000000000000000000"
                create_ticker7_10: "100000000000000000000"
                create_coin: "0"
                create_token: "0"
                recreate_coin: "100000000000000000000"
                recreate_token: "100000000000000000000"
                declare_candidacy: "10000000000000000000"
                delegate: "100000000000000000"
                unbond: "100000000000000000"
                redeem_check: "30000000000000000"
                set_candidate_on: "100000000000000000"
                set_candidate_off: "100000000000000000"
                create_multisig: "100000000000000000"
                multisend_base: "10000000000000000"
                multisend_delta: "5000000000000000"
                edit_candidate: "100000000000000000"
                set_halt_block: "100000000000000000"
                edit_ticker_owner: "100000000000000000000"
                edit_multisig: "100000000000000000"
                edit_candidate_public_key: "1000000000000000000000"
                create_swap_pool: "10000000000000000000"
                add_liquidity: "100000000000000000"
                remove_liquidity: "100000000000000000"
                edit_candidate_commission: "10000000000000000000"
                mint_token: "100000000000000000"
                burn_token: "100000000000000000"
                vote_commission: "100000000000000000"
                vote_update: "100000000000000000"
                failed_tx: "10000000000000000"
                add_limit_order: "100000000000000000"
                remove_limit_order: "10000000000000000"
                move_stake: "100000000000000000"
                lock_stake: "100000000000000000"
                lock: "10000000000000000"

  /v2/address/{address}:
    get:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Accounts & Staking]
      summary: Get account liquid balances, nonce, delegations & multisig state
      description: |
        Returns liquid `balance[]` in atomic `pip`, `transaction_count` (current account nonce — pass `BigInt(transaction_count) + 1n` when signing the next TX), optional active `delegated[]` stakes, `locked_stake_until_block` (`LockStake 0x25`), and `multisig` configuration.
      operationId: Address
      x-grpc-method: Address
      parameters:
        - name: address
          in: path
          required: true
          description: 42-character `Mx`-prefixed account address.
          schema:
            type: string
            pattern: "^Mx[0-9a-fA-F]{40}$"
            default: "Mxa147683dc63fd6b11c0f72aafa05449c61dd250b"
        - name: delegated
          in: query
          required: false
          description: Include active validator delegation positions and combined totals.
          schema:
            type: boolean
            default: true
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Account state in atomic pip
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AddressResponse"
        "400":
          $ref: "#/components/responses/ErrorResponse"

  /v2/addresses:
    get:
      tags: [Accounts & Staking]
      summary: Batch query multiple Mx addresses at a single height
      description: Returns liquid balances, nonces, and optional delegation totals for an array of `Mx...` addresses in a single consistent IAVL snapshot.
      operationId: Addresses
      x-grpc-method: Addresses
      parameters:
        - name: addresses
          in: query
          required: true
          description: Repeated `Mx...` addresses to query.
          schema:
            type: array
            items:
              type: string
            default: ["Mxa147683dc63fd6b11c0f72aafa05449c61dd250b"]
        - name: delegated
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Map of address states
          content:
            application/json:
              schema:
                type: object
                properties:
                  addresses:
                    type: object
                    additionalProperties:
                      $ref: "#/components/schemas/AddressResponse"

  /v2/frozen/{address}:
    get:
      tags: [Accounts & Staking]
      summary: Get unbonding, moving-stake, and locked funds for an address
      description: Returns pending `Unbond (0x08)` (`518,400` blocks), `MoveStake (0x1B)`, and `Lock (0x26)` entries scheduled to unlock for `{address}`.
      operationId: Frozen
      x-grpc-method: Frozen
      parameters:
        - name: address
          in: path
          required: true
          schema:
            type: string
            default: "Mxa147683dc63fd6b11c0f72aafa05449c61dd250b"
        - name: coin_id
          in: query
          required: false
          description: Optional numeric coin ID filter.
          schema:
            type: string
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Pending frozen entries
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FrozenResponse"

  /v2/frozen_all:
    get:
      tags: [Accounts & Staking]
      summary: Get all frozen / unbonding entries across a block range
      description: Queries scheduled unlock records across `[start_height, end_height]`, optionally filtered by `addresses` and `coin_ids`.
      operationId: FrozenAll
      x-grpc-method: FrozenAll
      parameters:
        - name: start_height
          in: query
          required: false
          schema:
            type: string
        - name: end_height
          in: query
          required: false
          schema:
            type: string
        - name: addresses
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - name: coin_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Frozen funds list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FrozenResponse"

  /v2/waitlist/{address}:
    get:
      tags: [Accounts & Staking]
      summary: Get stakes evicted into a validator's Waitlist
      description: Returns stakes belonging to `{address}` that were displaced out of a validator's top `1,000` slots (`code 301`). Waitlisted stakes earn zero rewards until topped up (`Delegate 0x07`), moved (`MoveStake 0x1B`), or unbonded (`Unbond 0x08`).
      operationId: WaitList
      x-grpc-method: WaitList
      parameters:
        - name: address
          in: path
          required: true
          schema:
            type: string
            default: "Mxa147683dc63fd6b11c0f72aafa05449c61dd250b"
        - name: public_key
          in: query
          required: false
          description: Optional validator `Mp...` public key filter.
          schema:
            type: string
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Waitlisted stake entries
          content:
            application/json:
              schema:
                type: object
                properties:
                  list:
                    type: array
                    items:
                      type: object
                      properties:
                        public_key:
                          type: string
                        coin:
                          $ref: "#/components/schemas/CoinRef"
                        value:
                          type: string

  /v2/swap_pool/{coin0}/{coin1}:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Get AMM swap pool reserves, ID & LP supply
      description: Returns canonical pool `id`, spot `price`, exact reserves `amount0` / `amount1` in `pip`, and minted `liquidity` (`LP-{id}`) supply. Pair ordering `(coin0, coin1)` is normalized automatically by the node.
      operationId: SwapPool
      x-grpc-method: SwapPool
      parameters:
        - name: coin0
          in: path
          required: true
          description: Numeric coin ID of first asset (`0` = BIP).
          schema:
            type: string
            default: "0"
        - name: coin1
          in: path
          required: true
          description: Numeric coin ID of counter asset (`1993` = USDTE).
          schema:
            type: string
            default: "1993"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Pool reserves and LP token liquidity in atomic pip
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SwapPoolResponse"
              example:
                id: "48"
                price: "0.0002641"
                amount0: "2519284102938471029384710"
                amount1: "665342931586050200000"
                liquidity: "40938271625341827364510"
        "404":
          $ref: "#/components/responses/ErrorResponse"

  /v2/swap_pool/{coin0}/{coin1}/{provider}:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Get LP provider share & underlying reserves in a pool
      description: Returns the free `LP-{id}` balance of `{provider}` (`Mx...`) and their proportional `amount0` and `amount1` claims in atomic `pip`.
      operationId: SwapPoolProvider
      x-grpc-method: SwapPoolProvider
      parameters:
        - name: coin0
          in: path
          required: true
          schema:
            type: string
            default: "0"
        - name: coin1
          in: path
          required: true
          schema:
            type: string
            default: "1993"
        - name: provider
          in: path
          required: true
          schema:
            type: string
            default: "Mxa147683dc63fd6b11c0f72aafa05449c61dd250b"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Provider position in pool
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SwapPoolResponse"

  /v2/swap_pools:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: List all AMM swap pools
      description: Returns every active AMM pool (`x * y = k`, `0.20%` LP fee `998/1000`) with reserves and optional embedded limit orderbooks (`orders=true`).
      operationId: SwapPools
      x-grpc-method: SwapPools
      parameters:
        - name: orders
          in: query
          required: false
          description: Include active limit orders inside each pool object.
          schema:
            type: boolean
            default: false
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Array of swap pools
          content:
            application/json:
              schema:
                type: object
                properties:
                  pools:
                    type: array
                    items:
                      $ref: "#/components/schemas/SwapPoolItem"

  /v2/limit_order/{order_id}:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Get single on-chain limit order by numeric ID
      description: Returns remaining `want_sell`, `want_buy`, normalized rational `price`, `owner`, `pool_id`, and `height` for an active limit order (`AddLimitOrder 0x23`).
      operationId: LimitOrder
      x-grpc-method: LimitOrder
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            default: "1"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: On-chain limit order state
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LimitOrderItem"

  /v2/limit_orders/{sell_coin}/{buy_coin}:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Get directional limit orderbook slice for a pair
      description: Returns resting limit orders selling `{sell_coin}` for `{buy_coin}` sorted by best execution price, alongside current AMM `pool_price`.
      operationId: LimitOrdersOfPool
      x-grpc-method: LimitOrdersOfPool
      parameters:
        - name: sell_coin
          in: path
          required: true
          schema:
            type: string
            default: "0"
        - name: buy_coin
          in: path
          required: true
          schema:
            type: string
            default: "1993"
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Directional orderbook slice
          content:
            application/json:
              schema:
                type: object
                properties:
                  pool_price:
                    type: string
                  orders:
                    type: array
                    items:
                      $ref: "#/components/schemas/LimitOrderItem"

  /v2/limit_orders:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Query resting limit orders by numeric IDs
      description: Lists resting on-chain limit orders (`api/v2/service/swap_pool.go:121`) optionally filtered by numeric `ids[]` and `height`. (To query open/historical orders by owner `Mx...` address, use Explorer Rust `GET /api/v2/address/{address}/orders`.)
      operationId: LimitOrders
      x-grpc-method: LimitOrders
      parameters:
        - name: ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Filtered limit orders
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      $ref: "#/components/schemas/LimitOrderItem"

  /v2/best_trade/{sell_coin}/{buy_coin}/{type}/{amount}:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Find optimal multi-hop Hybrid DEX route (1..4 pools)
      description: Searches across AMM pools + resting limit orders (`max_depth <= 4`) to find the optimal coin ID path (`path[]`) and exact `result` in atomic `pip` for either exact-in (`type=input`) or exact-out (`type=output`).
      operationId: BestTrade
      x-grpc-method: BestTrade
      parameters:
        - name: sell_coin
          in: path
          required: true
          schema:
            type: string
            default: "0"
        - name: buy_coin
          in: path
          required: true
          schema:
            type: string
            default: "1993"
        - name: type
          in: path
          required: true
          description: "`input` (exact sell amount) or `output` (exact buy amount)."
          schema:
            type: string
            enum: [input, output]
            default: input
        - name: amount
          in: path
          required: true
          description: Atomic `pip` integer string (`10^18 pip = 1 coin`).
          schema:
            type: string
            default: "100000000000000000000"
        - name: max_depth
          in: query
          required: false
          description: Maximum number of pool hops (`1..4`, default `4`).
          schema:
            type: integer
            minimum: 1
            maximum: 4
            default: 4
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Optimal coin ID route and output/input pip amount
          content:
            application/json:
              schema:
                type: object
                required: [path, result]
                properties:
                  path:
                    type: array
                    items:
                      type: string
                    description: Ordered numeric coin IDs for `SellSwapPool (0x17)` or `BuySwapPool (0x18)` `coins[]`.
                  result:
                    type: string
                    description: Quoted output (for `input`) or required input (for `output`) in atomic `pip`.
              example:
                path: ["0", "1993"]
                result: "26357180000000000"

  /v2/estimate_coin_sell:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Estimate output pip for selling an exact coin amount
      description: Simulates selling `value_to_sell` (`pip`) across Hybrid DEX (`pool`, slicing AMM `998/1000` + limit orders), `bancor` CRR reserves, or `optimal` (whichever yields more).
      operationId: EstimateCoinSell
      x-grpc-method: EstimateCoinSell
      parameters:
        - name: coin_id_to_sell
          in: query
          required: false
          schema:
            type: string
            default: "0"
        - name: coin_to_sell
          in: query
          required: false
          description: Ticker symbol alternative (prefer `coin_id_to_sell`).
          schema:
            type: string
        - name: coin_id_to_buy
          in: query
          required: false
          schema:
            type: string
            default: "1993"
        - name: coin_to_buy
          in: query
          required: false
          schema:
            type: string
        - name: value_to_sell
          in: query
          required: true
          description: Exact input amount in atomic `pip`.
          schema:
            type: string
            default: "100000000000000000000"
        - name: coin_id_commission
          in: query
          required: false
          description: Numeric ID of `gasCoin` (`0` = BIP, `1993` = USDTE).
          schema:
            type: string
            default: "0"
        - name: swap_from
          in: query
          required: false
          schema:
            type: string
            enum: [optimal, bancor, pool]
            default: optimal
        - name: route
          in: query
          required: false
          description: Up to 3 intermediate coin IDs for multi-hop pool routing.
          schema:
            type: array
            items:
              type: string
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Swap sell quote in atomic pip
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EstimateCoinSellResponse"

  /v2/estimate_coin_buy:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Estimate required input pip to buy an exact coin amount
      description: Simulates buying exact `value_to_buy` (`pip`) via `optimal`, `pool`, or `bancor` execution.
      operationId: EstimateCoinBuy
      x-grpc-method: EstimateCoinBuy
      parameters:
        - name: coin_id_to_sell
          in: query
          required: false
          schema:
            type: string
            default: "0"
        - name: coin_id_to_buy
          in: query
          required: false
          schema:
            type: string
            default: "1993"
        - name: value_to_buy
          in: query
          required: true
          description: Exact target output amount in atomic `pip`.
          schema:
            type: string
            default: "1000000000000000000"
        - name: coin_id_commission
          in: query
          required: false
          schema:
            type: string
            default: "0"
        - name: swap_from
          in: query
          required: false
          schema:
            type: string
            enum: [optimal, bancor, pool]
            default: optimal
        - name: route
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Swap buy quote in atomic pip
          content:
            application/json:
              schema:
                type: object
                required: [will_pay, commission, swap_from]
                properties:
                  will_pay:
                    type: string
                  commission:
                    type: string
                  swap_from:
                    type: string

  /v2/estimate_coin_sell_all:
    get:
      tags: [Swap Pools & Limit OrderBook]
      summary: Estimate output pip when sweeping full balance (SellAllCoin 0x03 / 0x19)
      description: Estimates `will_get` when selling the entire balance `value_to_sell` (`pip`) with gas deducted directly from the sold asset.
      operationId: EstimateCoinSellAll
      x-grpc-method: EstimateCoinSellAll
      parameters:
        - name: coin_id_to_sell
          in: query
          required: false
          schema:
            type: string
            default: "0"
        - name: coin_id_to_buy
          in: query
          required: false
          schema:
            type: string
            default: "1993"
        - name: value_to_sell
          in: query
          required: true
          schema:
            type: string
            default: "1000000000000000000000"
        - name: gas_price
          in: query
          required: false
          schema:
            type: string
            default: "1"
        - name: swap_from
          in: query
          required: false
          schema:
            type: string
            enum: [optimal, bancor, pool]
            default: optimal
        - name: route
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Sell-all quote in atomic pip
          content:
            application/json:
              schema:
                type: object
                properties:
                  will_get:
                    type: string
                  swap_from:
                    type: string

  /v2/coin_info_by_id/{id}:
    get:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Coins & Tariffs]
      summary: Get coin or token metadata by immutable numeric ID
      description: Recommended for exchange & payment integrations because numeric `id` (`0` = BIP, `1993` = USDTE) never changes across `RecreateCoin (0x10)` or `RecreateToken (0x1F)`.
      operationId: CoinInfoById
      x-grpc-method: CoinInfoById
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            default: "1993"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Coin or token state
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CoinInfoResponse"
              example:
                id: "1993"
                name: "Tether USD"
                symbol: "USDTE"
                volume: "12450000000000000000000000"
                crr: "0"
                reserve_balance: "0"
                max_supply: "1000000000000000000000000000"
                owner_address: "Mx68f4839d7f32831b9234f9575f3b95e1afe21a56"
                mintable: true
                burnable: true
                type: "token"

  /v2/coin_info/{symbol}:
    get:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Coins & Tariffs]
      summary: Get coin or token metadata by ticker symbol
      description: Looks up a coin/token by ticker (`USDTE`) or archived versioned symbol (`COIN-1`). Always store the returned numeric `id` for financial logic.
      operationId: CoinInfo
      x-grpc-method: CoinInfo
      parameters:
        - name: symbol
          in: path
          required: true
          schema:
            type: string
            default: "USDTE"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Coin or token state
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CoinInfoResponse"

  /v2/send_transaction:
    post:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Transactions & Commissions]
      summary: Broadcast signed RLP transaction to Tendermint mempool (POST)
      description: |
        Submits a `0x`-prefixed signed 10-field RLP transaction to `Mempool.CheckTx`. A `"0"` code confirms mempool admission (`CheckTx`) only; verify block execution (`DeliverTx`) with `code === "0"` via `GET /v2/transaction/{hash}` (`FailedTx` deducts `(price.FailedTx + (len(Payload) + len(ServiceData)) * price.PayloadByte) * GasPrice` without incrementing `Nonce`).
      operationId: SendTransaction
      x-grpc-method: SendTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [tx]
              properties:
                tx:
                  type: string
                  description: 0x-prefixed hex string of signed 10-field RLP transaction.
                  examples:
                    - "0xf87f0101018001a0df80946fac4d18c912343bf86fa7049364dd4e424ab9c088ad78ebc5ac6200008f696e766f6963653a323032362d31318001b845f8431ba04acb879e7e90f8475c553a23e4c2f11c7ba71ff8a36cc4ae15dc1a74f2fdc511a04da0b3d26cde48103cde55dd74e9d867e539cbbb8516f74cb3dd085b4dc951de"
      responses:
        "200":
          description: Mempool CheckTx result and canonical `Mt...` SHA-256 hash
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SendTransactionResponse"
        "400":
          $ref: "#/components/responses/ErrorResponse"

  /v2/send_transaction/{tx}:
    get:
      tags: [Transactions & Commissions]
      summary: Broadcast signed RLP transaction via GET path binding
      description: Protobuf HTTP GET alias for `SendTransaction` (`CheckTx` mempool admission only; verify committed block execution via `GET /v2/transaction/{hash}`). Requires `0x` prefix on `{tx}`.
      operationId: SendTransactionGet
      x-grpc-method: SendTransaction
      parameters:
        - name: tx
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Mempool CheckTx result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SendTransactionResponse"

  /v2/transaction/{hash}:
    get:
      servers:
        - url: https://gate.minter.network
          description: Public Mainnet Node API (chainId 1, BIP)
        - url: https://gate-api.testnet.minter.network
          description: Public Testnet Node API (chainId 2, MNT)
      tags: [Transactions & Commissions]
      summary: Get committed transaction by Mt... SHA-256 hash
      description: Fetches a committed transaction receipt, decoded `data` payload, `code` (`0` = success, non-zero = failed with `tx.fail_fee` charged), and `tags`.
      operationId: Transaction
      x-grpc-method: Transaction
      parameters:
        - name: hash
          in: path
          required: true
          description: 66-character `Mt...` (or 64-hex) SHA-256 transaction hash.
          schema:
            type: string
            default: "Mt0f6e7968ffd3ba1e69132303adeef568bc36a7692d247108c0d5e48e3c3e5664"
      responses:
        "200":
          description: Committed transaction details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TransactionResponse"
        "404":
          $ref: "#/components/responses/ErrorResponse"

  /v2/transactions:
    get:
      tags: [Transactions & Commissions]
      summary: Search committed transactions by Tendermint tags
      description: "Queries Tendermint `TxSearch` in descending order (e.g. `tags.tx.from='a147683dc63fd6b11c0f72aafa05449c61dd250b'` or `tags.tx.type='01'`)."
      operationId: Transactions
      x-grpc-method: Transactions
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
            default: "tags.tx.type='01'"
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 20
      responses:
        "200":
          description: Matching transactions
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactions:
                    type: array
                    items:
                      $ref: "#/components/schemas/TransactionResponse"

  /v2/unconfirmed_txs:
    get:
      tags: [Transactions & Commissions]
      summary: Get pending transactions in node mempool
      description: Returns current mempool transaction count, total byte size, and raw hex transactions awaiting inclusion.
      operationId: UnconfirmedTxs
      x-grpc-method: UnconfirmedTxs
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 10
      responses:
        "200":
          description: Unconfirmed mempool snapshot
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction_count:
                    type: string
                  total_transactions:
                    type: string
                  total_bytes:
                    type: string
                  transactions:
                    type: array
                    items:
                      type: string

  /v2/block/{height}:
    get:
      tags: [Blocks & Events]
      summary: Get committed block by height
      description: |
        Returns block header, reward, proposer `Mp...`, validator precommits, and committed transactions. Pass **`failed_txs=true`** on exchange/wallet hot-wallet scanners to account for `tx.fail_fee` deductions when `code != 0`!
      operationId: Block
      x-grpc-method: Block
      parameters:
        - name: height
          in: path
          required: true
          schema:
            type: string
            default: "40848268"
        - name: failed_txs
          in: query
          required: false
          description: Include failed transactions (`code != 0`) that paid `fail_fee` (hidden by default in Node v3.3.0).
          schema:
            type: boolean
            default: false
        - name: events
          in: query
          required: false
          description: Include end-block protocol events (`RewardEvent`, `SlashEvent`, `UnbondEvent`, etc.).
          schema:
            type: boolean
            default: false
        - name: fields
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum: [transactions, missed, block_reward, size, proposer, validators, events]
      responses:
        "200":
          description: Block data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BlockResponse"

  /v2/blocks:
    get:
      tags: [Blocks & Events]
      summary: Get range of committed blocks (up to 100 heights)
      description: Returns committed blocks in `[from_height, to_height]` (inclusive range up to 100 blocks).
      operationId: Blocks
      x-grpc-method: Blocks
      parameters:
        - name: from_height
          in: query
          required: true
          schema:
            type: string
            default: "40848265"
        - name: to_height
          in: query
          required: true
          schema:
            type: string
            default: "40848268"
        - name: failed_txs
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - name: events
          in: query
          required: false
          description: Include end-block protocol events in each returned block.
          schema:
            type: boolean
            default: false
        - name: fields
          in: query
          required: false
          description: Optional repeatable field projection filter (e.g. `transactions`, `missed`, `block_reward`, `size`, `proposer`, `validators`, `evidence`).
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Block range response
          content:
            application/json:
              schema:
                type: object
                properties:
                  blocks:
                    type: array
                    items:
                      $ref: "#/components/schemas/BlockResponse"

  /v2/events/{height}:
    get:
      tags: [Blocks & Events]
      summary: Get protocol end-block events for a height
      description: Returns typed Minter events emitted at `{height}` (`RewardEvent`, `SlashEvent`, `UnbondEvent`, `OrderExpiredEvent`, `StakeMoveEvent`, `UpdatedBlockRewardEvent`).
      operationId: Events
      x-grpc-method: Events
      parameters:
        - name: height
          in: path
          required: true
          schema:
            type: string
            default: "40848268"
        - name: search
          in: query
          required: false
          description: Optional repeatable `Mx...` or `Mp...` filters (`search=...&search=...`) for stake-related events.
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Block events array
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      type: object

  /v2/candidate/{public_key}:
    get:
      tags: [Validators & Governance]
      summary: Get masternode candidate details & 3-key role addresses
      description: Returns `reward_address`, `owner_address`, `control_address`, `total_stake` (`pip`), `commission` (`%`), `used_slots` (`<= 1000`), `min_stake` (`pip`), and `status` (`1` = off, `2` = on) for `{public_key}` (`Mp...`).
      operationId: Candidate
      x-grpc-method: Candidate
      parameters:
        - name: public_key
          in: path
          required: true
          schema:
            type: string
            default: "Mpeeb140d1d932146cf394f868ac64467a2935c3f7d0ddd1517a954aa3fd2a7b04"
        - name: not_show_stakes
          in: query
          required: false
          schema:
            type: boolean
            default: true
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Candidate object
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CandidateResponse"

  /v2/candidates:
    get:
      tags: [Validators & Governance]
      summary: List all declared masternode candidates
      description: Returns all registered candidates with stake totals, commissions, and slot counts.
      operationId: Candidates
      x-grpc-method: Candidates
      parameters:
        - name: include_stakes
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - name: not_show_stakes
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum: [all, "off", "on", validator]
            default: all
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Candidates list
          content:
            application/json:
              schema:
                type: object
                properties:
                  candidates:
                    type: array
                    items:
                      $ref: "#/components/schemas/CandidateResponse"

  /v2/validators:
    get:
      tags: [Validators & Governance]
      summary: Get active Tendermint BFT validator set & voting power
      description: Returns `public_key` (`Mp...`) and Tendermint BFT `voting_power` for the active validator set at the requested height.
      operationId: Validators
      x-grpc-method: Validators
      parameters:
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Active validators
          content:
            application/json:
              schema:
                type: object
                properties:
                  validators:
                    type: array
                    items:
                      type: object
                      properties:
                        public_key:
                          type: string
                        voting_power:
                          type: string

  /v2/missed_blocks/{public_key}:
    get:
      tags: [Validators & Governance]
      summary: Get validator missed-block sliding window bitmask
      description: Returns the 24-block sliding window bitmask (`missed_blocks`) and `missed_blocks_count` (`> 12` missed out of `24` blocks triggers automatic `offline` drop + `17,280`-block jail with `0%` stake burn; `5%` stake burn applies only to double-sign equivocation).
      operationId: MissedBlocks
      x-grpc-method: MissedBlocks
      parameters:
        - name: public_key
          in: path
          required: true
          schema:
            type: string
            default: "Mpeeb140d1d932146cf394f868ac64467a2935c3f7d0ddd1517a954aa3fd2a7b04"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Missed block bitmask and counter
          content:
            application/json:
              schema:
                type: object
                properties:
                  missed_blocks:
                    type: string
                  missed_blocks_count:
                    type: string

  /v2/commission_votes/{target_version}:
    get:
      tags: [Validators & Governance]
      summary: Get validator fee schedule governance votes (0x20)
      description: Lists `VoteCommission (0x20)` proposals and supporting validator `Mp...` public keys for `{target_version}` (activation height).
      operationId: CommissionVotes
      x-grpc-method: CommissionVotes
      parameters:
        - name: target_version
          in: path
          required: true
          schema:
            type: string
            default: "40703409"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Commission governance votes
          content:
            application/json:
              schema:
                type: object
                properties:
                  votes:
                    type: array
                    items:
                      type: object

  /v2/update_votes/{target_version}:
    get:
      tags: [Validators & Governance]
      summary: Get validator protocol upgrade votes (0x21)
      description: Lists `VoteUpdate (0x21)` proposals and supporting validator `Mp...` public keys for `{target_version}` (upgrade block height).
      operationId: UpdateVotes
      x-grpc-method: UpdateVotes
      parameters:
        - name: target_version
          in: path
          required: true
          schema:
            type: string
            default: "40703409"
        - $ref: "#/components/parameters/HeightQuery"
      responses:
        "200":
          description: Protocol upgrade votes
          content:
            application/json:
              schema:
                type: object
                properties:
                  votes:
                    type: array
                    items:
                      type: object

components:
  parameters:
    HeightQuery:
      name: height
      in: query
      required: false
      description: Optional block height (`uint64`) for historical IAVL v0.17.3 state read (`0` or omitted = latest committed block).
      schema:
        type: string
  responses:
    ErrorResponse:
      description: Minter Node / Gate structured gRPC-Gateway error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                required: [code, message]
                properties:
                  code:
                    type: string
                    example: "108"
                  message:
                    type: string
                    example: "Insufficient reserve balance in pool to pay commission"
                  data:
                    type: object
  schemas:
    CoinRef:
      type: object
      required: [id, symbol]
      properties:
        id:
          type: string
          description: Immutable numeric uint32 coin identifier (`"0"` = BIP, `"1993"` = USDTE).
        symbol:
          type: string
          description: Display ticker symbol.
    EstimateTxCommissionResponse:
      type: object
      required: [commission]
      properties:
        commission:
          type: string
          description: Exact fee payable in `gasCoin` in atomic `pip` (`10^18 pip = 1 coin`).
    EstimateCoinSellResponse:
      type: object
      required: [will_get, commission, swap_from]
      properties:
        will_get:
          type: string
          description: Estimated output amount in atomic `pip`.
        commission:
          type: string
          description: Estimated transaction fee in `gasCoin` (`pip`).
        swap_from:
          type: string
          enum: [bancor, pool]
    StatusResponse:
      type: object
      required: [version, network, latest_block_height, latest_block_time, catching_up]
      properties:
        version:
          type: string
        network:
          type: string
        initial_height:
          type: string
        latest_block_hash:
          type: string
        latest_app_hash:
          type: string
        latest_block_height:
          type: string
        latest_block_time:
          type: string
        keep_last_states:
          type: string
        total_slashed:
          type: string
        current_emission:
          type: string
        catching_up:
          type: boolean
        public_key:
          type: string
        moniker:
          type: string
    AddressResponse:
      type: object
      required: [balance, transaction_count, bip_value]
      properties:
        balance:
          type: array
          items:
            type: object
            required: [coin, value, bip_value]
            properties:
              coin:
                $ref: "#/components/schemas/CoinRef"
              value:
                type: string
                description: Exact liquid balance in atomic `pip`.
              bip_value:
                type: string
        delegated:
          type: array
          items:
            type: object
            properties:
              coin:
                $ref: "#/components/schemas/CoinRef"
              value:
                type: string
              bip_value:
                type: string
              delegate_bip_value:
                type: string
        total:
          type: array
          items:
            type: object
        transaction_count:
          type: string
          description: Current account nonce (`nextNonce = BigInt(transaction_count) + 1n`).
        bip_value:
          type: string
        locked_stake_until_block:
          type: string
        multisig:
          type: ["object", "null"]
    FrozenResponse:
      type: object
      properties:
        frozen:
          type: array
          items:
            type: object
            properties:
              height:
                type: string
              address:
                type: string
              candidate_key:
                type: ["string", "null"]
              coin:
                $ref: "#/components/schemas/CoinRef"
              value:
                type: string
              move_to_candidate_key:
                type: ["string", "null"]
    SwapPoolResponse:
      type: object
      required: [id, amount0, amount1, liquidity]
      properties:
        id:
          type: string
        price:
          type: string
        amount0:
          type: string
          description: Reserve of lower-ID coin in atomic `pip`.
        amount1:
          type: string
          description: Reserve of higher-ID coin in atomic `pip`.
        liquidity:
          type: string
          description: Total supply of `LP-{id}` in atomic `pip`.
    SwapPoolItem:
      allOf:
        - $ref: "#/components/schemas/SwapPoolResponse"
        - type: object
          properties:
            coin0:
              type: string
            coin1:
              type: string
    LimitOrderItem:
      type: object
      properties:
        id:
          type: string
        coin_sell:
          $ref: "#/components/schemas/CoinRef"
        coin_buy:
          $ref: "#/components/schemas/CoinRef"
        want_sell:
          type: string
          description: Remaining sell volume in `pip`.
        want_buy:
          type: string
          description: Remaining buy target in `pip`.
        price:
          type: string
          description: 34-digit rational limit price.
        owner:
          type: string
        pool_id:
          type: string
        height:
          type: string
    CoinInfoResponse:
      type: object
      required: [id, name, symbol, volume, max_supply]
      properties:
        id:
          type: string
        name:
          type: string
        symbol:
          type: string
        volume:
          type: string
        crr:
          type: string
        reserve_balance:
          type: string
        max_supply:
          type: string
        owner_address:
          type: ["string", "null"]
        mintable:
          type: boolean
        burnable:
          type: boolean
        type:
          type: string
          enum: [coin, token, pool_token]
    PriceCommissionResponse:
      type: object
      required: [coin, payload_byte, send, create_ticker3, create_ticker4, create_ticker5, create_ticker6, create_ticker7_10]
      properties:
        coin:
          $ref: "#/components/schemas/CoinRef"
        payload_byte:
          type: string
        send:
          type: string
        buy_bancor:
          type: string
        sell_bancor:
          type: string
        sell_all_bancor:
          type: string
        buy_pool_base:
          type: string
        buy_pool_delta:
          type: string
        sell_pool_base:
          type: string
        sell_pool_delta:
          type: string
        sell_all_pool_base:
          type: string
        sell_all_pool_delta:
          type: string
        create_ticker3:
          type: string
        create_ticker4:
          type: string
        create_ticker5:
          type: string
        create_ticker6:
          type: string
        create_ticker7_10:
          type: string
        create_coin:
          type: string
        create_token:
          type: string
        recreate_coin:
          type: string
        recreate_token:
          type: string
        declare_candidacy:
          type: string
        delegate:
          type: string
        unbond:
          type: string
        redeem_check:
          type: string
        set_candidate_on:
          type: string
        set_candidate_off:
          type: string
        create_multisig:
          type: string
        multisend_base:
          type: string
        multisend_delta:
          type: string
        edit_candidate:
          type: string
        set_halt_block:
          type: string
        edit_ticker_owner:
          type: string
        edit_multisig:
          type: string
        edit_candidate_public_key:
          type: string
        create_swap_pool:
          type: string
        add_liquidity:
          type: string
        remove_liquidity:
          type: string
        edit_candidate_commission:
          type: string
        mint_token:
          type: string
        burn_token:
          type: string
        vote_commission:
          type: string
        vote_update:
          type: string
        failed_tx:
          type: string
        add_limit_order:
          type: string
        remove_limit_order:
          type: string
        move_stake:
          type: string
        lock_stake:
          type: string
        lock:
          type: string
    SendTransactionResponse:
      type: object
      required: [code, hash]
      properties:
        code:
          type: string
        log:
          type: string
        hash:
          type: string
          description: Canonical `Mt...` SHA-256 transaction hash.
    TransactionResponse:
      type: object
      required: [hash, raw_tx, height, index, from, nonce, gas, gas_price, gas_coin, type, data, code]
      properties:
        hash:
          type: string
        raw_tx:
          type: string
        height:
          type: string
        index:
          type: string
        from:
          type: string
        nonce:
          type: string
        gas:
          type: string
        gas_price:
          type: string
        gas_coin:
          $ref: "#/components/schemas/CoinRef"
        type_hex:
          type: string
        type:
          type: string
        data:
          type: object
        payload:
          type: string
          description: Base64-encoded UTF-8/binary transaction memo (`<= 10000` raw bytes in Minter v3.3.0 `executor_v3.go`, `+$0.0002/byte`).
        service_data:
          type: string
        code:
          type: string
          description: "`\"0\"` on success; non-zero indicates failed execution (`tx.fail_fee` charged)."
        log:
          type: string
        tags:
          type: object
          additionalProperties:
            type: string
    BlockResponse:
      type: object
      required: [hash, height, time, transaction_count]
      properties:
        hash:
          type: string
        height:
          type: string
        time:
          type: string
        transaction_count:
          type: string
        transactions:
          type: array
          items:
            $ref: "#/components/schemas/TransactionResponse"
        block_reward:
          type: string
        locked_stake_rewards:
          type: string
        size:
          type: string
        proposer:
          type: string
    CandidateResponse:
      type: object
      required: [reward_address, owner_address, control_address, total_stake, public_key, commission, status]
      properties:
        id:
          type: string
        reward_address:
          type: string
        owner_address:
          type: string
        control_address:
          type: string
        total_stake:
          type: string
        public_key:
          type: string
        commission:
          type: string
        used_slots:
          type: string
        uniq_users:
          type: string
        min_stake:
          type: string
        stakes:
          type: array
          items:
            type: object
        status:
          type: string
        validator:
          type: boolean
        jailed_until:
          type: string
