> ## Documentation Index
> Fetch the complete documentation index at: https://second.tech/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get exit status

> Returns the current state of an emergency exit for the specified VTXO, including which phase the exit is in (start, processing, awaiting-delta, claimable, claim-in-progress, or claimed). Optionally includes the full state transition history and the exit transaction packages with their CPFP children.



## OpenAPI

````yaml https://gitlab.com/ark-bitcoin/bark/-/raw/master/bark-rest/openapi.json get /api/v1/exits/status/{vtxo_id}
openapi: 3.1.0
info:
  title: barkd REST API
  description: >-
    A simple REST API for barkd, a wallet daemon for integrating bitcoin
    payments into your app over HTTP. Supports self-custodial Lightning, Ark,
    and on-chain out of the box.


    barkd is a long-running daemon best suited for always-on or
    high-connectivity environments like nodes, servers, desktops, and
    point-of-sale terminals.


    All endpoints return JSON. Amounts are denominated in satoshis.
  contact:
    name: Second Team
    email: hello@second.tech
  license:
    name: MIT
    identifier: MIT
  version: 0.1.4
servers: []
security:
  - bearer: []
tags:
  - name: boards
    description: Move on-chain bitcoin onto the Ark protocol.
  - name: exits
    description: Move bitcoin back on-chain without server cooperation.
  - name: fees
    description: Estimate fees for wallet operations before executing them.
  - name: lightning
    description: Create Lightning invoices and track receives.
  - name: onchain
    description: Manage barkd's on-chain bitcoin wallet.
  - name: wallet
    description: Manage Ark balances and VTXOs, send payments via Ark, LN, and on-chain.
  - name: bitcoin
    description: Query bitcoin network data.
  - name: notifications
    description: Receive real-time notifications from barkd.
