Tokens information from the Antelope blockchains, powered by Substreams
Method | Path | Description |
---|---|---|
GET text/html |
/ |
Swagger API playground |
GET application/json |
/chains |
Information about the chains and latest head block in the database |
GET application/json |
/{chain}/balance |
Balances of an account. |
GET application/json |
/{chain}/holders |
List of holders of a token |
GET application/json |
/{chain}/supply |
Total supply for a token |
GET application/json |
/{chain}/tokens |
List of available tokens |
GET application/json |
/{chain}/transfers |
All transfers related to a token |
GET application/json |
/{chain}/transfers/{trx_id} |
Specific transfer related to a token |
Method | Path | Description |
---|---|---|
GET application/json |
/openapi |
OpenAPI specification |
GET application/json |
/version |
API version and Git short commit hash |
Method | Path | Description |
---|---|---|
GET text/plain |
/health |
Checks database connection |
GET text/plain |
/metrics |
Prometheus metrics |
- ClickHouse
- (Optional) A Substream sink for loading data into ClickHouse. We recommend Substreams Sink ClickHouse or Substreams Sink SQL. You should use the generated
protobuf
files to build your substream.
Install Bun
$ bun install
$ bun dev
Tests
$ bun lint
$ bun test
Warning
Linux x86 only
$ wget https://github.com/pinax-network/antelope-token-api/releases/download/v3.0.0/antelope-token-api
$ chmod +x ./antelope-token-api
$ ./antelope-token-api --help
Usage: antelope-token-api [options]
Token balances, supply and transfers from the Antelope blockchains
Options:
-V, --version output the version number
-p, --port <number> HTTP port on which to attach the API (default: "8080", env: PORT)
--hostname <string> Server listen on HTTP hostname (default: "localhost", env: HOSTNAME)
--host <string> Database HTTP hostname (default: "http://localhost:8123", env: HOST)
--database <string> The database to use inside ClickHouse (default: "default", env: DATABASE)
--username <string> Database user (default: "default", env: USERNAME)
--password <string> Password associated with the specified username (default: "", env: PASSWORD)
--max-limit <number> Maximum LIMIT queries (default: 10000, env: MAX_LIMIT)
-v, --verbose <boolean> Enable verbose logging (choices: "true", "false", default: false, env: VERBOSE)
-h, --help display help for command
# API Server
PORT=8080
HOSTNAME=localhost
# Clickhouse Database
HOST=http://127.0.0.1:8123
DATABASE=default
USERNAME=default
PASSWORD=
TABLE=
MAX_LIMIT=500
# Logging
VERBOSE=true
- Pull from GitHub Container registry
For latest release
docker pull ghcr.io/pinax-network/antelope-token-api:latest
For head of develop
branch
docker pull ghcr.io/pinax-network/antelope-token-api:develop
- Build from source
docker build -t antelope-token-api .
- Run with
.env
file
docker run -it --rm --env-file .env ghcr.io/pinax-network/antelope-token-api
See CONTRIBUTING.md
.