cosmos.bank.v1beta1.Query/AllBalances method is GET /cosmos/bank/v1beta1/balances/{address}. Request arguments are passed as query parameters.
The following examples assume you are using REST Endpoints to interact with your node in your local private network. You can change the domain to public networks.
As a concrete example, the curl command to make balances request is:
localhost:1317 with the REST endpoint of your node, configured under the api.address field.
The list of all available REST endpoints is available as a Swagger specification file; it can be viewed at localhost:1317/swagger. Make sure that the api.swagger field is set to true in your app.toml file.
Query for historical state using REST
Querying for historical state is done using the HTTP headerx-cosmos-block-height. For example, a curl command would look like:
Cross-Origin Resource Sharing (CORS)
CORS policies are not enabled by default to help with security. If you would like to use the rest-server , we recommend you provide a reverse proxy. This can be done with nginx. For testing and development purposes, there is anenabled-unsafe-cors field inside app.toml.