小坚的技术博客

比特股BTS和BAR类Json-RPC接口

本文作者:陈进坚
个人博客:https://jian1098.github.io
CSDN博客:https://blog.csdn.net/c_jian
简书:https://www.jianshu.com/u/8ba9ac5706b6
联系方式:jian1098@qq.com

参考文档:https://dev.bitshares.works/en/master/api/wallet_api.html#

查询节点信息

参数:无

1
{"jsonrpc": "2.0", "method": "get_dynamic_global_properties", "params": [], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "2.1.0",
"head_block_number": 35028,
"head_block_id": "000088d4acd8537ebcd6237a20190f896d55cb6d",
"time": "2019-09-19T05:49:45",
"current_witness": "1.6.3",
"next_maintenance_time": "2019-09-20T00:00:00",
"last_budget_time": "2019-09-19T00:00:00",
"witness_budget": 0,
"accounts_registered_this_interval": 0,
"recently_missed_count": 925001,
"current_aslot": 3739147,
"recent_slots_filled": "340282366920938463463374607431768211455",
"dynamic_flags": 0,
"last_irreversible_block_num": 35018
}
}

通过区块id查询区块信息

参数:区块id

1
{"jsonrpc": "2.0", "method": "get_block", "params": [19868], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"previous": "00004d9b1abf0a3fa2103803ef1f9ff707e66f6b",
"timestamp": "2019-09-04T08:10:15",
"witness": "1.6.7",
"transaction_merkle_root": "2522020e5fdb3b6e8faa49e0339b536872a72166",
"extensions": [],
"witness_signature": "2067895022b1f0af047fa71d4e4ca869db1d5d36a20aa5cbd693d3270a80b8c96e7b9db23c135d465ba470383ed11ab3b860e8f83a381f9d34049edb3c117edb48",
"transactions": [
{
"ref_block_num": 19867,
"ref_block_prefix": 1057668890,
"expiration": "2019-09-04T08:10:40",
"operations": [
[
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "505970742877495025",
"message": "ac61bc16cfb0e9c0db19758388a51214"
},
"extensions": []
}
]
],
"extensions": [],
"signatures": [
"1f79cdabf4b7b2122c6becbee4dc7a42e07c053aa446fafd015eb351e24ade2f7a17df96aae62b28d71e9c465f8a732ae9a1417899f81ca1b6caefd9685a9a8301"
],
"operation_results": [
[
0,
{}
]
]
}
],
"block_id": "00004d9ce5e26a550f16dc940d655962d9a897fc",
"signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"transaction_ids": [
"4b64a76707e698c726a186a9e15b644560ae9a4d"
]
}
}

通过账号查询交易历史

参数:账户名,最小编号,最大返回数量,最大编号。编号从 1 开始。

1
{"jsonrpc": "2.0", "method": "get_relative_account_history", "params": ["nathan",1,2,100], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"memo": "",
"description": "Transfer 1 BTS from nathan to alpha -- Unlock wallet to see memo. (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.52",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "505970742877495025",
"message": "ac61bc16cfb0e9c0db19758388a51214"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 19868,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "",
"description": "Transfer 1.11111 BTS from nathan to alpha -- Unlock wallet to see memo. (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.51",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 111111,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "11674897818616179291",
"message": "69cc001a11d3007923dc4d00d28cac1f"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 19840,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
}
]
}

账户列表

参数:最顶层的账户名,获取数量

1
{"jsonrpc": "2.0", "method": "list_accounts", "params": ["nathan",10], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"id": 1,
"jsonrpc": "2.0",
"result": [
[
"nathan",
"1.2.17"
],
[
"null-account",
"1.2.3"
],
[
"proxy-to-self",
"1.2.5"
],
[
"relaxed-committee-account",
"1.2.2"
],
[
"temp-account",
"1.2.4"
],
[
"witness-account",
"1.2.1"
]
]
}

查询账户余额

参数:账户名

1
{"jsonrpc": "2.0", "method": "list_account_balances", "params": ["nathan"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"amount": "999918734664049",
"asset_id": "1.3.0"
}
]
}

通过账户名查询账户id

参数:账户名

1
{"jsonrpc": "2.0", "method": "get_account_id", "params": ["nathan"], "id": 1}

返回:

1
2
3
4
5
{
"id": 1,
"jsonrpc": "2.0",
"result": "1.2.17"
}

通过账户id查询账户信息

参数:账户id

1
{"jsonrpc": "2.0", "method": "get_object", "params": ["1.2.6","1.3.0"], "id": 1}

