> ## 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.

# Progress exits

> Triggers all in-progress exits to advance by one step. The daemon already progresses exits automatically in the background—use this endpoint when you want immediate progress rather than waiting for the next automatic cycle. On each call, the endpoint checks whether previously broadcast transactions have confirmed and, if so, creates and broadcasts the next transaction in the sequence. The on-chain wallet must have sufficient bitcoin to cover transaction fees.



## OpenAPI

````yaml https://gitlab.com/ark-bitcoin/bark/-/raw/master/bark-rest/openapi.json post /api/v1/exits/progress
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/progress:
    post:
      tags:
        - exits
      summary: Progress exits
      description: >-
        Triggers all in-progress exits to advance by one step. The daemon
        already progresses exits automatically in the background—use this
        endpoint when you want immediate progress rather than waiting for the
        next automatic cycle. On each call, the endpoint checks whether
        previously broadcast transactions have confirmed and, if so, creates and
        broadcasts the next transaction in the sequence. The on-chain wallet
        must have sufficient bitcoin to cover transaction fees.
      operationId: exit_progress
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExitProgressRequest'
        required: true
      responses:
        '200':
          description: Returns the exit progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExitProgressResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    ExitProgressRequest:
      type: object
      properties:
        fee_rate:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Sets the desired fee-rate in sats/kvB to use broadcasting exit
            transactions
          minimum: 0
        wait:
          type:
            - boolean
            - 'null'
          description: Wait until the exit is completed
    ExitProgressResponse:
      type: object
      required:
        - exits
        - done
      properties:
        claimable_height:
          type:
            - integer
            - 'null'
          format: int32
          description: Block height at which all exit outputs will be spendable
          minimum: 0
        done:
          type: boolean
          description: Whether all transactions have been confirmed
        exits:
          type: array
          items:
            $ref: '#/components/schemas/ExitProgressStatus'
          description: Status of each pending exit transaction
    InternalServerError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ExitProgressStatus:
      type: object
      required:
        - vtxo_id
        - state
      properties:
        error:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ExitError'
              description: Any error that occurred during the exit process
        state:
          $ref: '#/components/schemas/ExitState'
          description: The current state of the exit transaction
        vtxo_id:
          type: string
          description: The ID of the VTXO that is being unilaterally exited
    ExitError:
      oneOf:
        - type: object
          required:
            - txid
            - error
            - type
          properties:
            error:
              type: string
            txid:
              type: string
            type:
              type: string
              enum:
                - ancestor-retrieval-failure
        - type: object
          required:
            - height
            - error
            - type
          properties:
            error:
              type: string
            height:
              $ref: '#/components/schemas/u32'
            type:
              type: string
              enum:
                - block-retrieval-failure
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - claim-missing-inputs
        - type: object
          required:
            - needed
            - output
            - type
          properties:
            needed:
              type: integer
              format: int64
              minimum: 0
            output:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - claim-fee-exceeds-output
        - type: object
          required:
            - vtxo
            - type
          properties:
            type:
              type: string
              enum:
                - claim-missing-signable-clause
            vtxo:
              type: string
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - claim-signing-error
        - type: object
          required:
            - vtxo
            - type
          properties:
            type:
              type: string
              enum:
                - cyclic-exit-transactions
            vtxo:
              type: string
        - type: object
          required:
            - vtxo_id
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - database-vtxo-store-failure
            vtxo_id:
              type: string
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - database-child-retrieval-failure
        - type: object
          required:
            - vtxo
            - dust
            - type
          properties:
            dust:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - dust-limit
            vtxo:
              type: integer
              format: int64
              minimum: 0
        - type: object
          required:
            - txid
            - error
            - type
          properties:
            error:
              type: string
            txid:
              type: string
            type:
              type: string
              enum:
                - exit-package-broadcast-failure
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - exit-package-finalize-failure
        - type: object
          required:
            - txid
            - error
            - type
          properties:
            error:
              type: string
            txid:
              type: string
            type:
              type: string
              enum:
                - exit-package-store-failure
        - type: object
          required:
            - needed
            - available
            - type
          properties:
            available:
              type: integer
              format: int64
              minimum: 0
            needed:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - insufficient-confirmed-funds
        - type: object
          required:
            - balance
            - total_fee
            - fee_rate_sat_per_kvb
            - fee_rate_kwu
            - type
          properties:
            balance:
              type: integer
              format: int64
              minimum: 0
            fee_rate_kwu:
              type: integer
              format: int64
              deprecated: true
              minimum: 0
            fee_rate_sat_per_kvb:
              type: integer
              format: int64
              minimum: 0
            total_fee:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - insufficient-fee-to-start
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - internal-error
        - type: object
          required:
            - txid
            - status
            - error
            - type
          properties:
            error:
              type: string
            status:
              $ref: '#/components/schemas/ExitTxStatus'
            txid:
              type: string
            type:
              type: string
              enum:
                - invalid-exit-transaction-status
        - type: object
          required:
            - tip
            - error
            - type
          properties:
            error:
              type: string
            tip:
              $ref: '#/components/schemas/u32'
            type:
              type: string
              enum:
                - invalid-locktime
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - invalid-wallet-state
        - type: object
          required:
            - txid
            - type
          properties:
            txid:
              type: string
            type:
              type: string
              enum:
                - missing-anchor-output
        - type: object
          required:
            - txid
            - type
          properties:
            txid:
              type: string
            type:
              type: string
              enum:
                - missing-exit-transaction
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - movement-registration-failure
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - tip-retrieval-failure
        - type: object
          required:
            - txid
            - error
            - type
          properties:
            error:
              type: string
            txid:
              type: string
            type:
              type: string
              enum:
                - transaction-retrieval-failure
        - type: object
          required:
            - vtxo
            - type
          properties:
            type:
              type: string
              enum:
                - vtxo-not-claimable
            vtxo:
              type: string
        - type: object
          required:
            - error
            - type
          properties:
            error:
              type: string
            type:
              type: string
              enum:
                - vtxo-script-pub-key-invalid
    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!
    u32:
      type: integer
      format: int32
      minimum: 0
    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
    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
    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
    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'
    ExitTx:
      type: object
      required:
        - txid
        - status
      properties:
        status:
          $ref: '#/components/schemas/ExitTxStatus'
        txid:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: AuthToken
      description: Base64url-encoded auth token

````