|
14 | 14 | * [3.1 统计delegate,undelegate,claim总量](#3.1)
|
15 | 15 |
|
16 | 16 | <h3 id="1.1">1.1 获取Validator集合</h3>
|
17 |
| -* `GET /api/valiators` |
18 |
| -* 参数 |
| 17 | +* `GET /api/valiators` |
| 18 | +* 参数 |
19 | 19 |
|
20 | 20 | | 参数 | 类型 | 必传 | 说明 |
|
21 | 21 | |-----------|--------|----|----------|
|
|
24 | 24 | | page | number | N | 页码,默认1 |
|
25 | 25 | | page_size | number | N | 页大小,默认10 |
|
26 | 26 |
|
27 |
| -* Request: `http://localhost/api/validators?online=true&page=1&page_size=5` |
28 |
| -* Response: 返回结果按power(质押总量)降序排列 |
| 27 | +* Request: `http://localhost/api/validators?online=true&page=1&page_size=5` |
| 28 | +* Response: 返回结果按power(质押总量)降序排列 |
29 | 29 | ```json
|
30 | 30 | {
|
31 | 31 | "total": 31,
|
|
146 | 146 | ```
|
147 | 147 |
|
148 | 148 | <h3 id="1.2">1.2 获取validator最近20笔质押变化</h3>
|
149 |
| -* `GET /api/diff/latest` |
150 |
| -* 参数 |
| 149 | +* `GET /api/diff/latest` |
| 150 | +* 参数 |
151 | 151 |
|
152 | 152 | | 参数 | 类型 | 必传 | 说明 |
|
153 | 153 | |-----------|--------|----|-------------|
|
154 | 154 | | validator | string | Y | validator地址 |
|
155 | 155 |
|
156 |
| -* Request: `http://localhost/api/diff/latest?validator=0xc8d2d4ff0b882243f82c1fb20574c81e4c866e72` |
157 |
| -* Response: |
| 156 | +* Request: `http://localhost/api/diff/latest?validator=0xc8d2d4ff0b882243f82c1fb20574c81e4c866e72` |
| 157 | +* Response: |
158 | 158 | * 按高度降序排列
|
159 | 159 | * 返回值中`amount`,非零正数表示delegate的数量,非零负数表示undelegate的数量
|
160 | 160 | * 如果`amount`是0,则用`op`区分,`op`为零表示delegate,非零表示undelegate
|
|
247 | 247 | ]
|
248 | 248 | ```
|
249 | 249 | <h3 id="1.3">1.3 获取validator的delegate记录</h3>
|
250 |
| -* `GET /api/records/delegate` |
251 |
| -* 参数 |
| 250 | +* `GET /api/records/delegate` |
| 251 | +* 参数 |
252 | 252 |
|
253 | 253 | | 参数 | 类型 | 必传 | 说明 |
|
254 | 254 | |-----------|--------|----|--------------------------|
|
255 | 255 | | validator | string | N | validator地址,不传则返回所有的质押记录 |
|
256 | 256 | | page | number | N | 页码,默认1 |
|
257 | 257 | | page_size | number | N | 页大小,默认10 |
|
258 | 258 |
|
259 |
| -* Request: `http://localhost/api/records/delegate?validator=0xc8d2d4ff0b882243f82c1fb20574c81e4c866e72&page=1&page_size=5` |
260 |
| -* Response: |
| 259 | +* Request: `http://localhost/api/records/delegate?validator=0xc8d2d4ff0b882243f82c1fb20574c81e4c866e72&page=1&page_size=5` |
| 260 | +* Response: |
261 | 261 | * 按`timestamp`降序排列
|
262 | 262 | ```json
|
263 | 263 | {
|
|
304 | 304 | ```
|
305 | 305 |
|
306 | 306 | <h3 id="1.4">1.4 获取validator的undelegate记录</h3>
|
307 |
| -* `GET /api/records/undelegate` |
308 |
| -* 参数 |
| 307 | +* `GET /api/records/undelegate` |
| 308 | +* 参数 |
309 | 309 |
|
310 | 310 | | 参数 | 类型 | 必传 | 说明 |
|
311 | 311 | |-----------|--------|----|---------------------------|
|
312 | 312 | | validator | string | N | validator地址,不传则返回所有的解质押记录 |
|
313 | 313 | | page | number | N | 页码,默认1 |
|
314 | 314 | | page_size | number | N | 页大小,默认10 |
|
315 | 315 |
|
316 |
| -* Request: `http://localhost/api/records/undelegate?validator=0x6e20c920f1bdb817f0e19cd05dae01c6affa5228&page=1&page_size=10` |
317 |
| -* Response: |
| 316 | +* Request: `http://localhost/api/records/undelegate?validator=0x6e20c920f1bdb817f0e19cd05dae01c6affa5228&page=1&page_size=10` |
| 317 | +* Response: |
318 | 318 | * 按`timestamp`降序排列
|
319 | 319 | ```json
|
320 | 320 | {
|
|
342 | 342 |
|
343 | 343 |
|
344 | 344 | <h3 id="2.1">2.1 获取bound数量</h3>
|
345 |
| -* `GET /api/bound` |
346 |
| -* 参数 |
| 345 | +* `GET /api/bound` |
| 346 | +* 参数 |
347 | 347 |
|
348 | 348 | | 参数 | 类型 | 必传 | 说明 |
|
349 | 349 | |-----------|--------|----|-------------|
|
350 | 350 | | validator | string | Y | validator地址 |
|
351 | 351 | | delegator | string | Y | delegator地址 |
|
352 | 352 |
|
353 |
| -* Request: `http://localhost/api/bound?validator=0x09ef1db6b67d1cbf7eba6bd9b204611848993df7&delegator=0x2d15d52cc138ffb322b732239cd3630735abac88` |
354 |
| -* Response: |
| 353 | +* Request: `http://localhost/api/bound?validator=0x09ef1db6b67d1cbf7eba6bd9b204611848993df7&delegator=0x2d15d52cc138ffb322b732239cd3630735abac88` |
| 354 | +* Response: |
355 | 355 | ```json
|
356 | 356 | {
|
357 | 357 | "bound_amount": "110000001800000063120",
|
|
360 | 360 | ```
|
361 | 361 |
|
362 | 362 |
|
363 |
| - |
364 | 363 | <h3 id="2.2">2.2 获取reward数量</h3>
|
365 |
| -* `GET /api/reward` |
366 |
| -* 参数 |
| 364 | +* `GET /api/reward` |
| 365 | +* 参数 |
367 | 366 |
|
368 | 367 | | 参数 | 类型 | 必传 | 说明 |
|
369 | 368 | |---------|--------|----|-------------|
|
370 | 369 | | address | string | Y | delegator地址 |
|
371 | 370 |
|
372 |
| -* Request: `http://localhost/api/reward?address=0x2d15d52cc138ffb322b732239cd3630735abac88` |
373 |
| -* Response: |
| 371 | +* Request: `http://localhost/api/reward?address=0x2d15d52cc138ffb322b732239cd3630735abac88` |
| 372 | +* Response: |
374 | 373 | ```json
|
375 | 374 | {
|
376 | 375 | "reward": "16742332457649244907"
|
377 | 376 | }
|
378 | 377 | ```
|
379 | 378 |
|
380 | 379 | <h3 id="2.3">2.3 获取debt数量</h3>
|
381 |
| -* `GET /api/debt` |
382 |
| -* 参数 |
| 380 | +* `GET /api/debt` |
| 381 | +* 参数 |
383 | 382 |
|
384 | 383 | | 参数 | 类型 | 必传 | 说明 |
|
385 | 384 | |-----------|--------|----|-------------|
|
386 | 385 | | validator | string | Y | validator地址 |
|
387 | 386 | | delegator | string | Y | delegator地址 |
|
388 | 387 |
|
389 |
| -* Request: `http://localhost/api/debt?validator=0xd518c4f95a3f39ed853a2614566897c4ad5a008f&delegator=0x2d15d52cc138ffb322b732239cd3630735abac88` |
390 |
| -* Response: |
| 388 | +* Request: `http://localhost/api/debt?validator=0xd518c4f95a3f39ed853a2614566897c4ad5a008f&delegator=0x2d15d52cc138ffb322b732239cd3630735abac88` |
| 389 | +* Response: |
391 | 390 | ```json
|
392 | 391 | {
|
393 | 392 | "debt": "96558069283467635"
|
394 | 393 | }
|
395 | 394 | ```
|
396 | 395 |
|
397 | 396 | <h3 id="3.1">3.1 获取debt数量</h3>
|
398 |
| -* `GET /api/sum` |
399 |
| -* 参数 |
| 397 | +* `GET /api/sum` |
| 398 | +* 参数 |
400 | 399 |
|
401 | 400 | | 参数 | 类型 | 必传 | 说明 |
|
402 | 401 | |---------|--------|----|----|
|
403 | 402 | | address | string | Y | 地址 |
|
404 | 403 |
|
405 |
| -* Request: `http://localhost/api/sum?address=0xeb2b96369e83e1466bb56f2bf9d97cbda130e741` |
406 |
| -* Response: |
| 404 | +* Request: `http://localhost/api/sum?address=0xeb2b96369e83e1466bb56f2bf9d97cbda130e741` |
| 405 | +* Response: |
407 | 406 | ```json
|
408 | 407 | {
|
409 | 408 | "delegate": "32254951206000000000000",
|
|
0 commit comments