EOS开发(八)RPC API

1. 前言

除了之前我们讲的,使用命令行cleos与EOS的私有网络/测试网络/主网络交互,我们还可以使用RPC的方式与其交互。

下面的RPC API只拣选了一些主要的API,后续将持续更新。完整的API命令参考官方文档:

  • v1.1.0(包含wallet) https://developers.eos.io/eosio-nodeos/v1.1.0/reference

  • v1.2.0 https://developers.eos.io/eosio-nodeos/reference

2. IPs

可以通过指定IP,访问私有网络/测试网络/主网络的API:

  • 私有网络。默认为http://127.0.0.1:8888

  • 测试网络。使用Jungle Test的测试网络节点。http://jungle.cryptolions.io:18888

  • 主网络。使用eosnewyork的主网络节点。https://api.eosnewyork.io

  • 自起节点。可以在自己的服务器上建立一个节点,同步所有区块,访问该服务器IP和为节点设定的端口。这个后面再讲

3. APIs

可以使用Postman对API进行测试

3.1 CHAIN链相关

get_info 获取区块链信息

post
v1/chain/get_info

api:
http://jungle.cryptolions.io:18888/v1/chain/get_info

params:
无

returns:
{
    "server_version": "cc9decff",
    "chain_id": "038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca",
    "head_block_num": 13648441,
    "last_irreversible_block_num": 13648110,
    "last_irreversible_block_id": "00d040eef39e8acfc931af6d2a2c94ad383b7c9876ccfe974de906daf0319adc",
    "head_block_id": "00d04239a857ad14dec1f3bc823a37ca8174a4da04facfbfa08106b7a9142fb8",
    "head_block_time": "2018-09-10T08:06:59.000",
    "head_block_producer": "bohdanjungle",
    "virtual_block_cpu_limit": 200000000,
    "virtual_block_net_limit": 1048576000,
    "block_cpu_limit": 199900,
    "block_net_limit": 1048576,
    "server_version_string": "v1.2.4-dirty"
}

server_version:服务器版本
chain_id:链id。判断当前处于私有/测试/主网络
head_block_num:当前最新区块号

get_block 根据区块号或id获取区块详情

post
v1/chain/get_block

api:
http://jungle.cryptolions.io:18888/v1/chain/get_block

params:
{"block_num_or_id":"13598552"}

returns:
{
    "timestamp": "2018-09-10T01:08:33.000",
    "producer": "alohaeostest",
    "confirmed": 0,
    "previous": "00cf7f573348c16e2ae8d6568627fef48f2574a55272089aeefd095e85c3f6a2",
    "transaction_mroot": "0000000000000000000000000000000000000000000000000000000000000000",
    "action_mroot": "aefd485dc71ce3311c9752e6b013284f3ddb66aa74341ec7f613d80e72373925",
    "schedule_version": 217,
    "new_producers": null,
    "header_extensions": [],
    "producer_signature": "SIG_K1_JxS3csRWYy9rae6UYtaZ3zHhhgkFHUYHAv6drLmjbQLo56ng4mUSsBBeuTPeYyAyoes9qoWjnhNn24noJbdoAj437gpwA1",
    "transactions": [],
    "block_extensions": [],
    "id": "00cf7f58cc628c555fa92b03d8ba5139124f2cd15879e1f8f6861592a5bd34ca",
    "block_num": 13598552,
    "ref_block_prefix": 53193055
}

timestamp:时间戳
id:区块id
block_num:区块号

get_account 根据账户名获取账户详情

post
v1/chain/get_account

api:
http://jungle.cryptolions.io:18888/v1/chain/get_account

params:
{"account_name":"testnetyy111"}

returns:
{
    "account_name": "testnetyy111",
    "head_block_num": 13650599,
    "head_block_time": "2018-09-10T08:25:05.000",
    "privileged": false,
    "last_code_update": "2018-09-06T01:34:04.500",
    "created": "2018-09-05T02:26:09.000",
    "core_liquid_balance": "9641.6587 EOS",
    "ram_quota": 1919695,
    "net_weight": 1000000,
    "cpu_weight": 1000000,
    "net_limit": {
        "used": 8579,
        "available": 19172028,
        "max": 19180607
    },
    "cpu_limit": {
        "used": 15885,
        "available": 3636843,
        "max": 3652728
    },
    "ram_usage": 194676,
    "permissions": [
        {
            "perm_name": "active",
            "parent": "owner",
            "required_auth": {
                "threshold": 1,
                "keys": [
                    {
                        "key": "EOS6Z7mUQeFC2cQTT3xMyZh2wsLQoHih1bTMgRhr3dbichprTi7Rc",
                        "weight": 1
                    }
                ],
                "accounts": [],
                "waits": []
            }
        },
        {
            "perm_name": "owner",
            "parent": "",
            "required_auth": {
                "threshold": 1,
                "keys": [
                    {
                        "key": "EOS6cnhSLTn4eSUEqS4nC8frYTsVsjeH2M3hos1TUeCgme2Yim5Q5",
                        "weight": 1
                    }
                ],
                "accounts": [],
                "waits": []
            }
        }
    ],
    "total_resources": {
        "owner": "testnetyy111",
        "net_weight": "100.0000 EOS",
        "cpu_weight": "100.0000 EOS",
        "ram_bytes": 1919695
    },
    "self_delegated_bandwidth": {
        "from": "testnetyy111",
        "to": "testnetyy111",
        "net_weight": "100.0000 EOS",
        "cpu_weight": "100.0000 EOS"
    },
    "refund_request": null,
    "voter_info": {
        "owner": "testnetyy111",
        "proxy": "",
        "producers": [],
        "staked": 4000000,
        "last_vote_weight": "0.00000000000000000",
        "proxied_vote_weight": "0.00000000000000000",
        "is_proxy": 0
    }
}

created:创建时间
core_liquid_balance:eos余额
以及公钥和资源的使用和抵押情况

get_currency_balance 指定代币合约,获取账户中该代币的余额

post
v1/chain/get_currency_balance

api:
http://jungle.cryptolions.io:18888/v1/chain/get_currency_balance

params:
{"code":"eosio.token", "account":"testnetyy111", "symbol":"eos"}

returns:
[
    "9641.6587 EOS"
]

params:
{"code":"testnetyy111", "account":"testnetyy111", "symbol":"ray"}

returns:
[
    "99999800.0000 RAY"
]

get_currency_stats 获取某种资产的详情

post
v1/chain/get_currency_stats

api:
http://jungle.cryptolions.io:18888/v1/chain/get_currency_stats

params:
{"code":"eosio.token", "symbol":"EOS"}