或者用另一个端口的另一个方法:http://47.56.168.231:11011,可同时查询多个账户

1
{"id":1,"method":"call","params":[0,"get_accounts",[["1.2.6"]]]}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"id": 1,
"result": [
{
"id": "1.2.6",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.6",
"referrer": "1.2.6",
"lifetime_referrer": "1.2.6",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "init0",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.6",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
}
]
}

通过账户名查询账户信息

参数:账户名

1
{"jsonrpc": "2.0", "method": "get_account", "params": ["nathan"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.2.17",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.17",
"referrer": "1.2.17",
"lifetime_referrer": "1.2.17",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "nathan",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"0:23",
"0:24",
"0:25",
"0:26",
"0:27",
"0:28",
"0:29"
],
"extensions": []
},
"statistics": "2.6.17",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.0",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
}
}

解锁钱包

参数:密码

1
{"jsonrpc": "2.0", "method": "unlock", "params": ["supersecret"], "id": 1}

返回:

1
2
3
4
5
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}

转账

参数:源账户名,目的账户名,金额,币种,备注

1
{"jsonrpc": "2.0", "method": "transfer2", "params": ["nathan","alpha",10,"BTS","This is memo"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"id": 1,
"jsonrpc": "2.0",
"result": [
"a31884057f4c20724acb54c6817b709892a89de5",
{
"ref_block_num": 35238,
"ref_block_prefix": 4037660452,
"expiration": "2019-09-19T06:07:45",
"operations": [
[
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1000000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "14845433245050049736",
"message": "199b07f4622468588c88c88d9a4349b8842c2efbe535d99b74eba99e70e225f5"
},
"extensions": []
}
]
],
"extensions": [],
"signatures": [
"200ecd4ddb9a9563b54f34e68ac218404ad8006a0b6efb5d8c118bb768542c787a7c7fbefecd41422702d94ce0f4890afd60311a55fb717801aad647d1b7df8d23"
]
}
]
}

查询资产详情

参数:资产名

1
{"jsonrpc": "2.0", "method": "get_asset", "params": ["BTS"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.3.0",
"symbol": "BTS",
"precision": 5,
"issuer": "1.2.3",
"options": {
"max_supply": "1000000000000000",
"market_fee_percent": 0,
"max_market_fee": "1000000000000000",
"issuer_permissions": 0,
"flags": 0,
"core_exchange_rate": {
"base": {
"amount": 1,
"asset_id": "1.3.0"
},
"quote": {
"amount": 1,
"asset_id": "1.3.0"
}
},
"whitelist_authorities": [],
"blacklist_authorities": [],
"whitelist_markets": [],
"blacklist_markets": [],
"description": "",
"extensions": {}
},
"dynamic_asset_data_id": "2.3.0"
}
}

所有钱包列表

参数:无

