Harmony
Support ForumGithubTelegramDiscord
  • Welcome
  • 🎶General
    • Introduction
      • What is Harmony?‌
      • Roadmap
      • Strategy & Architecture
      • Study Materials
      • FAQ
    • Technology
      • Key Features
      • Randomness
      • Sharding
      • Consensus
      • Effective Proof-of-Stake
      • Tokenomics
      • Transactions
    • LayerZero Bridge
      • Important Notice
      • Bridge tutorial
      • FAQ
        • What token will I get after the bridge
        • How to find a bridged token address
    • Ecosystem
      • Wallets
        • 1Wallet
        • Gnosis Safe
        • Hardware Wallets
          • Trezor
          • Ledger Nano
            • Ledger with Metamask
            • Download & Setup
            • Ledger with HMY CLI
            • Ledger with Staking Dashboard
              • Sign In With Ledger
              • Sending transactions via Ledger
              • Staking Transactions via Ledger
          • Safepal
            • Download & setup
            • Create/import account
            • Send transaction
        • Browser Extension Wallets
          • Metamask
            • Installing MetaMask
            • Adding Harmony
            • Create a New Account
            • Sending & Receiving
            • Adding Custom Harmony Tokens
            • Import an Account
          • Math Wallet
            • Download & Setup
            • Create/Import/Export Wallet
            • Sending Transactions
            • Staking
            • Collecting Rewards
            • Undelegating
          • Harmony Chrome Extension Wallet
        • Desktop Wallets
          • Guarda Wallet
          • Staking4All Wallet
        • Mobile Wallets
          • Metamask Wallet
          • Blits Wallet
          • Cobo Wallet
          • Frontier Wallet
          • Guarda Wallet
          • Infinity Wallet
          • ONTO Wallet
          • Sef Wallet
          • Trust Wallet
          • Trustee Wallet
        • Web Wallets
          • Guarda Wallet
        • HMY CLI (Harmony Command Line Interface)
          • Download & Setup
          • Create or Import Wallet
          • Sending Transactions
          • Staking Transactions
          • Querying Balances
          • Querying the Blockchain
          • List of Transaction Error Messages
          • Cookbook
          • Other CLI References
      • DApps
        • User Guide
        • DeFi
          • Sushi
          • Onsen
        • CLI 1Wallet User Guide
        • Media
          • Timeless
        • FAQ
        • NFTs
      • Partners
        • Exchanges
        • Fiat Gateways
        • DeFi Protocols
      • Integrations
      • Cross-Border Finance
      • DAOs
        • Components & Tools
          • Snapshot
        • Community DAO
        • Validator DAO
        • Developer DAO
    • Community
  • 🏗️Developers
    • Getting Started
      • Network & Faucets
      • List of RPC Providers
      • Remix IDE
      • Dev Environment Setup
      • Ethereum Compatibility
    • Deploying on Harmony
      • Using Remix
        • Ethereum Remix
        • Harmony Remix
      • Using Truffle
      • Using Hardhat
      • Using Web3
      • Using Harmony-JS
        • Setup
        • Compile & Deploy
        • Demo: Deploying an Ethereum Smart Contract on Harmony
      • Deploy HRC20
      • Smart Contract Verification
    • SDK
      • Web3.js
        • Using Web3.js to Send Transactions on Harmony
        • Find the last transaction
      • JavaScript SDK
      • Go CLI
      • Java SDK
      • Python SDK
      • Harmony Ethers.js Wrapper
    • API
      • Methods
        • Account Methods
          • hmy_getBalanceByBlockNumber
          • hmy_getTransactionCount
          • hmy_getBalance
        • Filter Methods
          • hmy_getFilterLogs
          • hmy_newFilter
          • hmy_newPendingTransactionFilter
          • hmy_newBlockFilter
          • hmy_getFilterChanges
          • hmy_getLogs
        • Transaction Related Methods
          • hmy_getStakingTransactionByBlockHashAndIndex
          • hmy_getStakingTransactionByBlockNumberAndIndex
          • hmy_getStakingTransactionByHash
          • hmy_getCurrentTransactionErrorSink
          • hmy_getPendingCrossLinks
          • hmy_getPendingCXReceipts
          • hmy_getCXReceiptByHash
          • hmy_pendingTransactions
          • hmy_sendRawStakingTransaction
          • hmy_getTransactionsHistory
          • hmy_sendRawTransaction
          • hmy_getTransactionReceipt
          • hmy_getBlockTransactionCountByHash
          • hmy_getBlockTransactionCountByNumber
          • hmy_getTransactionByHash
          • hmy_getTransactionByBlockNumberAndIndex
          • hmy_getTransactionByBlockHashAndIndex
          • hmy_getBlockByNumber
          • hmy_getBlockByHash
          • hmy_getBlocks
        • Contract Related Methods
          • hmy_estimateGas
          • hmy_getStorageAt
          • hmy_call
          • hmy_getCode
        • Protocol Related Methods
          • hmy_isLastBlock
          • hmy_epochLastBlock
          • hmy_latestHeader
          • hmy_getShardingStructure
          • hmy_blockNumber
          • hmy_syncing
          • hmy_gasPrice
          • net_peerCount
          • hmy_getEpoch
          • hmy_getLeader
        • Staking Related Methods
          • hmy_getCirculatingSupply
          • hmy_getTotalSupply
          • hmy_getStakingNetworkInfo
          • hmy_getAllValidatorInformation
          • hmy_getAllValidatorInformationByBlockNumber
          • hmy_getCurrentUtilityMetrics
          • hmy_getDelegationsByValidator
          • hmy_getDelegationsByDelegatorAndValidator
          • hmy_getDelegationsByDelegator
          • hmy_getValidatorMetrics
          • hmy_getMedianRawStakeSnapshot
          • hmy_getElectedValidatorAddresses
          • hmy_getAllValidatorAddresses
          • hmy_getCurrentStakingErrorSink
          • hmy_getValidatorInformation
          • hmy_getValidators
          • hmy_getSignedBlocks
          • hmy_isBlockSigner
          • hmy_getBlockSigners
        • Tracing Methods
          • trace_block
          • trace_transaction
      • Sample Code
    • Tools
      • Harmony VRF
      • The Graph
      • Envio
      • Ganache
        • Harmony Ganache
      • Harmony-React
      • Oracles
        • Band Protocol
      • Smart Contract Verification
    • Tutorials
      • Deploying HRC20
      • Deploying HRC721/NFT
      • The Graph - Subgraphs
        • Building & Deploying Subgraph (local node)
      • Using Band Oracle
      • Using Crosschain API
        • Scripts
        • Testing
        • Webserver
      • Using Web3.py & Pyhmy
      • Using IPFS & Filecoin
        • Using IPFS
        • Using NFT.storage
      • Indexing HRC20 with Envio
      • Building a Simple Metaverse Contract
      • Building a Simple Bridge with Ethereum
      • Staking for Multisig
    • DApp Examples
      • DApp Samples
      • Games
        • Harmony Puzzle
      • Cross-Chain
      • DeFi
      • Hackathons
        • DevPost
        • Hack the Horizon
      • Others
    • Wallets
      • Metamask
        • Interacting With Metamask
        • Using Metamask with Harmony Smart Contracts
        • Add or Switch to Harmony chain on Metamask
      • Harmony Chrome Extension Wallet
      • Math Wallet
      • WalletConnect
    • Harmony Stack and Projects
  • 🌏Network
    • Governance
      • Network Governance
        • Voting via Governance App
        • Voting via HMY CLI
      • HRC-20 Governance
      • FAQ
    • Validators
      • Terms & Concepts
        • Validator, BLS key, Instance
          • Shard Assignment
        • Slots Bidding and Election
        • Effective Proof-of-Stake
        • Block Reward
        • Epoch Transition
        • Slashing
        • Undelegation
      • Server Setup
        • Requirements
        • Cloud Guides
          • Digital Ocean
          • Vultr
          • AWS
          • Google Cloud
        • Raspberry Pi Guide
      • Node Setup
        • 1. HMY CLI Download
        • 2. Setting up BLS Keys
        • 3. Syncing DB
        • 4. Installing & Updating
          • Installing A Node
            • Using Node Binary
            • (Deprecated) Using AutoNode
              • Install & Run
              • Update
              • Monitor
              • BLS Key Management
              • Collect Rewards
              • Maintenance
              • Troubleshoot
              • Extra
            • (deprecated) Using Node.sh
          • Upgrading A Node
            • Using Node Binary
            • Using AutoNode (deprecated)
            • Using Node.sh (deprecated)
          • Checking A Node
      • Creating A Validator
      • Managing A Validator
        • Checking Validator Information
        • Changing Validator Information
        • Delegating To A Validator
        • Undelegating From A Validator
        • Check Your Delegations
        • Collecting Rewards
        • Adding A Validator Logo
      • Staking Dashboard Basics
      • Validator Information Terms
      • Validator Security Tips
      • Slashing and Uptime
      • Monitoring
        • Node Sync
        • Prometheus & Grafana
        • Network Status
      • Troubleshooting
        • Why am i not Elected?
        • Frequently Asked Questions (FAQ)
      • Tools
        • Telegram Bots
        • Dashboards
        • Reward Calculators
        • Text User Interface (TUI)
        • HMY Bidder
        • Mobile Apps
          • One Validator Dashboard
          • Termux
    • Delegators
      • Introduction
      • Staking
        • Via Browser
          • Staking Dashboard
          • Staking Transactions
          • Sending Transactions
        • Via Mobile
        • FAQ
      • Redelegation
      • Informational Videos