returns:
{
    "EOS": {
        "supply": "5061352576.2866 EOS",
        "max_supply": "10000000000.0000 EOS",
        "issuer": "eosio"
    }
}

params:
{"code":"testnetyy111", "symbol":"RAY"}

returns:
{
    "RAY": {
        "supply": "100000000.0000 RAY",
        "max_supply": "100000000.0000 RAY",
        "issuer": "testnetyy111"
    }
}

EOS/RAY:资产名称
supply:已发行量
max_supply:总发行量
issuer:发行人账户

abi_json_to_bin 将交易的json格式序列化为bin格式

post
v1/chain/abi_json_to_bin

api:
http://jungle.cryptolions.io:18888/v1/chain/abi_json_to_bin

params:
{"code":"eosio.token","action":"transfer","args":{"from":"testnetyy111","to":"testneths111","quantity":"100.0000 EOS", "memo":"hi there"}}

returns:
{
    "binargs": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
}

binargs:序列化后的字符串

get_required_keys 根据交易信息和提供的公钥,筛选出本次交易需要使用的公钥

post
v1/chain/get_required_keys

api:
http://jungle.cryptolions.io:18888/v1/chain/get_required_keys

params:
{
    "available_keys": [
        "EOS6cnhSLTn4eSUEqS4nC8frYTsVsjeH2M3hos1TUeCgme2Yim5Q5",
        "EOS6Z7mUQeFC2cQTT3xMyZh2wsLQoHih1bTMgRhr3dbichprTi7Rc",
        "EOS7RkP6aevKjN1CiKSqo44Gi1HhPYBczGFgSduBXBD7uHUFhg2qC",
        "EOS7sGb8DfutGgpuMmnDhG1d2stVETfpkrHQ6HhVRJJaPXRqLay2E"
    ],
    "transaction": {
        "actions": [
            {
                "account": "eosio.token",
                "authorization": [
                    {
                        "actor": "testnetyy111",
                        "permission": "active"
                    }
                ],
                "data": "1042f03eab99b1ca1042c02dab99b1ca640000000000000000454f5300000000026869",
                "name": "transfer"
            }
        ],
        "context_free_actions": [
        ],
        "context_free_data": [
        ],
        "delay_sec": 0,
        "expiration": "2018-09-08T07:39:29.500",
        "max_kcpu_usage": 0,
        "max_net_usage_words": 0,
        "ref_block_num": 13595471,
        "ref_block_prefix": 1724800537,
        "signatures": [
        ]
    }
}

available_keys:提供的公钥集合
account:合约名称
actor:调用者
permission:使用的权限类型
data:交易数据的bin
name:要调用的合约方法
delay_sec:延迟时间
expiration:过期时间
ref_block_num:签署交易时的最新区块号

returns:
{
    "required_keys": [
        "EOS6Z7mUQeFC2cQTT3xMyZh2wsLQoHih1bTMgRhr3dbichprTi7Rc"
    ]
}

required_keys:本次交易所需的公钥

push_transaction 将签署后的交易推送到区块链

post
v1/chain/push_transaction

api:
http://jungle.cryptolions.io:18888/v1/chain/push_transaction

params:
{
  "compression": "none",
  "transaction": {
    "expiration": "2018-09-08T09:31:47.500",
    "ref_block_num": 13598552,
    "ref_block_prefix": 822522680,
    "context_free_actions": [],
    "actions": [
        {
            "account": "eosio.token",
            "name": "transfer",
            "authorization": [
                {
                    "actor": "testnetyy111",
                    "permission": "active"
                }
            ],
            "data": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
        }
    ],
    "transaction_extensions": []
  },
  "signatures": [
        "SIG_K1_Kkujqvvxt89EG7cCAAk47KDm3TXQHfooSGPKivWPFTMaph5gnyKfUiLomzEzCwF3yttJ9yCQ82LVNUdrhrS3ssryaH1trZ"
   ]
}

expiration:过期时间
ref_block_num:签署交易时的最新区块号
account:合约名称
name:要调用的合约方法
actor:调用者
permission:使用的权限类型
data:交易数据的bin
signatures:签名


returns:
{
    "transaction_id": "27f28a49881c952af25bcbaf78ef1f17b8ec4eff41f3057bf3641112d01cabb0",
    "processed": {
        "id": "27f28a49881c952af25bcbaf78ef1f17b8ec4eff41f3057bf3641112d01cabb0",
        "receipt": {
            "status": "executed",
            "cpu_usage_us": 758,
            "net_usage_words": 17
        },
        "elapsed": 758,
        "net_usage": 136,
        "scheduled": false,
        "action_traces": [
            {
                "receipt": {
                    "receiver": "eosio.token",
                    "act_digest": "45d232c72b5ca003627bc411ff9881286fd411239ceac528b98e6fb33a50919e",
                    "global_sequence": 32242124,
                    "recv_sequence": 1809344,
                    "auth_sequence": [
                        [
                            "testnetyy111",
                            40
                        ]
                    ],
                    "code_sequence": 3,
                    "abi_sequence": 3
                },
                "act": {
                    "account": "eosio.token",
                    "name": "transfer",
                    "authorization": [
                        {
                            "actor": "testnetyy111",
                            "permission": "active"
                        }
                    ],
                    "data": {
                        "from": "testnetyy111",
                        "to": "testneths111",
                        "quantity": "100.0000 EOS",
                        "memo": "hi there"
                    },
                    "hex_data": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
                },
                "elapsed": 545,
                "cpu_usage": 0,
                "console": "",
                "total_cpu_usage": 0,
                "trx_id": "27f28a49881c952af25bcbaf78ef1f17b8ec4eff41f3057bf3641112d01cabb0",
                "inline_traces": [
                    {
                        "receipt": {
                            "receiver": "testnetyy111",
                            "act_digest": "45d232c72b5ca003627bc411ff9881286fd411239ceac528b98e6fb33a50919e",
                            "global_sequence": 32242125,
                            "recv_sequence": 17,
                            "auth_sequence": [
                                [
                                    "testnetyy111",
                                    41
                                ]
                            ],
                            "code_sequence": 3,
                            "abi_sequence": 3
                        },
                        "act": {
                            "account": "eosio.token",
                            "name": "transfer",
                            "authorization": [
                                {
                                    "actor": "testnetyy111",
                                    "permission": "active"
                                }
                            ],
                            "data": {
                                "from": "testnetyy111",
                                "to": "testneths111",
                                "quantity": "100.0000 EOS",
                                "memo": "hi there"
                            },
                            "hex_data": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
                        },
                        "elapsed": 72,
                        "cpu_usage": 0,
                        "console": "",
                        "total_cpu_usage": 0,
                        "trx_id": "27f28a49881c952af25bcbaf78ef1f17b8ec4eff41f3057bf3641112d01cabb0",
                        "inline_traces": []
                    },
                    {
                        "receipt": {
                            "receiver": "testneths111",
                            "act_digest": "45d232c72b5ca003627bc411ff9881286fd411239ceac528b98e6fb33a50919e",
                            "global_sequence": 32242126,
                            "recv_sequence": 8,
                            "auth_sequence": [
                                [
                                    "testnetyy111",
                                    42
                                ]
                            ],
                            "code_sequence": 3,
                            "abi_sequence": 3
                        },
                        "act": {
                            "account": "eosio.token",
                            "name": "transfer",
                            "authorization": [
                                {
                                    "actor": "testnetyy111",
                                    "permission": "active"
                                }
                            ],
                            "data": {
                                "from": "testnetyy111",
                                "to": "testneths111",
                                "quantity": "100.0000 EOS",
                                "memo": "hi there"
                            },
                            "hex_data": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
                        },
                        "elapsed": 14,
                        "cpu_usage": 0,
                        "console": "",
                        "total_cpu_usage": 0,
                        "trx_id": "27f28a49881c952af25bcbaf78ef1f17b8ec4eff41f3057bf3641112d01cabb0",
                        "inline_traces": []
                    }
                ]
            }
        ],
        "except": null
    }
}