1
{"jsonrpc": "2.0", "method": "list_my_accounts", "params": [], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "1.2.17",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.17",
"referrer": "1.2.17",
"lifetime_referrer": "1.2.17",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "nathan",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"0:23",
"0:24",
"0:25",
"0:26",
"0:27",
"0:28",
"0:29"
],
"extensions": []
},
"statistics": "2.6.17",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.0",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.18",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.18",
"referrer": "1.2.18",
"lifetime_referrer": "1.2.18",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "alpha",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.18",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.1",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.19",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.19",
"referrer": "1.2.19",
"lifetime_referrer": "1.2.19",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com0",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5ZYQtrYUPk5ELqJfygsJHnTJ9wDQmFZK4UXH8d6Txqsjg9MdBc",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5arjFbgDWrqxhuqvvUGpLFCguse3ebKVC4XGcjUnDgdtNT22Dd",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS67M2hU4tdqD53DdiUxsNaPrRehq3q8zvgVuwfVy1umu7EDqQLU",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.19",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.2",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.20",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.20",
"referrer": "1.2.20",
"lifetime_referrer": "1.2.20",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com1",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7sKfFcj6KnKNnEeM7ojLXxJd9fhx9oDQduawBgTZsMicac1uqn",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5rtEW3HgzB6jRTj6gDMprBwdHRcTF13fsydDjKFLEp1xurW74Z",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS7kz2cGTXaoDk49fUXr88urAuLEek9gjXrMQw5gkQ7seLD3MSpt",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.20",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.3",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.21",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.21",
"referrer": "1.2.21",
"lifetime_referrer": "1.2.21",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com2",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5yK72A2mSQdnfea7tZ3mbk8bMsg4NbH6nBVFDnAMywSCA6QXei",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS67QpKoWzsZCAEXNkWefxmmGerC2G8hdffQVUeDaf5BbDjDLWCK",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS7r7hEmGLdgSuAb7UWZ27YfcFCj2xiUMeCewK5ZX7Xxa4pt9QAX",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.21",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.4",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.22",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.22",
"referrer": "1.2.22",
"lifetime_referrer": "1.2.22",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com3",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS4tVaEEqzfguMjddTEc2ax75b2qKFoVSvboUjnrtVQ3Y3etYKYy",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS8mPETTECzSvzSenVTqT8WM4zir7ggfVnEc2AfxxzB52AFeYoyX",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6jwUt27WTrrqQLqMvWHsD9HP83sqDhviuQKxAeD7HpoCjhXnds",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.22",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.5",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.23",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.23",
"referrer": "1.2.23",
"lifetime_referrer": "1.2.23",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com4",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7zNF1rh2quabV6z7hsfojz9328ZUfTBURMRSvReExnFZ1sYsDp",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7Fnb9TzMQXFsXegEk8rBzUPza8CUUXNFTVn1jWyWH6mX6TNNLv",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6eXTWMGVRyo7V5y3wev6WP5ekH6ULekwByXJMT7wFNGtF8Yb7k",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.23",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.6",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.24",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.24",
"referrer": "1.2.24",
"lifetime_referrer": "1.2.24",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com5",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6TcrQC2biZKGyx8DAZETh4zsLiLcSciLuMKYNimqx6WkT22KKA",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5jbkaqLgNvKZrDHAEAt3of9PmrU9UWyLKLP3arJFE34T4qvhbJ",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS4zLb7M2hAcPBdEiDJQdA5FgYRg1yZeLNTdoARPZ5tk8WJpGAz6",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.24",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.7",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.25",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.25",
"referrer": "1.2.25",
"lifetime_referrer": "1.2.25",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com6",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS52ktNc48V9Rkw3cWU51hoMqHRRwk7mDHcrGTQAeRT9bMZzozWc",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5dFvUh87J3PFU5z9BmuF4AFaLXv8TiXB9Cjdy9taNrVpxYUq1c",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS5pLk575W7yRuHsUPEMvWqwUeKPhGPTanqEQRSzUHTTkD9FwNnp",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.25",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.8",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
}
]
}

见证人列表

参数:最顶层的账户名,最大数量

1
{"jsonrpc": "2.0", "method": "list_witnesses", "params": ["init0",10], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"id": 1,
"jsonrpc": "2.0",
"result": [
[
"init0",
"1.6.1"
],
[
"init1",
"1.6.2"
],
[
"init10",
"1.6.11"
],
[
"init2",
"1.6.3"
],
[
"init3",
"1.6.4"
],
[
"init4",
"1.6.5"
],
[
"init5",
"1.6.6"
],
[
"init6",
"1.6.7"
],
[
"init7",
"1.6.8"
],
[
"init8",
"1.6.9"
]
]
}

通过用户名查询见证人详情

参数:见证人账号

1
{"jsonrpc": "2.0", "method": "get_witness", "params": ["init0"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.6.1",
"witness_account": "1.2.6",
"last_aslot": 3741892,
"signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"pay_vb": "1.13.11",
"vote_id": "1:0",
"total_votes": 0,
"url": "",
"total_missed": 0,
"last_confirmed_block_num": 37773
}
}

通过见证人id查询见证人详情

先查询见证人的普通账号id

1
{"jsonrpc": "2.0", "method": "get_object", "params": ["1.6.1"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "1.6.1",
"witness_account": "1.2.6",
"last_aslot": 4186995,
"signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"pay_vb": "1.13.11",
"vote_id": "1:0",
"total_votes": "999925340001863",
"url": "",
"total_missed": 1,
"last_confirmed_block_num": 482869
}
]
}

得到见证人对应的witness_account,然后调用同一个方法,将witness_account作为参数传入即可

1
{"jsonrpc": "2.0", "method": "get_object", "params": ["1.2.6"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "1.2.6",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.6",
"referrer": "1.2.6",
"lifetime_referrer": "1.2.6",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "init0",
"top_n_control_flags": 0
}
]
}

得到账户名name

委员会成员列表

参数:最顶层的账户名,最大数量