Powered by GitBook
On this page
  • Description
  • Parameters
  • API v1
  • API v2

Was this helpful?

Export as PDF
  1. Developers
  2. API
  3. Methods
  4. Transaction Related Methods

hmy_getTransactionsHistory

hmy_getTransactionsHistory

Description

hmy_getTransactionsHistory get transactions history for an address

Parameters

  • String - one address ("one1...")

  • txHistoryArgs - json args

    • txType - String : optional, Received or Sent, shows all transactions by default

    • fullTx - Bool : optional, shows full transaction or just its hash, default is false

    • pageSize - Number : optional, pagination page size, how much tx to show in single page, default is 100

    • pageIndex - Number : optional, pagination which page to show, default is 0

    • txType - String: optional, "ALL", "RECEIVED", "SENT", default is "ALL"

    • order - String: optional, "ASC", "DESC", default is "ASC", order by timestamp

API v1

Returns

  • Array - either returns list of transactions

    • 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 it's pending.

    • blockNumber - Number: Block number where this transaction was in. null when it's pending.

    • transactionIndex - Number: Integer of the transaction's index position in the block. null when its pending.

    • from - String: Address of the sender.

    • to - String: Address of the receiver.

    • value - String: Value transferred in ATTO.

    • gasPrice - String: Gas price provided by the sender.

    • gas - Number: Gas provided by the sender.

    • input - String: The data sent along with the transaction.

  • Array of String - or list of transactions hashes