transaction_id:交易id

3.2 Wallet相关

调用wallet的API,需要在本机或者服务器启动keosd服务。默认端口为8888,可以在启动时指定端口号。这些内容在EOS开发(三)在私链创建管理钱包、生成导入密钥对、创建账户已经详细说明过。

list_wallets 查看钱包列表

post
v1/wallet/list_wallets

api:
http://127.0.0.1:8888/v1/wallet/list_wallets

params:
无

returns:
[
    "testnet *"
]

testnet:钱包名称

create 创建钱包

post
v1/wallet/create

api:
http://127.0.0.1:8888/v1/wallet/create

params:
walletname:钱包名称 

returns:
"PW5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

PW5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:钱包密码

open 打开钱包

post
v1/wallet/open

api:
http://127.0.0.1:8888/v1/wallet/open

params:
"testnet"

returns:
{}

成功打开后返回{}

unlock 解锁钱包

post
v1/wallet/unlock

api:
http://127.0.0.1:8888/v1/wallet/unlock

params:
["testnet", "PW5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]

钱包名称
钱包密码

returns:
{}

成功解锁后返回{}

import_key 导入私钥到钱包

post
v1/wallet/import_key

api:
http://127.0.0.1:8888/v1/wallet/import_key

params:
["testcreate","5Jvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]

钱包名称
私钥

returns:
{}

成功导入后返回{}

get_public_keys 获取所有钱包中的公钥

post
v1/wallet/get_public_keys

api:
http://127.0.0.1:8888/v1/wallet/get_public_keys

params:
无

returns:
[
    "EOS57NgJAtkVZdFYGDc6GZmx2eNz5utBLVeM6pspVjhnH11aibUJi",
    "EOS5roytgLL7BuhyKDbxHfxBzdENGioMEM6nhzPXQcaeAnYQf3Uge",
    "EOS5u3yTpyS6Mjyy16RGsgbxV8WYZBoU8qtSZusJNMfkQndo2imTZ",
    "EOS6VEdYvgvNyu2dAwjSszb6ty9jJHTbp9pvFdoEdxLtGfSLs7zY8",
    "EOS8B27UNxvKZ1fSdumUhSfWGTthCsJrLLGLjDoa4vkYc3ohpPzaY"
]

list_keys 获取指定钱包中的公私钥对

post
v1/wallet/list_keys

api:
http://127.0.0.1:8888/v1/wallet/list_keys

params:
["testcreate", "PW5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]

钱包名称
钱包密码

returns:
["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]

create_key 在指定钱包中创建公钥

post
v1/wallet/create_key

api:
http://127.0.0.1:8888/v1/wallet/create_key

params:
["testcreate", "K1"]

钱包名称
公钥类型

returns:
"EOS55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

lock 锁定指定钱包

post
v1/wallet/lock

api:
http://127.0.0.1:8888/v1/wallet/lock

params:
"testcreate"

钱包名称

returns:
{}

lock_all 锁定所有钱包

post
v1/wallet/lock_all

api:
http://127.0.0.1:8888/v1/wallet/lock_all

params:
无

returns:
{}

set_timeout 设置钱包的锁定时间,单位为秒

post
v1/wallet/set_timeout

api:
http://127.0.0.1:8888/v1/wallet/set_timeout

params:
3600

returns:
{}

sign_transaction 签署交易

post
v1/wallet/sign_transaction

api:
http://127.0.0.1:8888/v1/wallet/sign_transaction

params:
[{
        "ref_block_num": 13598552,
        "ref_block_prefix": 822522680,
        "expiration": "2018-09-08T09:31:47.500",
        "actions": [{
            "account": "eosio.token",
            "name": "transfer",
            "authorization": [{
                "actor": "testnetyy111",
                "permission": "active"
            }],
            "data": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
        }],
        "signatures": []
    },
    ["EOS6Z7mUQeFC2cQTT3xMyZh2wsLQoHih1bTMgRhr3dbichprTi7Rc"], "038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca"
]

ref_block_num:签署交易时最新区块编号
expiration:过期时间
account:合约名称
name:合约方法
actor:调用者
permission:使用的权限类型
data:交易数据的bin格式
EOS6Z7mUQeFC2cQTT3xMyZh2wsLQoHih1bTMgRhr3dbichprTi7Rc:公钥
038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca:chain_id

returns:
{
    "expiration": "2018-09-08T09:31:47",
    "ref_block_num": 32600,
    "ref_block_prefix": 822522680,
    "max_net_usage_words": 0,
    "max_cpu_usage_ms": 0,
    "delay_sec": 0,
    "context_free_actions": [],
    "actions": [
        {
            "account": "eosio.token",
            "name": "transfer",
            "authorization": [
                {
                    "actor": "testnetyy111",
                    "permission": "active"
                }
            ],
            "data": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
        }
    ],
    "transaction_extensions": [],
    "signatures": [
        "SIG_K1_Kkujqvvxt89EG7cCAAk47KDm3TXQHfooSGPKivWPFTMaph5gnyKfUiLomzEzCwF3yttJ9yCQ82LVNUdrhrS3ssryaH1trZ"
    ],
    "context_free_data": []
}

signatures:交易的签名。后面push_transaction的时候需要

3.3 History相关

get_transaction 获取交易详情

post
v1/history/get_transaction

api:
https://api.eosnewyork.io/v1/history/get_transaction

params:
{"id":"d8fd505b3bbce4416ee390587f758a804218d1057657f189013a62107d6f64a4"}

returns:
{
    "id": "d8fd505b3bbce4416ee390587f758a804218d1057657f189013a62107d6f64a4",
    "trx": {
        "receipt": {
            "status": "executed",
            "cpu_usage_us": 1084,
            "net_usage_words": 18,
            "trx": [
                1,
                {
                    "signatures": [
                        "SIG_K1_K7JxbMCNPzZgMi5ugqg6tuWoTrWuhkQzMMdrdPShv2bUWSzAzFEQFt3Pj8x3yJ8rSuNb522KwRh3EsLitZ9k6UW3C4gKgF"
                    ],
                    "compression": "none",
                    "packed_context_free_data": "",
                    "packed_trx": "4fe2955bc175b18de365000000000100a6823403ea3055000000572d3ccdcd012084f0e6b269bcf600000000a8ed3232302084f0e6b269bcf6d090ca6c9a868d6e102700000000000004454f53000000000f6869206875617368616e677465636800"
                }
            ]
        },
        "trx": {
            "expiration": "2018-09-10T03:17:35",
            "ref_block_num": 30145,
            "ref_block_prefix": 1709411761,
            "max_net_usage_words": 0,
            "max_cpu_usage_ms": 0,
            "delay_sec": 0,
            "context_free_actions": [],
            "actions": [
                {
                    "account": "eosio.token",
                    "name": "transfer",
                    "authorization": [
                        {
                            "actor": "yuyangray222",
                            "permission": "active"
                        }
                    ],
                    "data": {
                        "from": "yuyangray222",
                        "to": "huashangtech",
                        "quantity": "1.0000 EOS",
                        "memo": "hi huashangtech"
                    },
                    "hex_data": "2084f0e6b269bcf6d090ca6c9a868d6e102700000000000004454f53000000000f6869206875617368616e6774656368"
                }
            ],
            "transaction_extensions": [],
            "signatures": [
                "SIG_K1_K7JxbMCNPzZgMi5ugqg6tuWoTrWuhkQzMMdrdPShv2bUWSzAzFEQFt3Pj8x3yJ8rSuNb522KwRh3EsLitZ9k6UW3C4gKgF"
            ],
            "context_free_data": []
        }
    },
    "block_time": "2018-09-10T03:17:16.000",
    "block_num": 15628038,
    "last_irreversible_block": 15663025,
    "traces": [
        {
            "receipt": {
                "receiver": "eosio.token",
                "act_digest": "eb382f516ce8861c341accf70bcb9a77b2f3e7f3b26fa9af18300569a19afc18",
                "global_sequence": 405430678,
                "recv_sequence": 10172505,
                "auth_sequence": [
                    [
                        "yuyangray222",
                        75
                    ]
                ],
                "code_sequence": 2,
                "abi_sequence": 2
            },
            "act": {
                "account": "eosio.token",
                "name": "transfer",
                "authorization": [
                    {
                        "actor": "yuyangray222",
                        "permission": "active"
                    }
                ],
                "data": {
                    "from": "yuyangray222",
                    "to": "huashangtech",
                    "quantity": "1.0000 EOS",
                    "memo": "hi huashangtech"
                },
                "hex_data": "2084f0e6b269bcf6d090ca6c9a868d6e102700000000000004454f53000000000f6869206875617368616e6774656368"
            },
            "elapsed": 488,
            "cpu_usage": 0,
            "console": "",
            "total_cpu_usage": 0,
            "trx_id": "d8fd505b3bbce4416ee390587f758a804218d1057657f189013a62107d6f64a4",
            "inline_traces": [
                {
                    "receipt": {
                        "receiver": "yuyangray222",
                        "act_digest": "eb382f516ce8861c341accf70bcb9a77b2f3e7f3b26fa9af18300569a19afc18",
                        "global_sequence": 405430679,
                        "recv_sequence": 33,
                        "auth_sequence": [
                            [
                                "yuyangray222",
                                76
                            ]
                        ],
                        "code_sequence": 2,
                        "abi_sequence": 2
                    },
                    "act": {
                        "account": "eosio.token",
                        "name": "transfer",
                        "authorization": [
                            {
                                "actor": "yuyangray222",
                                "permission": "active"
                            }
                        ],
                        "data": {
                            "from": "yuyangray222",
                            "to": "huashangtech",
                            "quantity": "1.0000 EOS",
                            "memo": "hi huashangtech"
                        },
                        "hex_data": "2084f0e6b269bcf6d090ca6c9a868d6e102700000000000004454f53000000000f6869206875617368616e6774656368"
                    },
                    "elapsed": 5,
                    "cpu_usage": 0,
                    "console": "",
                    "total_cpu_usage": 0,
                    "trx_id": "d8fd505b3bbce4416ee390587f758a804218d1057657f189013a62107d6f64a4",
                    "inline_traces": []
                },
                {
                    "receipt": {
                        "receiver": "huashangtech",
                        "act_digest": "eb382f516ce8861c341accf70bcb9a77b2f3e7f3b26fa9af18300569a19afc18",
                        "global_sequence": 405430680,
                        "recv_sequence": 1,
                        "auth_sequence": [
                            [
                                "yuyangray222",
                                77
                            ]
                        ],
                        "code_sequence": 2,
                        "abi_sequence": 2
                    },
                    "act": {
                        "account": "eosio.token",
                        "name": "transfer",
                        "authorization": [
                            {
                                "actor": "yuyangray222",
                                "permission": "active"
                            }
                        ],
                        "data": {
                            "from": "yuyangray222",
                            "to": "huashangtech",
                            "quantity": "1.0000 EOS",
                            "memo": "hi huashangtech"
                        },
                        "hex_data": "2084f0e6b269bcf6d090ca6c9a868d6e102700000000000004454f53000000000f6869206875617368616e6774656368"
                    },
                    "elapsed": 9,
                    "cpu_usage": 0,
                    "console": "",
                    "total_cpu_usage": 0,
                    "trx_id": "d8fd505b3bbce4416ee390587f758a804218d1057657f189013a62107d6f64a4",
                    "inline_traces": []
                }
            ]
        }
    ]
}

signatures:交易签名
packed_trx:交易code
expiration:超时日期
actions:交易类型
account:合约名称
name:合约方法
actor:调用者
permission:使用的权限类型
from:转账人
to:收款人
quantity:数量和代币名称
memo:备注
block_time:区块时间
block_num:区块高度

这里不知道什么原因,测试网络调用此API会报错tx not found,但是通过测试网络的区块浏览器http://jungle.cryptolions.io/都能查到。所以这里查询的是主网上的一笔交易详情。

account_history 获取某账户下所有交易记录

官方并没有提供查询某个账户下所有交易记录的API。这里找了一个第三方的API使用

get

api:
https://explorer.eoseco.com/api/accountTraces?name=yuyangray222&page=0

params:
name:账户名
page:页数

returns:
[
    {
        "_id": "5b95e97f51e518952a5f8c44",
        "account_name": "yuyangray222",
        "transaction_id": "d8fd505b3bbce4416ee390587f758a804218d1057657f189013a62107d6f64a4",
        "block_num": 15628038,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "yuyangray222",
                    "to": "huashangtech",
                    "quantity": "1.0000 EOS",
                    "memo": "hi huashangtech"
                }
            }
        ],
        "timestamp": "2018-09-10T03:17:16.000",
        "pending": false
    },
    {
        "_id": "5b95e97451e518952a5f37b9",
        "account_name": "yuyangray222",
        "transaction_id": "e10f0e02c963c7b49e939c82ca34917b5607e8925e685d6b48bed27ea372e0a7",
        "block_num": 15624626,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "newaccount",
                "data": {
                    "creator": "yuyangray222",
                    "name": "huashangtech",
                    "owner": {
                        "threshold": 1,
                        "keys": [
                            {
                                "key": "EOS66griGzoa99n2mjGacBKEndMFAACrmJi7zn1xJ6jieDv4K1SB9",
                                "weight": 1
                            }
                        ],
                        "accounts": [],
                        "waits": []
                    },
                    "active": {
                        "threshold": 1,
                        "keys": [
                            {
                                "key": "EOS6x1ZXjAJLrHy67hCdM13ue2t4BCvNp55qMcqtvyfPULFQAAtRG",
                                "weight": 1
                            }
                        ],
                        "accounts": [],
                        "waits": []
                    }
                }
            },
            {
                "contract": "eosio",
                "action": "buyrambytes",
                "data": {
                    "payer": "yuyangray222",
                    "receiver": "huashangtech",
                    "bytes": 20480
                }
            },
            {
                "contract": "eosio",
                "action": "delegatebw",
                "data": {
                    "from": "yuyangray222",
                    "receiver": "huashangtech",
                    "stake_net_quantity": "1.0000 EOS",
                    "stake_cpu_quantity": "1.0000 EOS",
                    "transfer": 0
                }
            }
        ],
        "timestamp": "2018-09-10T02:46:31.000",
        "pending": false
    },
    {
        "_id": "5b95e96051e518952a5ebfea",
        "account_name": "yuyangray222",
        "transaction_id": "519538a65374b052397dd1694b55759ae7b11e4367bfb098abdc3fa5d4164483",
        "block_num": 15620068,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "otcbtcdotcom",
                    "to": "yuyangray222",
                    "quantity": "5.4000 EOS",
                    "memo": ""
                }
            }
        ],
        "timestamp": "2018-09-10T02:06:03.000",
        "pending": false
    },
    {
        "_id": "5b8ec0acf5a11e46846eb907",
        "account_name": "yuyangray222",
        "transaction_id": "f3e2c169f521cbb5b3e2d96a54ce6aeeb83a5ade47f7434618709af7a7ff9a9b",
        "block_num": 14717732,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "pumpdumpwars",
                    "to": "yuyangray222",
                    "quantity": "0.0001 EOS",
                    "memo": "PumpDumpWars - Fight. Bet. Win EOS. You can place a bet on the fight, right now! https://pumpdumpwars.com/ The First Crypto game powered by EOS"
                }
            }
        ],
        "timestamp": "2018-09-04T17:25:27.500",
        "pending": false
    },
    {
        "_id": "5b876050f5a11e46849c3587",
        "account_name": "yuyangray222",
        "transaction_id": "d37090601693af0a345b82d572d12bec50562695f1e9671f9a6447d4bcfa3e14",
        "block_num": 13760258,
        "contract_actions": [
            {
                "contract": "eosatidiumio",
                "action": "signup",
                "data": {
                    "owner": "yuyangray222",
                    "quantity": "0.0000 ATD"
                }
            }
        ],
        "timestamp": "2018-08-30T03:08:24.000",
        "pending": false
    },
    {
        "_id": "5b875f84f5a11e46849c2abf",
        "account_name": "yuyangray222",
        "transaction_id": "c65b11a63877879d91f2f63479e5d270e8ea91516b80ecebfa43f792d90c8e79",
        "block_num": 13759861,
        "contract_actions": [
            {
                "contract": "prochaintech",
                "action": "click",
                "data": {
                    "clickRequest": {
                        "account": "yuyangray222",
                        "candyId": 0
                    }
                }
            }
        ],
        "timestamp": "2018-08-30T03:05:03.500",
        "pending": false
    },
    {
        "_id": "5b74239d6e4b076e070c7f5a",
        "account_name": "yuyangray222",
        "transaction_id": "d98d45e375186336a9b9a63afc69fdcc9d9175993e14a9e8bc09202024898943",
        "block_num": 10457146,
        "contract_actions": [
            {
                "contract": "ethsidechain",
                "action": "transfer",
                "data": {
                    "from": "eosfavorcomm",
                    "to": "yuyangray222",
                    "quantity": "88.8888 EETH",
                    "memo": "EETH社区免费空投回馈, eosfavor.com, scatter钱包wallet.eosfavor.com"
                }
            }
        ],
        "timestamp": "2018-08-10T17:57:01.500",
        "pending": false
    },
    {
        "_id": "5b740ebb6e4b076e07b1247d",
        "account_name": "yuyangray222",
        "transaction_id": "161576da71c6448aa6ce6e6b16fae718562b124f55c6dfb1820887bd6a01d7e7",
        "block_num": 9634283,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "tokenplanet2",
                    "to": "yuyangray222",
                    "quantity": "0.0001 EOS",
                    "memo": "加微信(eos66588)领取EOS游戏泰肯星球福利,注册即送100代币,玩游戏天天挖矿领钱,不定期糖果空投。泰肯星球,全球首款eos游戏Dapp,www.tokenplanets.com"
                }
            }
        ],
        "timestamp": "2018-08-05T22:43:57.000",
        "pending": false
    },
    {
        "_id": "5b7406966e4b076e07a129e0",
        "account_name": "yuyangray222",
        "transaction_id": "897a608b467a9e6c51535035976d1c910556e44360e146d7cb628a235b2f00f0",
        "block_num": 9231340,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "wizboxsender",
                    "to": "yuyangray222",
                    "quantity": "0.0001 EOS",
                    "memo": "Get your free Wizards on wizards.one - the first EOS game about Wizards! Create you own wizard army, fight with other players and win EOS prizes!"
                }
            }
        ],
        "timestamp": "2018-08-03T13:16:45.000",
        "pending": false
    },
    {
        "_id": "5b73e83b6e4b076e077a2a74",
        "account_name": "yuyangray222",
        "transaction_id": "79bcaff7ac694c2b98ca2dfa2c7124a5938fa6b83d37c69faea627c93b68c762",
        "block_num": 7916594,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "pumpdumpwars",
                    "to": "yuyangray222",
                    "quantity": "0.0001 EOS",
                    "memo": "Happy Birthday Dan! The First Crypto Combat Game Powered by EOS. https://pumpdumpwars.com A long time ago, at the PumpDump galaxy far far away Hamsters people lived in peace and prosperity..."
                }
            }
        ],
        "timestamp": "2018-07-26T19:25:07.000",
        "pending": false
    },
    {
        "_id": "5b73c79b6e4b076e075189d7",
        "account_name": "yuyangray222",
        "transaction_id": "27d3ac66e4130a19f37930316471a0f06fd14f77640357789483118d0e3cb8da",
        "block_num": 6610360,
        "contract_actions": [
            {
                "contract": "ethsidechain",
                "action": "transfer",
                "data": {
                    "from": "yuyangray222",
                    "to": "ethsidechain",
                    "quantity": "5000.0000 EETH",
                    "memo": "免费领取EETH"
                }
            }
        ],
        "timestamp": "2018-07-19T02:09:21.500",
        "pending": false
    },
    {
        "_id": "5b735950cd05612eed8254ae",
        "account_name": "yuyangray222",
        "transaction_id": "49e6fc110f7d8a0c3f510616a9603361b85728e54f179ceef286eb1a882febd9",
        "block_num": 4484200,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "delegatebw",
                "data": {
                    "from": "yuyangray222",
                    "receiver": "yuyangray222",
                    "stake_net_quantity": "0.0000 EOS",
                    "stake_cpu_quantity": "0.3000 EOS",
                    "transfer": 0
                }
            }
        ],
        "timestamp": "2018-07-06T15:20:49.500",
        "pending": false
    },
    {
        "_id": "5b735950cd05612eed825465",
        "account_name": "yuyangray222",
        "transaction_id": "448f61e99f3753524102f7e5c2b622c9934016b753595cb108d2dd41470ccad2",
        "block_num": 4484152,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "delegatebw",
                "data": {
                    "from": "yuyangray222",
                    "receiver": "yuyangray222",
                    "stake_net_quantity": "0.5000 EOS",
                    "stake_cpu_quantity": "0.0000 EOS",
                    "transfer": 0
                }
            }
        ],
        "timestamp": "2018-07-06T15:20:25.500",
        "pending": false
    },
    {
        "_id": "5b73594fcd05612eed825336",
        "account_name": "yuyangray222",
        "transaction_id": "0ef5957d8ba3e9f37de666fc42d9e5a2a4558c8c2dc15461dc7dafb502e50009",
        "block_num": 4483972,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "gateiowallet",
                    "to": "yuyangray222",
                    "quantity": "0.7780 EOS",
                    "memo": ""
                }
            }
        ],
        "timestamp": "2018-07-06T15:18:55.500",
        "pending": false
    },
    {
        "_id": "5b735445cd05612eed6b9039",
        "account_name": "yuyangray222",
        "transaction_id": "ba8344d62966d1757643acb8db86557502b42f257dff85444bf1e96b9bcd16de",
        "block_num": 3926188,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "buyram",
                "data": {
                    "payer": "yuyangray222",
                    "receiver": "yuyangray222",
                    "quant": "99.5000 EOS"
                }
            }
        ],
        "timestamp": "2018-07-03T09:43:46.000",
        "pending": false
    },
    {
        "_id": "5b735443cd05612eed6b8ad7",
        "account_name": "yuyangray222",
        "transaction_id": "eb1a9af6814d141ccbd1ff45c509237f2cde48d9ea8d913fad3b0b71626cd3f4",
        "block_num": 3925758,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "otcbtcdotcom",
                    "to": "yuyangray222",
                    "quantity": "99.5000 EOS",
                    "memo": ""
                }
            }
        ],
        "timestamp": "2018-07-03T09:40:05.000",
        "pending": false
    },
    {
        "_id": "5b735438cd05612eed6b62f8",
        "account_name": "yuyangray222",
        "transaction_id": "398e25633c0616d6b588aab02ef0becb584af4c6d0f4d785542d1f0e033ac606",
        "block_num": 3922271,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "buyram",
                "data": {
                    "payer": "yuyangray222",
                    "receiver": "yuyangray222",
                    "quant": "1.1000 EOS"
                }
            }
        ],
        "timestamp": "2018-07-03T09:10:59.500",
        "pending": false
    },
    {
        "_id": "5b735422cd05612eed6aea60",
        "account_name": "yuyangray222",
        "transaction_id": "5e0d4cf31126c1f24afbe28ddf63c0c7e378aee96d9d181cd0e9f492f969749f",
        "block_num": 3909874,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "undelegatebw",
                "data": {
                    "from": "yuyangray222",
                    "receiver": "yuyangray222",
                    "unstake_net_quantity": "0.1000 EOS",
                    "unstake_cpu_quantity": "0.0000 EOS"
                }
            }
        ],
        "timestamp": "2018-07-03T07:27:28.000",
        "pending": false
    },
    {
        "_id": "5b735422cd05612eed6ae814",
        "account_name": "yuyangray222",
        "transaction_id": "5209f0434497fa4663fb90984570aec2d94c4ed9436fdb5a8fded0394b34e191",
        "block_num": 3909694,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "delegatebw",
                "data": {
                    "from": "yuyangray222",
                    "receiver": "yuyangray222",
                    "stake_net_quantity": "0.0000 EOS",
                    "stake_cpu_quantity": "0.4000 EOS",
                    "transfer": 0
                }
            }
        ],
        "timestamp": "2018-07-03T07:25:58.000",
        "pending": false
    },
    {
        "_id": "5b735416cd05612eed6aa923",
        "account_name": "yuyangray222",
        "transaction_id": "b5b371e76596d9b040598dc48f26b68794373069a9d76604c4dd4acc38aa76e1",
        "block_num": 3903471,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "delegatebw",
                "data": {
                    "from": "yuyangray222",
                    "receiver": "yuyangray222",
                    "stake_net_quantity": "0.1000 EOS",
                    "stake_cpu_quantity": "0.0000 EOS",
                    "transfer": 0
                }
            }
        ],
        "timestamp": "2018-07-03T06:34:05.000",
        "pending": false
    },
    {
        "_id": "5b735413cd05612eed6a9c71",
        "account_name": "yuyangray222",
        "transaction_id": "486f6627e5d35cef96cef9c4ae95033213b44c6a1e00cea7694e57e48f8faae0",
        "block_num": 3901790,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "otcbtcdotcom",
                    "to": "yuyangray222",
                    "quantity": "1.6000 EOS",
                    "memo": ""
                }
            }
        ],
        "timestamp": "2018-07-03T06:20:04.500",
        "pending": false
    },
    {
        "_id": "5b7353f3cd05612eed6a0688",
        "account_name": "yuyangray222",
        "transaction_id": "1681bb59baf2ddaf656294637c3a5a52ba4ccfb2e9e0642f7eccc4a0baea2594",
        "block_num": 3883439,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "buyram",
                "data": {
                    "payer": "yuyangray222",
                    "receiver": "yuyangray222",
                    "quant": "0.2000 EOS"
                }
            }
        ],
        "timestamp": "2018-07-03T03:47:02.500",
        "pending": false
    },
    {
        "_id": "5b7353eacd05612eed69d480",
        "account_name": "yuyangray222",
        "transaction_id": "d6bdad0a74b2e4cbe16c2a87d290f9571430769eda1931d0f4df173cdc96c34c",
        "block_num": 3877537,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "buyram",
                "data": {
                    "payer": "yuyangray222",
                    "receiver": "yuyangray222",
                    "quant": "0.2000 EOS"
                }
            }
        ],
        "timestamp": "2018-07-03T02:57:49.500",
        "pending": false
    },
    {
        "_id": "5b7353eacd05612eed69d429",
        "account_name": "yuyangray222",
        "transaction_id": "9065308863b7cc826860022ebf1b72090104b7a26e2133d63b19cb0c1ada9e5f",
        "block_num": 3877496,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "delegatebw",
                "data": {
                    "from": "yuyangray222",
                    "receiver": "yuyangray222",
                    "stake_net_quantity": "0.0000 EOS",
                    "stake_cpu_quantity": "0.1000 EOS",
                    "transfer": 0
                }
            }
        ],
        "timestamp": "2018-07-03T02:57:29.000",
        "pending": false
    },
    {
        "_id": "5b7353e9cd05612eed69d171",
        "account_name": "yuyangray222",
        "transaction_id": "6bb405639381b088fffca155466a45a356a12ae7daba1efba29a93139827e867",
        "block_num": 3877118,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "buyram",
                "data": {
                    "payer": "yuyangray222",
                    "receiver": "yuyangray222",
                    "quant": "9.5000 EOS"
                }
            }
        ],
        "timestamp": "2018-07-03T02:54:20.000",
        "pending": false
    },
    {
        "_id": "5b7353cbcd05612eed67a869",
        "account_name": "yuyangray222",
        "transaction_id": "5cf104eec9cda55e58294514389d207e80aeb107cba376db4a4d0484cf5b272c",
        "block_num": 3873036,
        "contract_actions": [
            {
                "contract": "eosio.token",
                "action": "transfer",
                "data": {
                    "from": "gateiowallet",
                    "to": "yuyangray222",
                    "quantity": "10.0000 EOS",
                    "memo": ""
                }
            }
        ],
        "timestamp": "2018-07-03T02:20:13.500",
        "pending": false
    },
    {
        "_id": "5b734bdbcd05612eed3ef018",
        "account_name": "yuyangray222",
        "transaction_id": "074337ed6215ae4e187825fe53175344c92dd8fe96a8ee9f422c152f5ab6d0c7",
        "block_num": 3018145,
        "contract_actions": [
            {
                "contract": "eosio",
                "action": "newaccount",
                "data": {
                    "creator": "gy2danrygene",
                    "name": "yuyangray222",
                    "owner": {
                        "threshold": 1,
                        "keys": [
                            {
                                "key": "EOS69mwiYuMhfWtwLVXxaXfao7YXF2Kh39nZurdDw6RF1ntQy6DnW",
                                "weight": 1
                            }
                        ],
                        "accounts": [],
                        "waits": []
                    },
                    "active": {
                        "threshold": 1,
                        "keys": [
                            {
                                "key": "EOS69mwiYuMhfWtwLVXxaXfao7YXF2Kh39nZurdDw6RF1ntQy6DnW",
                                "weight": 1
                            }
                        ],
                        "accounts": [],
                        "waits": []
                    }
                }
            },
            {
                "contract": "eosio",
                "action": "buyrambytes",
                "data": {
                    "payer": "gy2danrygene",
                    "receiver": "yuyangray222",
                    "bytes": 3072
                }
            },
            {
                "contract": "eosio",
                "action": "delegatebw",
                "data": {
                    "from": "gy2danrygene",
                    "receiver": "yuyangray222",
                    "stake_net_quantity": "0.0500 EOS",
                    "stake_cpu_quantity": "0.0500 EOS",
                    "transfer": 0
                }
            }
        ],
        "timestamp": "2018-06-28T03:27:43.000",
        "pending": false
    }
]