1
{"jsonrpc": "2.0", "method": "list_committee_members", "params": ["init0",10], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"id": 1,
"jsonrpc": "2.0",
"result": [
[
"init0",
"1.5.0"
],
[
"init1",
"1.5.1"
],
[
"init10",
"1.5.10"
],
[
"init2",
"1.5.2"
],
[
"init3",
"1.5.3"
],
[
"init4",
"1.5.4"
],
[
"init5",
"1.5.5"
],
[
"init6",
"1.5.6"
],
[
"init7",
"1.5.7"
],
[
"init8",
"1.5.8"
]
]
}

查询委员会账号详情

参数:委员会成员账号

1
{"jsonrpc": "2.0", "method": "get_committee_member", "params": ["init0"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.5.0",
"committee_member_account": "1.2.6",
"vote_id": "0:11",
"total_votes": 0,
"url": ""
}
}

通过交易id查询交易

链接:http://47.56.168.231/index/index/getTransaction?id=0dcdbe50a128deee41a18fe6788b5933a19211ba

参数:id = 交易id

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"code":0,
"type":"transfer",
"from":"nathan",
"to":"alpha",
"amount":"10000000000",
"asset":"BTS",
"fee":2105468,
"fee_asset":"BTS",
"memo":"here is the cash",
"txid":"0dcdbe50a128deee41a18fe6788b5933a19211ba",
"timestamp":"2019-09-03T03:17:10",
"block":401
}

用助记词派生出公私钥

参数:助记词,生成的数量

1
{"jsonrpc": "2.0", "method": "derive_owner_keys_from_brain_key", "params": ["IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES",5], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"brain_priv_key": "IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES",
"wif_priv_key": "5JjmpBny2216AGBXu6jCV9f15aH27fRrczN466MPRv3DarZiVFK",
"pub_key": "TLEC6UL7Q53kW15Tee78fLHZBcxN2Xzjf3bE8PGfYdA1pkZf5om7ks"
},
{
"brain_priv_key": "IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES",
"wif_priv_key": "5KVJ1Hj9TP1CwyjNV7BHj5vWxsAhAV95bpoR6NJXf7P3V9VhUx2",
"pub_key": "TLEC6MfDADpmTzzP2ACAog7dZDVthz3Te9FBbQadPevPXRES659MgL"
},
{
"brain_priv_key": "IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES",
"wif_priv_key": "5KURTeSztbVERQSTpvFx867iFyZVzx8miWAWFRwkTBftUgpAUvk",
"pub_key": "TLEC59hmVg8UxPxYGdeYFboBXZ4rSJBaBUHJsZp1EEajHPaVKmu1Eb"
},
{
"brain_priv_key": "IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES",
"wif_priv_key": "5JwjgX4pFqy8CtuyjRDhRgKTc6eDJcUjyUzbLbHD3CTigHbAf3N",
"pub_key": "TLEC6k1FLFAkjE5BB9tZTuMzqTpPbUVKC6Njv4ZzPNQQmLdKJmnu6d"
},
{
"brain_priv_key": "IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES",
"wif_priv_key": "5KQCxgU452dcK4v2BYgA9672moucK8DQzQExpr82XMVDJdCA4gB",
"pub_key": "TLEC8hdahDkRmz9MbkiBa9LHt39NKao5DcsyEfe4XZPgC8gXcTuZ7x"
}
]
}

创建账户

获取助记词

参数:无

1
{"jsonrpc": "2.0", "method": "suggest_brain_key", "params": [], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"brain_priv_key": "IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES",
"wif_priv_key": "5JjmpBny2216AGBXu6jCV9f15aH27fRrczN466MPRv3DarZiVFK",
"pub_key": "BTS6UL7Q53kW15Tee78fLHZBcxN2Xzjf3bE8PGfYdA1pkZf5om7ks"
}
}

用助记词注册账号

参数:助记词,新账号名(8位以上字母开头,至少一个数字,特殊字符只能是-),支付费用帐号,推荐人帐号,是否真实创建

例:创建账号test-123,支付费用帐号和推荐人帐号是nathan