Sample Curl Request 0

curl -d '{
    "jsonrpc": "2.0",
    "method": "hmy_getTransactionsHistory",
    "params": [{
        "address": "one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7",
        "pageIndex": 0,
        "pageSize": 1000,
        "fullTx": true,
        "txType": "ALL",
        "order": "ASC"
    }],
    "id": 1
}' -H "Content-Type:application/json" -X POST "https://api.s0.b.hmny.io"

Sample Curl Response 0

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "transactions": [
            {
                "blockHash": "0x0bde901cd3599aa082482777fd0a7fed3f02b7b5a9096b7ea7b2fcb8addaa05d",
                "blockNumber": "0x12",
                "from": "one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7",
                "gas": "0x5208",
                "gasPrice": "0x3b9aca00",
                "hash": "0x230798fe22abff459b004675bf827a4089326a296fa4165d0c2ad27688e03e0c",
                "input": "0x",
                "nonce": "0x0",
                "to": "one129r9pj3sk0re76f7zs3qz92rggmdgjhtwge62k",
                "transactionIndex": "0x1",
                "value": "0x16345785d8a0000",
                "shardID": 0,
                "toShardID": 0,
                "v": "0x27",
                "r": "0x57766aa1304e97f8b71a9fa54a61b61ce8ef9ad177fcb337dd81827aad184327",
                "s": "0x3b3e5767899e8af5e75d62243a725371f08705b91e2305459e6fd8e8d2646651"
            }
        ]
    }
}

Sample Curl Request 1

curl -d '{
    "jsonrpc": "2.0",
    "method": "hmy_getTransactionsHistory",
    "params": [{
        "address": "one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7",
        "pageIndex": 0,
        "pageSize": 1000,
        "fullTx": false,
        "txType": "ALL",
        "order": "ASC"
    }],
    "id": 1
}' -H "Content-Type:application/json" -X POST "https://api.s0.b.hmny.io"

