---
title: "BTCDelegation retrieves delegation by corresponding staking tx hash"
method: GET
path: "/babylon/btcstaking/v1/btc_delegation/{staking_tx_hash_hex}"
tags: ["Query"]
---

# BTCDelegation retrieves delegation by corresponding staking tx hash

`GET /babylon/btcstaking/v1/btc_delegation/{staking_tx_hash_hex}`

## Request

- The document declares no server URL.
- Auth: none declared

## Path parameters

- `staking_tx_hash_hex` string, required

## Response `200`

A successful response.

- object
  - `btc_delegation` object: BTCDelegation represents the client needed information of an BTCDelegation.
    - `staker_addr` string: staker_addr is the address to receive rewards from BTC delegation.
    - `btc_pk` string, byte
    - `fp_btc_pk_list` string[]
    - `staking_time` integer
    - `start_height` integer
    - `end_height` integer
    - `total_sat` string, uint64
    - `staking_tx_hex` string
    - `slashing_tx_hex` string
    - `delegator_slash_sig_hex` string: delegator_slash_sig_hex is the signature on the slashing tx by the delegator (i.e., SK corresponding to btc_pk) as string hex. It will be a part of the witness for the staking tx output.
    - `covenant_sigs` object[]: covenant_sigs is a list of adaptor signatures on the slashing tx by each covenant member It will be a part of the witness for the staking tx output.
      - `cov_pk` string, byte
      - `adaptor_sigs` string[]
    - `staking_output_idx` integer
    - `active` boolean
    - `status_desc` string: descriptive status of current delegation.
    - `unbonding_time` integer
    - `undelegation_response` object: undelegation_response is the undelegation info of this delegation.
      - `unbonding_tx_hex` string: unbonding_tx is the transaction which will transfer the funds from staking output to unbonding output. Unbonding output will usually have lower timelock than staking output. The unbonding tx as string hex.
      - `covenant_unbonding_sig_list` object[]
        - `pk` string, byte
        - `sig` string, byte
      - `slashing_tx_hex` string
      - `delegator_slashing_sig_hex` string: delegator_slashing_sig is the signature on the slashing tx by the delegator (i.e., SK corresponding to btc_pk). It will be a part of the witness for the unbonding tx output. The delegator slashing sig as string hex.
      - `covenant_slashing_sigs` object[]: covenant_slashing_sigs is a list of adaptor signatures on the unbonding slashing tx by each covenant member It will be a part of the witness for the staking tx output.
        - `cov_pk` string, byte
        - `adaptor_sigs` string[]
      - `delegator_unbonding_info_response` object
        - `spend_stake_tx_hex` string
    - `params_version` integer
    - `stk_exp` object: stk_exp contains the stake expansion information, if nil it is NOT a stake expansion.
      - `previous_staking_tx_hash_hex` string: previous_staking_tx_hash is the hex hash of the staking tx that was used as input to the stake expansion.
      - `other_funding_tx_out_hex` string: other_funding_tx_out is the other funding output (TxOut) which was used as input to construct the BTC delegation. The stake expansion has a set of 2 inputs, the first input is the previous staking transaction and the second input (this one) is to pay for fees and optionally to add more stake to the BTC delegation.
      - `previous_stk_covenant_sigs` object[]: previous_stk_covenant_sigs is a list of signatures on the stake expansion transaction (i.e., the transaction spending the previous staking transaction {previous_staking_tx_hash}) by each covenant member. It must be provided to allow the previous staking tx to be spent as an transaction input of another BTC staking transaction.
        - `pk` string, byte
        - `sig` string, byte

## Other responses

- `default`: An unexpected error response.

## Changes

- **2025-01-20** `c22c13d24c41`: 1 info
  - endpoint added
- **2023-02-14** `56ada4e129e1`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs/changes/babylon/btcstaking/v1/btc_delegation/:staking_tx_hash_hex/get.md)

---

[API](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs.md) - [All operations](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs/revisions/93a09c641887?raw)