paths:
  /api/v1/exits/status/{vtxo_id}:
    get:
      tags:
        - exits
      summary: Get exit status
      description: >-
        Returns the current state of an emergency exit for the specified VTXO,
        including which phase the exit is in (start, processing, awaiting-delta,
        claimable, claim-in-progress, or claimed). Optionally includes the full
        state transition history and the exit transaction packages with their
        CPFP children.
      operationId: get_exit_status_by_vtxo_id
      parameters:
        - name: vtxo_id
          in: path
          description: The VTXO to check the exit status of
          required: true
          schema:
            type: string
        - name: history
          in: query
          description: Whether to include the detailed history of the exit process
          required: false
          schema:
            type: boolean
        - name: transactions
          in: query
          description: Whether to include the exit transactions and their CPFP children
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Returns the exit status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExitTransactionStatus'
        '404':
          description: VTXO wasn't found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    ExitTransactionStatus:
      type: object
      required:
        - vtxo_id
        - state
      properties:
        history:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/ExitState'
          description: The history of each state the exit transaction has gone through
        state:
          $ref: '#/components/schemas/ExitState'
          description: The current state of the exit transaction
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/ExitTransactionPackage'
          description: Each exit transaction package required for the unilateral exit
        vtxo_id:
          type: string
          description: The ID of the VTXO that is being unilaterally exited
    NotFoundError:
      type: object
      required:
        - resources
        - message
      properties:
        message:
          type: string
        resources:
          type: array
          items:
            type: string
    InternalServerError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ExitState:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/ExitStartState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - start
        - allOf:
            - $ref: '#/components/schemas/ExitProcessingState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - processing
        - allOf:
            - $ref: '#/components/schemas/ExitAwaitingDeltaState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - awaiting-delta
        - allOf:
            - $ref: '#/components/schemas/ExitClaimableState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - claimable
        - allOf:
            - $ref: '#/components/schemas/ExitClaimInProgressState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - claim-in-progress
        - allOf:
            - $ref: '#/components/schemas/ExitClaimedState'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - claimed
      description: >-
        A utility type to wrap ExitState children so they can be easily
        serialized. This also helps with

        debugging a lot!
    ExitTransactionPackage:
      type: object
      required:
        - exit
      properties:
        child:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ChildTransactionInfo'
              description: >-
                The child transaction used to spend, and thus confirm, the exit
                anchor output
        exit:
          $ref: '#/components/schemas/TransactionInfo'
          description: >-
            The actual unilateral exit transaction containing an anchor output
            and a spendable amount
    ExitStartState:
      type: object
      required:
        - tip_height
      properties:
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitProcessingState:
      type: object
      required:
        - tip_height
        - transactions
      properties:
        tip_height:
          $ref: '#/components/schemas/u32'
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/ExitTx'
    ExitAwaitingDeltaState:
      type: object
      required:
        - tip_height
        - confirmed_block
        - claimable_height
      properties:
        claimable_height:
          $ref: '#/components/schemas/u32'
        confirmed_block:
          $ref: '#/components/schemas/BlockRef'
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitClaimableState:
      type: object
      required:
        - tip_height
        - claimable_since
      properties:
        claimable_since:
          $ref: '#/components/schemas/BlockRef'
        last_scanned_block:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BlockRef'
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitClaimInProgressState:
      type: object
      required:
        - tip_height
        - claimable_since
        - claim_txid
      properties:
        claim_txid:
          type: string
        claimable_since:
          $ref: '#/components/schemas/BlockRef'
        tip_height:
          $ref: '#/components/schemas/u32'
    ExitClaimedState:
      type: object
      required:
        - tip_height
        - txid
        - block
      properties:
        block:
          $ref: '#/components/schemas/BlockRef'
        tip_height:
          $ref: '#/components/schemas/u32'
        txid:
          type: string
    ChildTransactionInfo:
      type: object
      description: >-
        Represents a child transaction for an exit transaction package with
        information about the origin

        of the transaction
      required:
        - info
        - origin
      properties:
        info:
          $ref: '#/components/schemas/TransactionInfo'
        origin:
          $ref: '#/components/schemas/ExitTxOrigin'
    TransactionInfo:
      type: object
      description: >-
        An information struct used to pair the ID of a transaction with the full
        transaction for ease

        of use and readability for the user
      required:
        - txid
        - tx
      properties:
        tx:
          type: string
        txid:
          type: string
    u32:
      type: integer
      format: int32
      minimum: 0
    ExitTx:
      type: object
      required:
        - txid
        - status
      properties:
        status:
          $ref: '#/components/schemas/ExitTxStatus'
        txid:
          type: string
    BlockRef:
      type: object
      description: >-
        Reference to a block in the blockchain.


        Contains the block height and hash. Serializes as an object with
        `height` and `hash` fields.
      required:
        - height
        - hash
      properties:
        hash:
          type: string
        height:
          $ref: '#/components/schemas/u32'
    ExitTxOrigin:
      oneOf:
        - type: object
          required:
            - type
          properties:
            confirmed_in:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/BlockRef'
            type:
              type: string
              enum:
                - wallet
        - type: object
          required:
            - fee_rate_sat_per_kvb
            - fee_rate
            - total_fee
            - type
          properties:
            fee_rate:
              type: integer
              format: int64
              deprecated: true
              minimum: 0
            fee_rate_sat_per_kvb:
              type: integer
              format: int64
              description: >-
                This is the effective fee rate of the transaction (including
                CPFP ancestors)
              minimum: 0
            total_fee:
              type: integer
              format: int64
              description: This includes the fees of the CPFP ancestors
              minimum: 0
            type:
              type: string
              enum:
                - mempool
        - type: object
          required:
            - confirmed_in
            - type
          properties:
            confirmed_in:
              $ref: '#/components/schemas/BlockRef'
            type:
              type: string
              enum:
                - block
    ExitTxStatus:
      oneOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - verify-inputs
        - type: object
          required:
            - txids
            - type
          properties:
            txids:
              type: array
              items:
                type: string
            type:
              type: string
              enum:
                - awaiting-input-confirmation
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - needs-signed-package
        - type: object
          required:
            - min_fee_rate_sat_per_kvb
            - min_fee_rate_kwu
            - min_fee
            - type
          properties:
            min_fee:
              type: integer
              format: int64
              minimum: 0
            min_fee_rate_kwu:
              type: integer
              format: int64
              deprecated: true
              minimum: 0
            min_fee_rate_sat_per_kvb:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - needs-replacement-package
        - type: object
          required:
            - child_txid
            - origin
            - type
          properties:
            child_txid:
              type: string
            origin:
              $ref: '#/components/schemas/ExitTxOrigin'
            type:
              type: string
              enum:
                - needs-broadcasting
        - type: object
          required:
            - child_txid
            - origin
            - type
          properties:
            child_txid:
              type: string
            origin:
              $ref: '#/components/schemas/ExitTxOrigin'
            type:
              type: string
              enum:
                - broadcast-with-cpfp
        - type: object
          required:
            - child_txid
            - block
            - origin
            - type
          properties:
            block:
              $ref: '#/components/schemas/BlockRef'
            child_txid:
              type: string
            origin:
              $ref: '#/components/schemas/ExitTxOrigin'
            type:
              type: string
              enum:
                - confirmed
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: AuthToken
      description: Base64url-encoded auth token

````