1
{"jsonrpc": "2.0", "method": "create_account_with_brain_key", "params": ["IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES","test-123","nathan","nathan",true], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"ref_block_num": 29651,
"ref_block_prefix": 2513231364,
"expiration": "2019-09-30T07:28:55",
"operations": [
[
5,
{
"fee": {
"amount": 514355,
"asset_id": "1.3.0"
},
"registrar": "1.2.17",
"referrer": "1.2.17",
"referrer_percent": 0,
"name": "test-123",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7kPRNM1yzvfKQBagMA6bQiwpAmaGBh6aP6mtr8h1YXX2nD3oWC",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS85y6zRw4KKxWbbPyEbGGSuBvwXDAMJPoSqRmQvcGDPU3WWGqnP",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS7WX9CF4bbjkQHheLX4zMggYg6cXCJtPGT1it37dfGE8ctKKbC4",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"extensions": {}
}
]
],
"extensions": [],
"signatures": [
"206100580ba6369cb9d20ed4e1f4c05e61be2d60ca6fef4108e540947c4cd262007d45e2a295bc1eb89790ccc7802457955a035826fc0efeb21f63909192f7d3bb"
]
}
}

账户

余额和资产列表

参数:账户名

1
{"jsonrpc": "2.0", "method": "list_account_balances", "params": ["nathan"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"amount": "999918734664049",
"asset_id": "1.3.0"
}
]
}

通过资产id查询资产信息

参数:资产id

1
{"jsonrpc": "2.0", "method": "get_asset", "params": ["1.3.0"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.3.0",
"symbol": "BTS",
"precision": 5,
"issuer": "1.2.3",
"options": {
"max_supply": "1000000000000000",
"market_fee_percent": 0,
"max_market_fee": "1000000000000000",
"issuer_permissions": 0,
"flags": 0,
"core_exchange_rate": {
"base": {
"amount": 1,
"asset_id": "1.3.0"
},
"quote": {
"amount": 1,
"asset_id": "1.3.0"
}
},
"whitelist_authorities": [],
"blacklist_authorities": [],
"whitelist_markets": [],
"blacklist_markets": [],
"description": "",
"extensions": {}
},
"dynamic_asset_data_id": "2.3.0"
}
}

转账

参数:源账户名,要发往的账户名,金额,币种,备注

1
{"jsonrpc": "2.0", "method": "transfer2", "params": ["nathan","alpha",10,"BTS","This is memo"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"id": 1,
"jsonrpc": "2.0",
"result": [
"a31884057f4c20724acb54c6817b709892a89de5",
{
"ref_block_num": 35238,
"ref_block_prefix": 4037660452,
"expiration": "2019-09-19T06:07:45",
"operations": [
[
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1000000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "14845433245050049736",
"message": "199b07f4622468588c88c88d9a4349b8842c2efbe535d99b74eba99e70e225f5"
},
"extensions": []
}
]
],
"extensions": [],
"signatures": [
"200ecd4ddb9a9563b54f34e68ac218404ad8006a0b6efb5d8c118bb768542c787a7c7fbefecd41422702d94ce0f4890afd60311a55fb717801aad647d1b7df8d23"
]
}
]
}

近期活动

参数:账号名,获取数量