Sample Curl Response 1

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "transactions": [
            "0x230798fe22abff459b004675bf827a4089326a296fa4165d0c2ad27688e03e0c"
        ]
    }
}

API v2

Returns

  • Array - either returns list of transactions

    • 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 it's pending.

    • blockNumber - Number: Block number where this transaction was in. null when it's pending.

    • transactionIndex - Number: Integer of the transaction's index position in the block. null when its pending.

    • from - String: Address of the sender.

    • to - String: Address of the receiver.

    • value - Number: Value transferred in ATTO.

    • gasPrice - Number: Gas price provided by the sender.

    • gas - Number: Gas provided by the sender.

    • input - String: The data sent along with the transaction.

  • Array of String - or list of transactions hashes

Sample Curl Request 0

curl -d '{
    "jsonrpc": "2.0",
    "method": "hmyv2_getTransactionsHistory",
    "params": [{
        "address": "one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7",
        "pageIndex": 0,
        "pageSize": 1000,
        "fullTx": true,
        "txType": "ALL",
        "order": "ASC"
    }],
    "id": 1
}' -H "Content-Type:application/json" -X POST "https://api.s0.b.hmny.io"

Sample Curl Response 0

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "transactions": [
            {
                "blockHash": "0x6c92a52b0ef172e9352cf69acc945b310592c743a319d488053635e5caec730a",
                "blockNumber": 4,
                "from": "one1spshr72utf6rwxseaz339j09ed8p6f8ke370zj",
                "timestamp": 1580422063,
                "gas": 21000,
                "gasPrice": 1000000000,
                "hash": "0x8b8d3e33442828e4eaed0c335cb6fdb953fbdbaef519261bd6ddec83d529d85e",
                "input": "0x",
                "nonce": 0,
                "to": "one1r4zyyjqrulf935a479sgqlpa78kz7zlcg2jfen",
                "transactionIndex": 0,
                "value": 100000000000000000,
                "shardID": 0,
                "toShardID": 1,
                "v": "0x27",
                "r": "0x55e9f46eca0060821a6bdafe51210132a174e93658ec1b7430ed7cb57a9abc1",
                "s": "0x4105b1d6c7310ea4af44759d717d8a5c9b52731e4877ae45110da43f184905f8"
            },
            {
                "blockHash": "0x6e056a09aa5a96bf3533bb21c0ec2b5dcfe0186215146e68fa2d05eb017e0594",
                "blockNumber": 10,
                "from": "one1spshr72utf6rwxseaz339j09ed8p6f8ke370zj",
                "timestamp": 1580422111,
                "gas": 21000,
                "gasPrice": 1000000000,
                "hash": "0xe3c321cb567de1efaf598364ee343e0d847106b881f4002f894a939de88e8cbc",
                "input": "0x",
                "nonce": 1,
                "to": "one1r4zyyjqrulf935a479sgqlpa78kz7zlcg2jfen",
                "transactionIndex": 0,
                "value": 100000000000000000,
                "shardID": 0,
                "toShardID": 1,
                "v": "0x27",
                "r": "0xd15867fe581a54ce417d98f94abb52fa4358841b5dedcbba0cab19ecd0c0fd4e",
                "s": "0x21c80f304eb1f27875bd1f5baeed6d75cb057e89533886195f2201686fd8e1ff"
            }
        ]
    }
}

Sample Curl Request 1

curl -d '{
    "jsonrpc": "2.0",
    "method": "hmyv2_getTransactionsHistory",
    "params": [{
        "address": "one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7",
        "pageIndex": 0,
        "pageSize": 1000,
        "fullTx": false,
        "txType": "ALL",
        "order": "ASC"
    }],
    "id": 1
}' -H "Content-Type:application/json" -X POST "https://api.s0.b.hmny.io"

Sample Curl Response 1

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "transactions": [
            "0x230798fe22abff459b004675bf827a4089326a296fa4165d0c2ad27688e03e0c"
        ]
    }
}
Previoushmy_sendRawStakingTransactionNexthmy_sendRawTransaction

Last updated 2 years ago

Was this helpful?

🏗️