> ## Documentation Index
> Fetch the complete documentation index at: https://cobo-docs-feature-cobo-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Babylon Get Staking Info

> <Note>This content applies to WaaS 1.0 only. We highly recommend that you upgrade to [WaaS 2.0](https://www.cobo.com/developers/v2/guides/overview/introduction).</Note> This endpoint is used to query the specified pre-signed staking transaction information based on the provided parameter `request_id`

#### Request

<ParamField query="request_id" type="String" required>transaction request ID (unique identifier of a transaction request, which must correspond to a client's transaction; UUID should be used and the length should be equal to or less than 120 characters)</ParamField>

#### Response

<ResponseField name="success" type="bool">request successful or failed</ResponseField>

<ResponseField name="result" type="object">
  <Expandable title="object">
    <ResponseField name="request_id" type="String">Transaction request ID</ResponseField>
    <ResponseField name="cobo_id" type="String">Unique transaction ID in Cobo</ResponseField>
    <ResponseField name="staking_info" type="String">Detailed information of the staking transaction, in JSON format</ResponseField>

    <ResponseField name="status" type="Int">
      | Status Type                        | Code |
      | ---------------------------------- | ---- |
      | STAKING\_TX\_INIT                  | 1    |
      | STAKING\_TX\_WAITING\_BROADCASTING | 100  |
      | STAKING\_TX\_BROADCASTED           | 200  |
      | STAKING\_TX\_PENDING               | 300  |
      | STAKING\_ACTIVE                    | 400  |
      | STAKING\_OVERFLOW                  | 490  |
      | STAKING\_FAILED                    | 499  |
      | STAKING\_UNBONDINGREQUESTED        | 500  |
      | STAKING\_UNBONDING                 | 510  |
      | STAKING\_UNBONDED                  | 520  |
      | STAKING\_WITHDRAWN                 | 600  |

      <Tip>The 300 status indicates that the transaction has been confirmed on the BTC chain but not yet indexed by Babylon, while the 400 status indicates that the transaction has been successfully confirmed by the Babylon indexer.</Tip>
      <Tip>The 490 status indicates that the transaction has been successfully confirmed by the Babylon indexer, but because it exceeds Babylon's staking cap, it will not be included in the earnings calculation.</Tip>
      <Tip>The 500 status indicates that the unbonding request for the staking transaction has been sent to Babylon. The 510 status means that the unbonding transaction is waiting for Babylon to reach the required number of locked blocks. The 520 status indicates that the staking transaction has been successfully unbonded (either due to natural expiration or successful unbonding). Once this status is reached, the staking transaction can be withdrawn.</Tip>
      <Tip>The 600 status indicates that the staking transaction has been fully withdrawn and the staking transaction is closed.</Tip>
    </ResponseField>

    <ResponseField name="fee_rate" type="String">transaction fees per byte</ResponseField>
    <ResponseField name="max_staking_fee" type="Int">maximum fee for the staking transaction</ResponseField>
    <ResponseField name="sign_result" type="Json">signature result, which is in JSON format and contains the raw transaction hex</ResponseField>
    <ResponseField name="tx_hash" type="String">transaction hash</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```python Python
  request(
      "GET",
      "/v1/custody/mpc/babylon/get_staking_info/",
      {
          "request_id": "1717059604245",
      },
      api_key, api_secret, host
  )
  ```

  ```javascript JavaScript
  coboFetch('GET', '/v1/custody/mpc/babylon/get_staking_info/', {
      "request_id": "1717059604245"
  }, api_key, api_secret, host)
      .then(res => {
          res.json().then((data)=>{
              console.log(JSON.stringify(data, null, 4));
          })
      }).catch(err => {
          console.log(err)
      });
  ```

  ```go Go
  Request("GET", "/v1/custody/mpc/babylon/get_staking_info/", map[string]string{
      "request_id": "1717059604245"
  })
  ```
</RequestExample>

<ResponseExample>
  ```json
  {
    "success": true,
    "result": {
      "request_id": "1717134063431",
      "cobo_id": "20240531134105000300692000007801",
      "staking_info": "{\"asset_coin\": \"SIGNET_BTC\", \"stake_address\": \"tb1pufc6zv4wquhcshgr4lay4lqa6vua3m435hqmml9w74ycxxnv329qdl6cq2\", \"amount\": 50000, \"stake_block_time\": 64000, \"finality_provider\": \"88b32b005d5b7e29e6f82998aff023bff7b600c6a1a74ffac984b3aa0579b384\"}",
      "status": 200,
      "fee_rate": "100.00000000",
      "max_staking_fee": 50000,
      "sign_result": "{\"raw_tx\": \"0200000000010197a8e32b25590962075bf8517aa117459abd26593731e3d58ecf3c8cfb1b9a750200000000000000000350c30000000000002251205e5882d46eadd557b170a4dc73970bb663c37b262da3b7eb75ff9627c51d695b0000000000000000496a476262743400b450b244d588ad9979855f1de3816987e2644035679feee1a72020e3fc0c4dc988b32b005d5b7e29e6f82998aff023bff7b600c6a1a74ffac984b3aa0579b384fa00125f0c0000000000225120b450b244d588ad9979855f1de3816987e2644035679feee1a72020e3fc0c4dc90140ca3ce98e6837b4404af7e1087072e7306d132ae1ccbf5377f75bd7f2ee7678c9e623e167deaca981269cc317b6c25359b6b399bfb577d5414c17002ca34e463809080300\"}",
      "tx_hash": "7311feeeb9278f487be3c84662210540d8ac2dc24972721d7978915ef649f8c8"
    }
  }

  ```
</ResponseExample>