1
{"jsonrpc": "2.0", "method": "get_account_history", "params": ["nathan",10], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"memo": "",
"description": "Create Account 'test-123' (Fee: 5.14355 BTS)",
"op": {
"id": "1.11.54",
"op": [
5,
{
"fee": {
"amount": 514355,
"asset_id": "1.3.0"
},
"registrar": "1.2.17",
"referrer": "1.2.17",
"referrer_percent": 0,
"name": "test-123",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7kPRNM1yzvfKQBagMA6bQiwpAmaGBh6aP6mtr8h1YXX2nD3oWC",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS85y6zRw4KKxWbbPyEbGGSuBvwXDAMJPoSqRmQvcGDPU3WWGqnP",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS7WX9CF4bbjkQHheLX4zMggYg6cXCJtPGT1it37dfGE8ctKKbC4",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"extensions": {}
}
],
"result": [
1,
"1.2.26"
],
"block_num": 226260,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "This is memo",
"description": "Transfer 10 BTS from nathan to alpha -- Memo: This is memo (Fee: 21.05468 BTS)",
"op": {
"id": "1.11.53",
"op": [
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1000000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "14845433245050049736",
"message": "199b07f4622468588c88c88d9a4349b8842c2efbe535d99b74eba99e70e225f5"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 35239,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "1231456",
"description": "Transfer 1 BTS from nathan to alpha -- Memo: 1231456 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.52",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "505970742877495025",
"message": "ac61bc16cfb0e9c0db19758388a51214"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 19868,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "22222",
"description": "Transfer 1.11111 BTS from nathan to alpha -- Memo: 22222 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.51",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 111111,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "11674897818616179291",
"message": "69cc001a11d3007923dc4d00d28cac1f"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 19840,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "1111",
"description": "Transfer 1.11111 BTS from nathan to alpha -- Memo: 1111 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.50",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 111111,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "9873457945687579511",
"message": "73a3be1a5879273ef17ef1704a09309a"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15444,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "1111",
"description": "Transfer 1.10000 BTS from nathan to alpha -- Memo: 1111 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.49",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 110000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "578028314678850645",
"message": "c8813ee24bc9f75054379b6597ebd32f"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15421,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "1111",
"description": "Transfer 1 BTS from nathan to alpha -- Memo: 1111 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.48",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "1226546660888413102",
"message": "f5ca6ac11b5a35c4b38cba6a29e8dbb6"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15394,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "here is the cash",
"description": "Transfer 10.11111 BTS from nathan to alpha -- Memo: here is the cash (Fee: 21.05468 BTS)",
"op": {
"id": "1.11.47",
"op": [
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1011111,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "18160081259166631953",
"message": "81cc43710b389adbd4d56c40c1428b1729e08edff97ad4786e20e2caa4f0fb19"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15267,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "here is the cash",
"description": "Transfer 10.11100 BTS from nathan to alpha -- Memo: here is the cash (Fee: 21.05468 BTS)",
"op": {
"id": "1.11.46",
"op": [
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1011100,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "7855845311644090944",
"message": "cbd9b0f5aa51d4a9fc1dc8f5338d16d3148fa68d9e917580cbe9d06e0df97f21"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15247,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "test transfer2",
"description": "Transfer 1 BTS from nathan to alpha -- Memo: test transfer2 (Fee: 21.05468 BTS)",
"op": {
"id": "1.11.45",
"op": [
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "7279384504810601963",
"message": "18df1913c8b10bb1e16722c6d170cbb5c865454db16e49a4eb9c9241840e77b9"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 4344,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
}
]
}

查看指定类型的活动

参数:账户名,活动ID数组,开始下标,获取数量

1
{"jsonrpc": "2.0", "method": "get_account_history_by_operations", "params": ["nathan",[0,5],1,1], "id": 2}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"total_count": 3,
"result_count": 1,
"details": [
{
"memo": "",
"description": "Create Account 'alpha' (Fee: 2000.14062 BTS)",
"op": {
"id": "1.11.2",
"op": [
5,
{
"fee": {
"amount": 200014062,
"asset_id": "1.3.0"
},
"registrar": "1.2.17",
"referrer": "1.2.17",
"referrer_percent": 0,
"name": "alpha",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"extensions": {}
}
],
"result": [
1,
"1.2.18"
],
"block_num": 336,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
},
"transaction_id": "0ab9dd21324f024194811d707dc33d2c82e061bf"
}
]
}
}

投票

投票给超级节点

需要支付费用,所有必须要有余额

参数:投票账号,超级节点账号,投票(true)或取消投票(false),是否广播交易

1
{"jsonrpc": "2.0", "method": "vote_for_witness", "params": ["nathan","init0",true,true], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"ref_block_num": 38663,
"ref_block_prefix": 336266918,
"expiration": "2019-10-08T10:04:55",
"operations": [
[
6,
{
"fee": {
"amount": 2008398,
"asset_id": "1.3.0"
},
"account": "1.2.17",
"new_options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"1:0",
"0:23",
"0:24",
"0:25",
"0:26",
"0:27",
"0:28",
"0:29"
],
"extensions": []
},
"extensions": {}
}
]
],
"extensions": [],
"signatures": [
"1f64b5c1e6c61a56068fb32e280669f5c6d6a14f6b04cf6116a804c06dd86cfc0f335cb1ab8242daeadd0f88caa05f25a193ec7fa94ef3074d1afad2d6c368347c"
]
}
}

投票给理事会成员

需要支付费用,所有必须要有余额

参数:投票账号,理事会成员账号,投票(true)或取消投票(false),是否广播交易

1
{"jsonrpc": "2.0", "method": "vote_for_committee_member", "params": ["nathan","init0",true,true], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"ref_block_num": 38687,
"ref_block_prefix": 1350493683,
"expiration": "2019-10-08T10:06:55",
"operations": [
[
6,
{
"fee": {
"amount": 2008789,
"asset_id": "1.3.0"
},
"account": "1.2.17",
"new_options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"1:0",
"0:11",
"0:23",
"0:24",
"0:25",
"0:26",
"0:27",
"0:28",
"0:29"
],
"extensions": []
},
"extensions": {}
}
]
],
"extensions": [],
"signatures": [
"1f108b1f4155b2f50f994cb4f9665435f198037969e5e8242bdfb8b688715b69a728fecdf6edc575e56aee7e2b1b745d3e2160ffb026dad3dbf7c498ef77b551b3"
]
}
}

