Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' of github.com:itering/subscan-api-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhong committed Jul 12, 2021
2 parents e77cc43 + 94d2f03 commit 19dcdea
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 2 deletions.
93 changes: 91 additions & 2 deletions source/includes/_para.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,98 @@ curl -X POST 'https://rococo.api.subscan.io/api/scan/parachain/auctionCompetitor
"block_timestamp": 1619058966,
"extrinsic_index": "150-0",
"event_index": "150-4"
},
...
}
]
}
}
```


## para fund Stat

```shell
curl -X POST 'https://kusama.api.subscan.io/api/scan/parachain/fundStat' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_KEY'
--data-raw '{"start":"2021-06-10","end":"2021-06-30","format":"hour","fund_id":"2004-6"}'
```

### Request URL

`POST /api/scan/parachain/fundStat`

### Payload

| Parameter | Type | Require | Default | Description |
| --------- | ---- | ------- | ------- | --------------------------- |
| start | bool | Yes | | start time(eq:2021-06-10) |
| end | string | Yes | | end time(eq:2021-06-30) |
| format | bool | No | day | hour,day,6hour |
| fund_id | bool | Yes | | fund id(eq:2004-6 ) |

> Example Response
```json
{
"code": 0,
"message": "Success",
"ttl": 1,
"data": {
"list": [
{
"time_utc": "2021-06-10T00:00:00Z",
"time_hour_utc": "2021-06-10T00:00:00Z",
"time_six_hour_utc": "2021-06-10T00:00:00Z",
"total": "0"
}
]
}
}
```


## best bid

```shell
curl -X POST 'https://kusama.api.subscan.io/api/scan/parachain/bestBid' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_KEY'
--data-raw '{"bid_id":"1-13-20"}'
```

### Request URL

`POST /api/scan/parachain/bestBid`

### Payload

| Parameter | Type | Require | Default | Description |
| --------- | ---- | ------- | ------- | --------------------------- |
| bid_id | string | Yes | no | bid id |


> Example Response
```json
{
"code": 0,
"message": "Success",
"ttl": 1,
"data": {
"bid_id": "1-13-20",
"fund_id": "2000-1",
"auction_index": 1,
"first_period": 13,
"last_period": 20,
"para_id": 2000,
"bidder_account": "6d6f646c70792f6366756e64d007000000000000000000000000000000000000",
"amount": "491752906100722948",
"source": 2,
"status": 3,
"block_num": 8004479,
"block_timestamp": 1624237734,
"extrinsic_index": "8004479-0",
"event_index": "8004479-2"
}
}
```
44 changes: 44 additions & 0 deletions source/includes/_staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,47 @@ curl -X POST 'https://polkadot.api.subscan.io/api/scan/account/reward_slash' \
}
}
```


## unbonding

```shell
curl -X POST 'https://polkadot.api.subscan.io/api/scan/staking/unbonding' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_KEY' \
--data-raw '{
"row": 20,
"page": 0,
"address": "YOUR_STASH_ADDRESS"
}'
```

### Request URL

`POST /api/scan/staking/unbonding`

### Payload

| Name | Type | Require |
| ------- | ------ | ------- |
| address | string | yes |


> Example Response
```json
{
"code": 0,
"message": "Success",
"ttl": 1,
"data": {
"native": [
{
"amount": "20000000000",
"until": 5849004
}
]
}
}

```

1 comment on commit 19dcdea

@vercel
Copy link

@vercel vercel bot commented on 19dcdea Jul 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.