Akash Network Bank API

The Bank API from Akash Network — 4 operation(s) for bank.

OpenAPI Specification

akash-bank-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: AKASH - gRPC Gateway docs Addresses Bank API
  description: A REST interface for state queries
  version: 1.0.0
tags:
- name: Bank
paths:
  /bank/balances/{address}:
    get:
      deprecated: true
      summary: Get the account balances
      tags:
      - Bank
      produces:
      - application/json
      parameters:
      - in: path
        name: address
        description: Account address in bech32 format
        required: true
        type: string
        x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv
      responses:
        '200':
          description: Account balances
          schema:
            type: array
            items:
              type: object
              properties:
                denom:
                  type: string
                  example: stake
                amount:
                  type: string
                  example: '50'
        '500':
          description: Server internal error
  /bank/accounts/{address}/transfers:
    post:
      deprecated: true
      summary: Send coins from one account to another
      tags:
      - Bank
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: path
        name: address
        description: Account address in bech32 format
        required: true
        type: string
        x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv
      - in: body
        name: account
        description: The sender and tx information
        required: true
        schema:
          type: object
          properties:
            base_req:
              type: object
              properties:
                from:
                  type: string
                  example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc
                  description: Sender address or Keybase name to generate a transaction
                memo:
                  type: string
                  example: Sent via Cosmos Voyager 🚀
                chain_id:
                  type: string
                  example: Cosmos-Hub
                account_number:
                  type: string
                  example: '0'
                sequence:
                  type: string
                  example: '1'
                gas:
                  type: string
                  example: '200000'
                gas_adjustment:
                  type: string
                  example: '1.2'
                fees:
                  type: array
                  items:
                    type: object
                    properties:
                      denom:
                        type: string
                        example: stake
                      amount:
                        type: string
                        example: '50'
                simulate:
                  type: boolean
                  example: false
                  description: Estimate gas for a transaction (cannot be used in conjunction with generate_only)
            amount:
              type: array
              items:
                type: object
                properties:
                  denom:
                    type: string
                    example: stake
                  amount:
                    type: string
                    example: '50'
      responses:
        '202':
          description: Tx was succesfully generated
          schema:
            type: object
            properties:
              msg:
                type: array
                items:
                  type: string
              fee:
                type: object
                properties:
                  gas:
                    type: string
                  amount:
                    type: array
                    items:
                      type: object
                      properties:
                        denom:
                          type: string
                          example: stake
                        amount:
                          type: string
                          example: '50'
              memo:
                type: string
              signature:
                type: object
                properties:
                  signature:
                    type: string
                    example: MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY=
                  pub_key:
                    type: object
                    properties:
                      type:
                        type: string
                        example: tendermint/PubKeySecp256k1
                      value:
                        type: string
                        example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
                  account_number:
                    type: string
                    example: '0'
                  sequence:
                    type: string
                    example: '0'
        '400':
          description: Invalid request
        '500':
          description: Server internal error
  /bank/total:
    get:
      deprecated: true
      summary: Total supply of coins in the chain
      tags:
      - Bank
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            type: object
            properties:
              total:
                type: array
                items:
                  type: object
                  properties:
                    denom:
                      type: string
                      example: stake
                    amount:
                      type: string
                      example: '50'
        '500':
          description: Internal Server Error
  /bank/total/{denomination}:
    parameters:
    - in: path
      name: denomination
      description: Coin denomination
      required: true
      type: string
      x-example: uatom
    get:
      deprecated: true
      summary: Total supply of a single coin denomination
      tags:
      - Bank
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            type: string
        '400':
          description: Invalid coin denomination
        '500':
          description: Internal Server Error
securityDefinitions:
  kms:
    type: basic