https://github.com/aelfproject/aelf-webserver
https://github.com/aelfproject/aelf-webserver
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/aelfproject/aelf-webserver
- Owner: AElfProject
- Created: 2021-09-07T03:25:48.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-09-30T03:34:37.000Z (over 3 years ago)
- Last Synced: 2025-03-22T15:43:15.372Z (about 1 year ago)
- Language: C#
- Size: 63.5 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Use swagger to test after launching:
http://localhost:7080/swagger/index.html
# api/getBalance
Config symbol list in `Config`-`TokenList` of `appsettings.json`
```json
{
"TokenList":[
"ELF",
"VOTE"
]
}
```
Usage:
```shell
http://localhost:7080/api/getBalance?address=2PdTR9GvuL4PgXbq4VoebbBRNWEPmAwzMmsCxiSsvP5gdymWBY
```
Response
```json
{
"ELF": 39946480000,
"VOTE": 0
}
```
# api/getBalanceBySymbol
Need to input `symbol` & `address` to Request Body.
Usage:
```shell
curl -X POST "http://localhost:7080/api/getBalanceBySymbol" -H "accept: text/plain; v=1.0" -H "Content-Type: application/json; v=1.0" -d "{\"symbol\":\"ELF\",\"address\":\"2PdTR9GvuL4PgXbq4VoebbBRNWEPmAwzMmsCxiSsvP5gdymWBY\"}"
```
Response
```json
39946480000
```