Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 2.45 KB

method_get_account_transactions.md

File metadata and controls

63 lines (49 loc) · 2.45 KB

Method get_account_transactions

Description

Get all transactions sent by the account.

Parameters

Name Type Description
account string Hex-encoded account address
start unsigned int64 The start of account sequence number
limit unsigned int64 The maximum number of transactions to return.
include_events boolean Set to true to also fetch events generated by the transaction

Returns

Array of Transaction objects

if include_events is false, the events field in the Transaction object will be an empty array.

Example

// Request: fetches transaction for account address "0xc1fda0ec67c1b87bfb9e883e2080e530", starting sequence number 0, limit 100, without including events associated with this transaction
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"get_account_transactions","params":["c1fda0ec67c1b87bfb9e883e2080e530", 0, 100, false],"id":1}' https://testnet.diem.com/v1

// Response
{
    "id":1,
    "jsonrpc":"2.0",
    "result": [{
        "events":[],
        "gas_used":0,
        "transaction":{
            "expiration_timestamp_secs":1590680747,
            "gas_unit_price":0,
            "max_gas_amount":1000000,
            "public_key":"500a9002995e1af93bbdaf977385ed507b174bb3dc6936efd72612d56198a19d",
            "script":{
                "amount":10000000,
                "auth_key_prefix":"6484f428e88bba93de5053e051acb6ec",
                "metadata":"",
                "metadata_signature":"",
                "receiver":"4ac94d88e90acd4cf0294e898e421e94",
                "type":"peer_to_peer_transaction"
            },
            "script_hash":"c8bc3dda60e9662965b3223c22e3d3e3e7b6f698cf1a6930a449eb99daa35e7c",
            "sender":"c1fda0ec67c1b87bfb9e883e2080e530",
            "sequence_number":0,
            "signature":"fe335285e5d87db25f86041d033414bfdf77ddae6f0dfbdc65ff4f5965ff810ef9c85ce00ede0820ce0cf5903f9ab3e93fa6e49bbf770aba9b083a985361fa01",
            "signature_scheme":"Scheme::Ed25519",
            "type":"user"
        },
        "version":4433485,
        "vm_status": { "type": "executed" }
    }]
}