资产

资产列表

参数:列表中第一个资产的符号(可以是空),获取数量(最大100)

1
{"jsonrpc": "2.0", "method": "list_assets", "params": ["",10], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "1.3.0",
"symbol": "BTS",
"precision": 5,
"issuer": "1.2.3",
"options": {
"max_supply": "1000000000000000",
"market_fee_percent": 0,
"max_market_fee": "1000000000000000",
"issuer_permissions": 0,
"flags": 0,
"core_exchange_rate": {
"base": {
"amount": 1,
"asset_id": "1.3.0"
},
"quote": {
"amount": 1,
"asset_id": "1.3.0"
}
},
"whitelist_authorities": [],
"blacklist_authorities": [],
"whitelist_markets": [],
"blacklist_markets": [],
"description": "",
"extensions": {}
},
"dynamic_asset_data_id": "2.3.0"
}
]
}

创建资产

暂无

查询见证人详情

参数:见证人账号

1
{"jsonrpc": "2.0", "method": "get_witness", "params": ["init0"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.6.1",
"witness_account": "1.2.6",
"last_aslot": 3741892,
"signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"pay_vb": "1.13.11",
"vote_id": "1:0",
"total_votes": 0,
"url": "",
"total_missed": 0,
"last_confirmed_block_num": 37773
}
}

活动id对照表

ID 活动命令 备注
0 transfer_operation 转账
1 limit_order_create_operation 创建限价单
2 limit_order_cancel_operation 取消限价单
3 call_order_update_operation 更新债仓
4 fill_order_operation
5 account_create_operation 创建账户
6 account_update_operation 更新账户
7 account_whitelist_operation 账户白名单
8 account_upgrade_operation 升级账户
9 account_transfer_operation 账户转移
10 asset_create_operation 创建资产
11 asset_update_operation 更新资产
12 asset_update_bitasset_operation 更新智能货币
13 asset_update_feed_producers_operation 更新资产喂价提供者
14 asset_issue_operation 资产发行
15 asset_reserve_operation 销毁资产
16 asset_fund_fee_pool_operation 注资资产手续费池
17 asset_settle_operation 资产强清
18 asset_global_settle_operation 全局资产强清
19 asset_publish_feed_operation 发布资产喂价
20 witness_create_operation 创建见证人
21 witness_update_operation 更新见证人
22 proposal_create_operation 创建提议
23 proposal_update_operation 更新提议
24 proposal_delete_operation 删除提议
25 withdraw_permission_create_operation 授权提款
26 withdraw_permission_update_operation 更新提款授权
27 withdraw_permission_claim_operation 行使提款授权
28 withdraw_permission_delete_operation 删除提款授权
29 committee_member_create_operation 创建理事会成员
30 committee_member_update_operation 更新理事会成员
31 committee_member_update_global_paramet 全局参数更新
32 vesting_balance_create_operation 创建冻结账目余额
33 vesting_balance_withdraw_operation 提取解冻账户余额
34 worker_create_operation
35 custom_operation 自定义
36 assert_operation 断言操作
37 balance_claim_operation 申领余额
38 override_transfer_operation 强制转账
39 transfer_to_blind_operation
40 blind_transfer_operation 向隐私账户转账
41 transfer_from_blind_operation 从隐私账户转出
42 asset_settle_cancel_operation
43 asset_claim_fees_operation 申领资产手续费
44 fba_distribute_operation
45 bid_collateral_operation 抵押物竞价
46 execute_bid_operation
47 asset_claim_pool_operation 申领资产手续费池
48 asset_update_issuer_operation 更新资产发行者
49 custom_authority_create_operation
50 custom_authority_update_operation
51 custom_authority_delete_operation

获取所有费用参数

参数:无

1
{"jsonrpc": "2.0", "method": "get_object", "params": ["2.0.0"], "id": 1}

