Web3 Cloud API (1.0.0)
Download OpenAPI specification:Download
BatchRegisterAddresses
Batch register addresses to given wallet.
Authorizations:
Request Body schema: application/json
| wallet_id required | string Unique ID of wallet. |
| addresses | Array of strings Substrate address. |
Responses
Request samples
- Payload
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "addresses": [
- "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe"
]
}Response samples
- 200
- 500
{ }BatchRemoveAddresses
Batch remove addresses from given wallet.
Authorizations:
Request Body schema: application/json
| wallet_id required | string Unique ID of wallet. |
| addresses | Array of strings Substrate addresses. |
| remove_all | boolean If true, remove all addresses for given wallet. |
Responses
Request samples
- Payload
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "addresses": [
- "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe"
], - "remove_all": true
}Response samples
- 200
- 500
{ }RegisterAddress
Register address to given wallet.
Authorizations:
Request Body schema: application/json
| wallet_id required | string Unique ID of wallet. |
| address required | string Substrate address. |
Responses
Request samples
- Payload
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "address": "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe"
}Response samples
- 200
- 500
{ }RemoveAddress
Remove address from given wallet.
Authorizations:
Request Body schema: application/json
| wallet_id required | string Unique ID of wallet. |
| address required | string Substrate address. |
Responses
Request samples
- Payload
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "address": "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe"
}Response samples
- 200
- 500
{ }GetWallet
Get wallet. 404 error will be returned if the wallet is not found.
Authorizations:
Request Body schema: application/json
Either the wallet_id or address must be present.
| wallet_id | string Unique ID of wallet. |
| address | string Substrate address. |
Responses
Request samples
- Payload
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "address": "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe"
}Response samples
- 200
- 500
{- "wallet": {
- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "name": "Alice Wallet",
- "addresses": [
- "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe"
], - "create_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z"
}
}ListWallets
List wallets.
Authorizations:
Request Body schema: application/json
| page_size | integer <int64> <= 100 Default: "10" Number of items per page. |
| page_token | string Token for next page. |
Responses
Request samples
- Payload
{- "page_size": 10,
- "page_token": "CXART7WOIQT6AAAK"
}Response samples
- 200
- 500
{- "wallets": [
- {
- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "name": "Alice Wallet",
- "addresses": [
- "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe"
], - "create_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "next_page_token": "CXART7WOIQT6AAAK"
}
}RegisterWallet
Register wallet.
Authorizations:
Request Body schema: application/json
| name required | string [ 1 .. 50 ] characters Wallet name. |
| address | string Substrate address. |
Responses
Request samples
- Payload
{- "name": "Alice Wallet",
- "address": "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe"
}Response samples
- 200
- 500
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7"
}ListAssets
List assets of given wallet or address.
Authorizations:
Request Body schema: application/json
Either the wallet_id or address must be present.
| wallet_id | string Unique ID of wallet. |
| asset_type required | any Enum: "ASSET_TYPE_SBY" "ASSET_TYPE_ASTR" Type of asset. |
| address required | string Substrate address. |
| is_aggregated | boolean If true, aggregate the balances of all addresses for each asset type. |
| page_size | integer <int64> <= 100 Default: "10" Number of items per page. |
| page_token | string Token for next page. |
| exclude_zero_balance | boolean Default: "false" If true, exclude asset whose balance is 0. |
Responses
Request samples
- Payload
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "asset_type": "ASSET_TYPE_ASTR",
- "address": "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe",
- "is_aggregated": true,
- "page_size": 10,
- "page_token": "CXART7WOIQT6AAAK",
- "exclude_zero_balance": "false"
}Response samples
- 200
- 500
{- "assets": [
- {
- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "address": "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe",
- "asset_type": "ASSET_TYPE_ASTR",
- "balance": "1.9582"
}
], - "pagination": {
- "next_page_token": "CXART7WOIQT6AAAK"
}
}RefreshAssetBalances
Refresh balances of assets of given wallet or address.
Authorizations:
Request Body schema: application/json
Either the wallet_id or address must be present.
| wallet_id | string Unique ID of wallet. |
| address required | string Substrate address. |
| asset_type required | any Enum: "ASSET_TYPE_SBY" "ASSET_TYPE_ASTR" Type of asset. |
Responses
Request samples
- Payload
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "address": "Z7yDRizXD9nmeKQF6bm6Cf4pWH1QCuHyrb98g4chir65RTe",
- "asset_type": "ASSET_TYPE_ASTR"
}Response samples
- 200
- 500
{ }ListWebhooks
List webhooks.
Authorizations:
Request Body schema: application/json
Responses
Request samples
- Payload
{ }Response samples
- 200
- 500
{- "webhooks": [
- {
- "webhook_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "wallet_id": "795359fc-e181-4d11-ab53-2a3fd21092cc",
- "confirmation": 10,
}
]
}RegisterWebhook
Register webhook to get notified on wallet activities.
Authorizations:
Request Body schema: application/json
If wallet_id is not provided, webhook will be registered for all wallets.
| wallet_id | string Unique ID of wallet. |
| webhook_endpoint required | string Webhook endpoint. |
| confirmation required | integer <int64> The threshold of block confirmations before the Webhook is triggered. |
Responses
Request samples
- Payload
{- "wallet_id": "3f80f049-b3be-4afd-ac46-1901d43232d7",
- "confirmation": 10
}Response samples
- 200
- 500
{- "webhook_id": "3f80f049-b3be-4afd-ac46-1901d43232d7"
}RemoveWebhook
Remove webhook.
Authorizations:
Request Body schema: application/json
| webhook_id required | string Unique ID of webhook. |
Responses
Request samples
- Payload
{- "webhook_id": "3f80f049-b3be-4afd-ac46-1901d43232d7"
}Response samples
- 200
- 500
{ }