transaction_id:交易id
block_num:区块高度
contract:合约名称
action:合约方法
timestamp:时间戳

转账>
from:转账人
to:收款人
quantity:数量和代币名称
memo:备注

这个API已经无法使用了,重新找了一个新的API,但是必须分页查询。还可以查询指定代币的交易记录

get

api:
https://api.eospark.com/api?module=account&action=get_account_related_trx_info&apikey=a9564ebc3289b7a14551baf8ad5ec60a&account=yuyangray222&page=1&size=999&symbol=EOS&code=eosio.token

params:
account:账户名
page:(可选)分页查询页数索引。从1开始
size:(可选)每页数量。经测试,最大数量为20
symbol:(可选)代币符号
code:(可选)代币合约名称

returns:
{
    "errno": 0,
    "errmsg": "Success",
    "data": {
        "trace_count": 27,
        "trace_list": [
            {
                "trx_id": "e6040c6a49a0bcd6f755ed27a66ee9a3ad07ee52fe4e9dcb343a8b1f863a8428",
                "timestamp": "2018-10-06T16:00:09.500",
                "receiver": "yuyangray222",
                "sender": "roulettespin",
                "code": "eosio.token",
                "quantity": "0.0001",
                "memo": "EosRoyale - True decentralized games powered by EOS. Only 5000 players will get 10000 ROY Tokens for the first bet! Lifetime referral commission - 0.5%. Dividends distribution - coming soon! Try the best dApp on EOS!  https://roulette.eosroyale.com",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "a87d6c5a848614bc908f7f8b95faa8d4675671bd693a82f468f26a9d14487e3c",
                "timestamp": "2018-10-04T04:40:28.500",
                "receiver": "yuyangray222",
                "sender": "mydeostokens",
                "code": "eosio.token",
                "quantity": "0.0001",
                "memo": "https://app.deosgames.com/slots/eos Play SLOTS with EOS win up to 5000 EOS per spin. EOS가 회전 당 최대 5000 EOS를 얻는 SLOTS 재생. 使用EOS玩SLOTS每次旋转赢得高达5000 EOS",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "586c2fcecad30e6cd5c8c66502b1d9dd8c4a64a129ac45d7189025656d77baf5",
                "timestamp": "2018-09-18T06:25:15.000",
                "receiver": "yuyangray222",
                "sender": "eosiomemberx",
                "code": "eosio.token",
                "quantity": "0.0001",
                "memo": "https://eoswin.org   Use your EETH to play dice!",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "519538a65374b052397dd1694b55759ae7b11e4367bfb098abdc3fa5d4164483",
                "timestamp": "2018-09-10T02:06:03.000",
                "receiver": "yuyangray222",
                "sender": "otcbtcdotcom",
                "code": "eosio.token",
                "quantity": "5.4000",
                "memo": "",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "e10f0e02c963c7b49e939c82ca34917b5607e8925e685d6b48bed27ea372e0a7",
                "timestamp": "2018-09-10T02:46:31.000",
                "receiver": "eosio.stake",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "2.0000",
                "memo": "stake bandwidth",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "941f6410e22a9c7a86aa3faa9036c25d47acc72622ab5356fbaf550bdf024b97",
                "timestamp": "2018-08-14T14:12:34.000",
                "receiver": "yuyangray222",
                "sender": "eosballoonxx",
                "code": "eosio.token",
                "quantity": "0.0001",
                "memo": "eosballoon.io 吹爆气球可获得250%的收益,靠实力掌控游戏结果.北京时间8月18日20点整.Blowing the balloon gets you 250% profit, game is totally controlled by yourself, and starts at 08-18 12:00:00 (UTC))",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "49e6fc110f7d8a0c3f510616a9603361b85728e54f179ceef286eb1a882febd9",
                "timestamp": "2018-07-06T15:20:49.500",
                "receiver": "eosio.stake",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.3000",
                "memo": "stake bandwidth",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "448f61e99f3753524102f7e5c2b622c9934016b753595cb108d2dd41470ccad2",
                "timestamp": "2018-07-06T15:20:25.500",
                "receiver": "eosio.stake",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.5000",
                "memo": "stake bandwidth",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "2fbaf39895b43d685b2644d62c46ba787ba67f207a5562c9d3e9981c5165364b",
                "timestamp": "2018-07-06T07:27:28.000",
                "receiver": "yuyangray222",
                "sender": "eosio.stake",
                "code": "eosio.token",
                "quantity": "0.1000",
                "memo": "unstake",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "ba8344d62966d1757643acb8db86557502b42f257dff85444bf1e96b9bcd16de",
                "timestamp": "2018-07-03T09:43:46.000",
                "receiver": "eosio.ramfee",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.4975",
                "memo": "ram fee",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "398e25633c0616d6b588aab02ef0becb584af4c6d0f4d785542d1f0e033ac606",
                "timestamp": "2018-07-03T09:10:59.500",
                "receiver": "eosio.ramfee",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.0055",
                "memo": "ram fee",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "5209f0434497fa4663fb90984570aec2d94c4ed9436fdb5a8fded0394b34e191",
                "timestamp": "2018-07-03T07:25:58.000",
                "receiver": "eosio.stake",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.4000",
                "memo": "stake bandwidth",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "b5b371e76596d9b040598dc48f26b68794373069a9d76604c4dd4acc38aa76e1",
                "timestamp": "2018-07-03T06:34:05.000",
                "receiver": "eosio.stake",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.1000",
                "memo": "stake bandwidth",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "1681bb59baf2ddaf656294637c3a5a52ba4ccfb2e9e0642f7eccc4a0baea2594",
                "timestamp": "2018-07-03T03:47:02.500",
                "receiver": "eosio.ramfee",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.0010",
                "memo": "ram fee",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "d6bdad0a74b2e4cbe16c2a87d290f9571430769eda1931d0f4df173cdc96c34c",
                "timestamp": "2018-07-03T02:57:49.500",
                "receiver": "eosio.ramfee",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.0010",
                "memo": "ram fee",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "9065308863b7cc826860022ebf1b72090104b7a26e2133d63b19cb0c1ada9e5f",
                "timestamp": "2018-07-03T02:57:29.000",
                "receiver": "eosio.stake",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.1000",
                "memo": "stake bandwidth",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "6bb405639381b088fffca155466a45a356a12ae7daba1efba29a93139827e867",
                "timestamp": "2018-07-03T02:54:20.000",
                "receiver": "eosio.ramfee",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.0475",
                "memo": "ram fee",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "b57db583160392f4a180b9249a4a730b364bc6c56707aa21116b6352b8b817bf",
                "timestamp": "2018-09-11T07:14:26.500",
                "receiver": "huashangtech",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "0.0001",
                "memo": "yoyoyo",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "d8fd505b3bbce4416ee390587f758a804218d1057657f189013a62107d6f64a4",
                "timestamp": "2018-09-10T03:17:16.000",
                "receiver": "huashangtech",
                "sender": "yuyangray222",
                "code": "eosio.token",
                "quantity": "1.0000",
                "memo": "hi huashangtech",
                "symbol": "EOS",
                "status": "executed"
            },
            {
                "trx_id": "f3e2c169f521cbb5b3e2d96a54ce6aeeb83a5ade47f7434618709af7a7ff9a9b",
                "timestamp": "2018-09-04T17:25:27.500",
                "receiver": "yuyangray222",
                "sender": "pumpdumpwars",
                "code": "eosio.token",
                "quantity": "0.0001",
                "memo": "PumpDumpWars - Fight. Bet. Win EOS. You can place a bet on the fight, right now! https://pumpdumpwars.com/ The First Crypto game powered by EOS",
                "symbol": "EOS",
                "status": "executed"
            }
        ]
    }
}


|trace_count |int   |总交易数量  |
|trx_id |string   |交易id  |
|timestamp |string   |时间戳  |
|from |string   |转账者 |
|to |string   |接收者 |
|code |string   |合约名称  |
|quantity |string   |数量 |
|memo |string   |备注  |
|symbol |string   |代币符号  |
|status |string   |交易状态  |

get_key_accounts 根据公钥查询账户

post
v1/history/get_key_accounts

api:
http://jungle.cryptolions.io:18888/v1/history/get_key_accounts

params:
{"public_key":"EOS6cnhSLTn4eSUEqS4nC8frYTsVsjeH2M3hos1TUeCgme2Yim5Q5"}

returns:
{
    "account_names": [
        "testnetyy111"
    ]
}

account_names:账户名称

你可能感兴趣的:(EOS开发(八)RPC API)