> For the complete documentation index, see [llms.txt](https://docs.harmony.one/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.harmony.one/home/developers/api/methods/transaction-related-methods/hmy_getstakingtransactionbyhash.md).

# hmy\_getStakingTransactionByHash

Get staking transaction by its hash.

## API v1

### Parameters

1. `String` - The staking transaction hash.

### Returns

* `hash` - `String`: Hash of the transaction.
* `nonce` - `Number`: The number of transactions made by the sender prior to this one.
* `blockHash` - `String`: Hash of the block where this transaction was in. `null` when its pending.
* `blockNumber` - `Number`: Block number where this transaction was in. `null` when its pending.
* `transactionIndex` - `Number`: Integer of the transactions index position in the block. `null` when its pending.
* `timestamp` - `Number`: transaction timestamp&#x20;
* `from` - `String`: Address of the sender.
* `value` - `String`: Value transferred in ATTO.
* `gasPrice` - `String`: Gas price provided by the sender.
* `gas` - `Number`: Gas provided by the sender.
* `v` - `String`: signature V
* `r` - `String`: signature R
* `s` - ~~`String`~~: signature S
* `type` - `String`: staking transaction type ("CreateValidator", "EditValidator", "CollectRewards", "Undelegate", "Delegate")
* `msg` - `StakingMsg:`
  * `CreateValidator:`
    * `validatorAddress` - `String:` validator address
    * `name` - `String:` validator name
    * `commissionRate` - `Number`: validator commission rate
    * `maxCommissionRate` - `Number`: validator commission rate
    * `maxChangeRate` - `Number`: validator max commission rate change
    * `minSelfDelegation` - `Number`: min how much validator self delegates
    * `maxTotalDelegation` - `Number`: max total delegation to validator
    * `amount` - `Number`: stake amount for validator
    * `website` - `String`: validator website
    * `identity` - `String`: validator kyc identity
    * `securityContact` - `String`: validator security contact
    * `details` - `String`: additional validator info
    * `slotPubKeys` - `[]String`: validator bls pub keys
  * `EditValidator:`
    * `validatorAddress` - `String:` validator address
    * `name` - `String`: validator name
    * `commissionRate` - `Number`: validator commission rate
    * `minSelfDelegation` - `Number`: min how much validator self delegates
    * `maxTotalDelegation` - `Number`: max total delegation to validator
    * `website` - `String`: validator website
    * `identity` - `String`: validator kyc identity
    * `securityContact` - `String`: validator security contact
    * `details` - `String`: additional validator info
    * `slotPubKeyToAdd` - `String`: validator bls pub key to add
    * `slotPubKeyToRemove` - `String`: validator bls pub key to remove
  * `CollectRewards:`
    * `delegatorAddress` - `String`: address to send rewards
  * `Delegate:`
    * `delegatorAddress` - `String:` delegation delegator address
    * `validatorAddress` - `String:` delegation validator address
    * `amount` - `Number`: big.Int amount for delegation to validator
  * `Undelegate:`
    * `delegatorAddress` - `String`: undelegation delegator address
    * `validatorAddress` - `String`: undelegation validator address
    * `amount` - `Number`: big.Int amount for undelegation to delegator

**Sample Curl Request**

```bash
curl -d '{
    "jsonrpc":"2.0",
    "method":"hmy_getStakingTransactionByHash",
    "params":[
      "0x1dff358dad4d0fc95b11acc9826b190d8b7971ac26b3f7ebdee83c10cafaf86f"
    ],
    "id":1
}' -H 'Content-Type:application/json' -X POST 'https://api.s0.b.hmny.io'
```

**Sample Curl Response**

```javascript
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": null
}
```

## API v2

### Parameters

1. `String`- The staking transaction hash.

### Returns

* `hash` - `String`: Hash of the transaction.
* `nonce` - `Number`: The number of transactions made by the sender prior to this one.
* `blockHash` - `String`: Hash of the block where this transaction was in. `null` when its pending.
* `blockNumber` - `Number`: Block number where this transaction was in. `null` when its pending.
* `transactionIndex` - `Number`: Integer of the transactions index position in the block. `null` when its pending.
* `timestamp` - `Number`: transaction timestamp&#x20;
* `from` - `String`: Address of the sender.
* `value` - `String`: Value transferred in ATTO.
* `gasPrice` - `String`: Gas price provided by the sender.
* `gas` - `Number`: Gas provided by the sender.
* `v` - `String`: signature V
* `r` - `String`: signature R
* `s` - ~~`String`~~: signature S
* `type` - `String`: staking transaction type ("CreateValidator", "EditValidator", "CollectRewards", "Undelegate", "Delegate")
* `msg` - `StakingMsg:`
  * `CreateValidator:`
    * `validatorAddress` - `String:` validator address
    * `name` - `String:` validator name
    * `commissionRate` - `Number`: validator commission rate
    * `maxCommissionRate` - `Number`: validator commission rate
    * `maxChangeRate` - `Number`: validator max commission rate change
    * `minSelfDelegation` - `Number`: min how much validator self delegates
    * `maxTotalDelegation` - `Number`: max total delegation to validator
    * `amount` - `Number`: stake amount for validator
    * `website` - `String`: validator website
    * `identity` - `String`: validator kyc identity
    * `securityContact` - `String`: validator security contact
    * `details` - `String`: additional validator info
    * `slotPubKeys` - `[]String`: validator bls pub keys
  * `EditValidator:`
    * `validatorAddress` - `String:` validator address
    * `name` - `String`: validator name
    * `commissionRate` - `Number`: validator commission rate
    * `minSelfDelegation` - `Number`: min how much validator self delegates
    * `maxTotalDelegation` - `Number`: max total delegation to validator
    * `website` - `String`: validator website
    * `identity` - `String`: validator kyc identity
    * `securityContact` - `String`: validator security contact
    * `details` - `String`: additional validator info
    * `slotPubKeyToAdd` - `String`: validator bls pub key to add
    * `slotPubKeyToRemove` - `String`: validator bls pub key to remove
  * `CollectRewards:`
    * `delegatorAddress` - `String`: address to send rewards
  * `Delegate:`
    * `delegatorAddress` - `String:` delegation delegator address
    * `validatorAddress` - `String:` delegation validator address
    * `amount` - `Number`: big.Int amount for delegation to validator
  * `Undelegate:`
    * `delegatorAddress` - `String`: undelegation delegator address
    * `validatorAddress` - `String`: undelegation validator address
    * `amount` - `Number`: big.Int amount for undelegation to delegator

**Sample Curl Request**

```bash
curl -d '{
    "jsonrpc":"2.0",
    "method":"hmyv2_getStakingTransactionByHash",
    "params":[
       "0x1dff358dad4d0fc95b11acc9826b190d8b7971ac26b3f7ebdee83c10cafaf86f"
    ],
    "id":1
}' -H 'Content-Type:application/json' -X POST 'https://api.s0.b.hmny.io'
```

**Sample Curl Response**

```javascript
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": null
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.harmony.one/home/developers/api/methods/transaction-related-methods/hmy_getstakingtransactionbyhash.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