返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "2.0.0",
"parameters": {
"current_fees": {
"parameters": [
[
0,
{
"fee": 2000000,
"price_per_kbyte": 1000000
}
],
[
1,
{
"fee": 500000
}
],
[
2,
{
"fee": 0
}
],
[
3,
{
"fee": 2000000
}
],
[
4,
{}
],
[
5,
{
"basic_fee": 500000,
"premium_fee": 200000000,
"price_per_kbyte": 100000
}
],
[
6,
{
"fee": 2000000,
"price_per_kbyte": 100000
}
],
[
7,
{
"fee": 300000
}
],
[
8,
{
"membership_annual_fee": 200000000,
"membership_lifetime_fee": 1000000000
}
],
[
9,
{
"fee": 50000000
}
],
[
10,
{
"symbol3": "50000000000",
"symbol4": "30000000000",
"long_symbol": 500000000,
"price_per_kbyte": 10
}
],
[
11,
{
"fee": 50000000,
"price_per_kbyte": 10
}
],
[
12,
{
"fee": 50000000
}
],
[
13,
{
"fee": 50000000
}
],
[
14,
{
"fee": 2000000,
"price_per_kbyte": 100000
}
],
[
15,
{
"fee": 2000000
}
],
[
16,
{
"fee": 100000
}
],
[
17,
{
"fee": 10000000
}
],
[
18,
{
"fee": 50000000
}
],
[
19,
{
"fee": 100000
}
],
[
20,
{
"fee": 500000000
}
],
[
21,
{
"fee": 2000000
}
],
[
22,
{
"fee": 2000000,
"price_per_kbyte": 10
}
],
[
23,
{
"fee": 2000000,
"price_per_kbyte": 10
}
],
[
24,
{
"fee": 100000
}
],
[
25,
{
"fee": 100000
}
],
[
26,
{
"fee": 100000
}
],
[
27,
{
"fee": 2000000,
"price_per_kbyte": 10
}
],
[
28,
{
"fee": 0
}
],
[
29,
{
"fee": 500000000
}
],
[
30,
{
"fee": 2000000
}
],
[
31,
{
"fee": 100000
}
],
[
32,
{
"fee": 100000
}
],
[
33,
{
"fee": 2000000
}
],
[
34,
{
"fee": 500000000
}
],
[
35,
{
"fee": 100000,
"price_per_kbyte": 10
}
],
[
36,
{
"fee": 100000
}
],
[
37,
{}
],
[
38,
{
"fee": 2000000,
"price_per_kbyte": 10
}
],
[
39,
{
"fee": 500000,
"price_per_output": 500000
}
],
[
40,
{
"fee": 500000,
"price_per_output": 500000
}
],
[
41,
{
"fee": 500000
}
],
[
42,
{}
],
[
43,
{
"fee": 2000000
}
],
[
44,
{}
],
[
45,
{
"fee": 2000000
}
],
[
46,
{}
],
[
47,
{
"fee": 2000000
}
],
[
48,
{
"fee": 2000000
}
]
],
"scale": 10000
},
"block_interval": 5,
"maintenance_interval": 86400,
"maintenance_skip_slots": 3,
"committee_proposal_review_period": 1209600,
"maximum_transaction_size": 2048,
"maximum_block_size": 2000000,
"maximum_time_until_expiration": 86400,
"maximum_proposal_lifetime": 2419200,
"maximum_asset_whitelist_authorities": 10,
"maximum_asset_feed_publishers": 10,
"maximum_witness_count": 1001,
"maximum_committee_count": 1001,
"maximum_authority_membership": 10,
"reserve_percent_of_fee": 2000,
"network_percent_of_fee": 2000,
"lifetime_referrer_percent_of_fee": 3000,
"cashback_vesting_period_seconds": 31536000,
"cashback_vesting_threshold": 10000000,
"count_non_member_votes": true,
"allow_non_member_whitelists": false,
"witness_pay_per_block": 1000000,
"worker_budget_per_day": "50000000000",
"max_predicate_opcode": 1,
"fee_liquidation_threshold": 10000000,
"accounts_per_fee_scale": 1000,
"account_fee_scale_bitshifts": 4,
"max_authority_depth": 2,
"extensions": {}
},
"next_available_vote_id": 30,
"active_committee_members": [
"1.5.0",
"1.5.1",
"1.5.2",
"1.5.3",
"1.5.4",
"1.5.5",
"1.5.6",
"1.5.7",
"1.5.8",
"1.5.10",
"1.5.11"
],
"active_witnesses": [
"1.6.1",
"1.6.2",
"1.6.3",
"1.6.4",
"1.6.5",
"1.6.6",
"1.6.7",
"1.6.8",
"1.6.9",
"1.6.10",
"1.6.11"
]
}
]
}
-------------本文结束感谢您的阅读-------------
🐶 您的支持将鼓励我继续创作 🐶