# Chiliz Chain API

The Chiliz Chain API provides access to useful information about the CHZ supply and governance, including circulating supply details up to a specific block and staking information for a given address.

## API Details

### Base URL

The API's base URL is <https://cc-api.chiliz.com/>

The default Swagger doc is available here: <https://cc-api.chiliz.com/docs>

### Authentication

The Chiliz Chain API uses the [OpenAPI Specification](https://www.openapis.org/) (OAS) v3.0.3 for defining its security schemes.

Please refer to the [OAS 3.0 specification](https://spec.openapis.org/oas/v3.0.3.html) for details on how to authenticate, as specific authentication methods are not detailed in this documentation.

### Data Format

All requests and responses are in JSON format.

## Endpoints

### GET /supply

Retrieves the current circulating supply of CHZ up to a specified block number, along with block-specific inflation and deflation information.

## GET /supply

>

```json
{"openapi":"3.0.3","info":{"title":"Chiliz Chain API","version":"0.1.0"},"paths":{"/supply":{"get":{"parameters":[{"schema":{"type":"number"},"in":"query","name":"block","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"block":{"type":"string"},"totalSupply":{"type":"string"},"blockDeflation":{"type":"string"},"blockInflation":{"type":"string"},"totalBurnedSupply":{"type":"string"},"totalIntroducedSupply":{"type":"string"}},"required":["block","totalSupply","blockDeflation","blockInflation","totalBurnedSupply","totalIntroducedSupply"],"additionalProperties":false}}}}}}}}}
```

### GET /staker-info

Retrieves the current total staked amount and staking rewards for a specific address up to a certain epoch number, along with details of where the CHZ is staked (validators and amounts).

## GET /staker-info

>

```json
{"openapi":"3.0.3","info":{"title":"Chiliz Chain API","version":"0.1.0"},"paths":{"/staker-info":{"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"validator","required":false},{"schema":{"type":"string"},"in":"query","name":"staker","required":true},{"schema":{"type":"number"},"in":"query","name":"toEpoch","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"totalRewards":{"type":"string"},"stakedAmount":{"type":"string"},"allStakes":{"type":"array","items":{"type":"object","properties":{"validator":{"type":"string"},"stakedAmount":{"type":"number"}},"required":["validator","stakedAmount"],"additionalProperties":false}}},"required":["totalRewards","stakedAmount","allStakes"],"additionalProperties":false}}}}}}}}}
```
