Algorand public API

The public API from Algorand — 43 operation(s) for public.

OpenAPI Specification

algorand-public-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  contact:
    email: contact@algorand.com
    name: algorand
    url: https://www.algorand.com/get-in-touch/contact
  description: API endpoint for algod operations.
  title: Algod REST API. common public API
  version: 0.0.1
servers:
- url: http://localhost/
- url: https://localhost/
security:
- api_key: []
tags:
- name: public
paths:
  /genesis:
    get:
      description: Returns the entire genesis file in json.
      operationId: GetGenesis
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Genesis'
          description: The genesis file in json.
        default:
          content: {}
          description: Unknown Error
      summary: Gets the genesis information.
      tags:
      - public
  /health:
    get:
      operationId: HealthCheck
      responses:
        '200':
          content: {}
          description: OK.
        default:
          content: {}
          description: Unknown Error
      summary: Returns OK if healthy.
      tags:
      - public
  /metrics:
    get:
      operationId: Metrics
      responses:
        '200':
          content: {}
          description: text with \#-comments and key:value lines
        '404':
          content: {}
          description: metrics were compiled out
      summary: Return metrics about algod functioning.
      tags:
      - public
  /ready:
    get:
      operationId: GetReady
      responses:
        '200':
          content: {}
          description: OK.
        '500':
          content: {}
          description: Internal Error
        '503':
          content: {}
          description: Node not ready yet
        default:
          content: {}
          description: Unknown Error
      summary: Returns OK if healthy and fully caught up.
      tags:
      - public
  /swagger.json:
    get:
      description: Returns the entire swagger spec in json.
      operationId: SwaggerJSON
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: The current swagger spec
        default:
          content: {}
          description: Unknown Error
      summary: Gets the current swagger spec.
      tags:
      - public
  /v2/accounts/{address}:
    get:
      description: Given a specific account public key, this call returns the account's status, balance and spendable amounts
      operationId: AccountInformation
      parameters:
      - description: An account public key.
        in: path
        name: address
        required: true
        schema:
          pattern: '[A-Z0-9]{58}'
          type: string
          x-go-type: basics.Address
        x-go-type: basics.Address
      - description: 'Exclude additional items from the account. Use `all` to exclude asset holdings, application local state, created asset parameters, and created application parameters. Use `created-apps-params` to exclude only the parameters of created applications (returns only application IDs). Use `created-assets-params` to exclude only the parameters of created assets (returns only asset IDs). Multiple values can be comma-separated (e.g., `created-apps-params,created-assets-params`). Note: `all` and `none` cannot be combined with other values. Defaults to `none`.'
        explode: false
        in: query
        name: exclude
        schema:
          items:
            enum:
            - all
            - none
            - created-apps-params
            - created-assets-params
            type: string
          type: array
        style: form
      - description: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.
        in: query
        name: format
        schema:
          enum:
          - json
          - msgpack
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/Account'
          description: AccountResponse wraps the Account type in a response.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get account information.
      tags:
      - public
  /v2/accounts/{address}/applications:
    get:
      description: Lookup an account's application holdings (local state and params if the account is the creator).
      operationId: AccountApplicationsInformation
      parameters:
      - description: An account public key.
        in: path
        name: address
        required: true
        schema:
          pattern: '[A-Z0-9]{58}'
          type: string
          x-go-type: basics.Address
        x-go-type: basics.Address
      - description: Maximum number of results to return.
        in: query
        name: limit
        schema:
          type: integer
          x-go-type: uint64
        x-go-type: uint64
      - description: The next page of results. Use the next token provided by the previous results.
        in: query
        name: next
        schema:
          type: string
      - description: Include additional items in the response. Use `params` to include full application parameters (global state, schema, etc.). Multiple values can be comma-separated. Defaults to returning only application IDs and local state.
        explode: false
        in: query
        name: include
        schema:
          items:
            enum:
            - params
            type: string
          type: array
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  application-resources:
                    items:
                      $ref: '#/components/schemas/AccountApplicationResource'
                    type: array
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter. The next token is the next application ID to use as the pagination cursor.
                    type: string
                  round:
                    description: The round for which this information is relevant.
                    type: integer
                    x-go-type: basics.Round
                required:
                - round
                type: object
          description: AccountApplicationsInformationResponse contains a list of application resources for an account.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Malformed address
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get a list of applications held by an account.
      tags:
      - public
  /v2/accounts/{address}/applications/{application-id}:
    get:
      description: Given a specific account public key and application ID, this call returns the account's application local state and global state (AppLocalState and AppParams, if either exists). Global state will only be returned if the provided address is the application's creator.
      operationId: AccountApplicationInformation
      parameters:
      - description: An account public key.
        in: path
        name: address
        required: true
        schema:
          pattern: '[A-Z0-9]{58}'
          type: string
          x-go-type: basics.Address
        x-go-type: basics.Address
      - description: An application identifier.
        in: path
        name: application-id
        required: true
        schema:
          minimum: 0
          type: integer
          x-go-type: basics.AppIndex
        x-go-type: basics.AppIndex
      - description: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.
        in: query
        name: format
        schema:
          enum:
          - json
          - msgpack
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  app-local-state:
                    $ref: '#/components/schemas/ApplicationLocalState'
                  created-app:
                    $ref: '#/components/schemas/ApplicationParams'
                  round:
                    description: The round for which this information is relevant.
                    type: integer
                    x-go-type: basics.Round
                required:
                - round
                type: object
            application/msgpack:
              schema:
                properties:
                  app-local-state:
                    $ref: '#/components/schemas/ApplicationLocalState'
                  created-app:
                    $ref: '#/components/schemas/ApplicationParams'
                  round:
                    description: The round for which this information is relevant.
                    type: integer
                    x-go-type: basics.Round
                required:
                - round
                type: object
          description: AccountApplicationResponse describes the account's application local state and global state (AppLocalState and AppParams, if either exists) for a specific application ID. Global state will only be returned if the provided address is the application's creator.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Malformed address or application ID
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get account information about a given app.
      tags:
      - public
  /v2/accounts/{address}/assets:
    get:
      description: Lookup an account's asset holdings.
      operationId: AccountAssetsInformation
      parameters:
      - description: An account public key.
        in: path
        name: address
        required: true
        schema:
          pattern: '[A-Z0-9]{58}'
          type: string
          x-go-type: basics.Address
        x-go-type: basics.Address
      - description: Maximum number of results to return.
        in: query
        name: limit
        schema:
          type: integer
          x-go-type: uint64
        x-go-type: uint64
      - description: The next page of results. Use the next token provided by the previous results.
        in: query
        name: next
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  asset-holdings:
                    items:
                      $ref: '#/components/schemas/AccountAssetHolding'
                    type: array
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter.
                    type: string
                  round:
                    description: The round for which this information is relevant.
                    type: integer
                    x-go-type: basics.Round
                required:
                - round
                type: object
          description: AccountAssetsInformationResponse contains a list of assets held by an account.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Malformed address
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get a list of assets held by an account, inclusive of asset params.
      tags:
      - public
  /v2/accounts/{address}/assets/{asset-id}:
    get:
      description: Given a specific account public key and asset ID, this call returns the account's asset holding and asset parameters (if either exist). Asset parameters will only be returned if the provided address is the asset's creator.
      operationId: AccountAssetInformation
      parameters:
      - description: An account public key.
        in: path
        name: address
        required: true
        schema:
          pattern: '[A-Z0-9]{58}'
          type: string
          x-go-type: basics.Address
        x-go-type: basics.Address
      - description: An asset identifier.
        in: path
        name: asset-id
        required: true
        schema:
          minimum: 0
          type: integer
          x-go-type: basics.AssetIndex
        x-go-type: basics.AssetIndex
      - description: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.
        in: query
        name: format
        schema:
          enum:
          - json
          - msgpack
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  asset-holding:
                    $ref: '#/components/schemas/AssetHolding'
                  created-asset:
                    $ref: '#/components/schemas/AssetParams'
                  round:
                    description: The round for which this information is relevant.
                    type: integer
                    x-go-type: basics.Round
                required:
                - round
                type: object
            application/msgpack:
              schema:
                properties:
                  asset-holding:
                    $ref: '#/components/schemas/AssetHolding'
                  created-asset:
                    $ref: '#/components/schemas/AssetParams'
                  round:
                    description: The round for which this information is relevant.
                    type: integer
                    x-go-type: basics.Round
                required:
                - round
                type: object
          description: AccountAssetResponse describes the account's asset holding and asset parameters (if either exist) for a specific asset ID. Asset parameters will only be returned if the provided address is the asset's creator.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Malformed address or asset ID
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get account information about a given asset.
      tags:
      - public
  /v2/accounts/{address}/transactions/pending:
    get:
      description: Get the list of pending transactions by address, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.
      operationId: GetPendingTransactionsByAddress
      parameters:
      - description: An account public key.
        in: path
        name: address
        required: true
        schema:
          pattern: '[A-Z0-9]{58}'
          type: string
          x-go-type: basics.Address
        x-go-type: basics.Address
      - description: Truncated number of transactions to display. If max=0, returns all pending txns.
        in: query
        name: max
        schema:
          type: integer
          x-go-type: uint64
        x-go-type: uint64
      - description: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.
        in: query
        name: format
        schema:
          enum:
          - json
          - msgpack
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                description: PendingTransactions is an array of signed transactions exactly as they were submitted.
                properties:
                  top-transactions:
                    description: An array of signed transaction objects.
                    items:
                      properties: {}
                      type: object
                      x-algorand-format: SignedTransaction
                    type: array
                  total-transactions:
                    description: Total number of transactions in the pool.
                    type: integer
                required:
                - top-transactions
                - total-transactions
                type: object
            application/msgpack:
              schema:
                description: PendingTransactions is an array of signed transactions exactly as they were submitted.
                properties:
                  top-transactions:
                    description: An array of signed transaction objects.
                    items:
                      properties: {}
                      type: object
                      x-algorand-format: SignedTransaction
                    type: array
                  total-transactions:
                    description: Total number of transactions in the pool.
                    type: integer
                required:
                - top-transactions
                - total-transactions
                type: object
          description: A potentially truncated list of transactions currently in the node's transaction pool. You can compute whether or not the list is truncated if the number of elements in the **top-transactions** array is fewer than **total-transactions**.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Max must be a non-negative integer
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/msgpack:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Temporarily Unavailable
        default:
          content: {}
          description: Unknown Error
      summary: Get a list of unconfirmed transactions currently in the transaction pool by address.
      tags:
      - public
  /v2/applications/{application-id}:
    get:
      description: Given a application ID, it returns application information including creator, approval and clear programs, global and local schemas, and global state.
      operationId: GetApplicationByID
      parameters:
      - description: An application identifier.
        in: path
        name: application-id
        required: true
        schema:
          minimum: 0
          type: integer
          x-go-type: basics.AppIndex
        x-go-type: basics.AppIndex
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Application'
          description: Application information
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Application Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get application information.
      tags:
      - public
  /v2/applications/{application-id}/box:
    get:
      description: Given an application ID and box name, it returns the round, box name, and value (each base64 encoded). Box names must be in the goal app call arg encoding form 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use the form 'addr:XYZ...'.
      operationId: GetApplicationBoxByName
      parameters:
      - description: An application identifier.
        in: path
        name: application-id
        required: true
        schema:
          minimum: 0
          type: integer
          x-go-type: basics.AppIndex
        x-go-type: basics.AppIndex
      - description: A box name, in the goal app call arg form 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use the form 'addr:XYZ...'.
        in: query
        name: name
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Box'
          description: Box information
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Box Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get box information for a given application.
      tags:
      - public
  /v2/applications/{application-id}/boxes:
    get:
      description: 'Given an application ID, return all box names. No particular ordering is guaranteed. Request fails when client or server-side configured limits prevent returning all box names.


        Pagination mode is enabled when any of the following parameters are provided: limit, next, prefix, include, or round. In pagination mode box values can be requested and results are returned in sorted order.


        To paginate: use the next-token from a previous response as the next parameter in the following request. Pin the round parameter to the round value from the first page''s response to ensure consistent results across pages. The server enforces a per-response byte limit, so fewer results than limit may be returned even when more exist; the presence of next-token is the only reliable signal that more data is available.'
      operationId: GetApplicationBoxes
      parameters:
      - description: An application identifier.
        in: path
        name: application-id
        required: true
        schema:
          minimum: 0
          type: integer
          x-go-type: basics.AppIndex
        x-go-type: basics.AppIndex
      - description: Max number of box names to return. If max is not set, or max == 0, returns all box-names.
        in: query
        name: max
        schema:
          type: integer
          x-go-type: uint64
        x-go-type: uint64
      - description: Maximum number of boxes to return per page.
        in: query
        name: limit
        schema:
          type: integer
          x-go-type: uint64
        x-go-type: uint64
      - description: A box name, in the goal app call arg form 'encoding:value', representing the earliest box name to include in results. Use the next-token from a previous response.
        in: query
        name: next
        schema:
          type: string
      - description: A box name prefix, in the goal app call arg form 'encoding:value', to filter results by. Only boxes whose names start with this prefix will be returned.
        in: query
        name: prefix
        schema:
          type: string
      - description: Include additional items in the response. Use `values` to include box values. Multiple values can be comma-separated.
        explode: false
        in: query
        name: include
        schema:
          items:
            enum:
            - values
            type: string
          type: array
        style: form
      - description: Return box data from the given round. The round must be within the node's available range.
        in: query
        name: round
        schema:
          format: uint64
          type: integer
          x-go-type: basics.Round
        x-go-type: basics.Round
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  boxes:
                    items:
                      $ref: '#/components/schemas/BoxDescriptor'
                    type: array
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter. The next token is the box name to use as the pagination cursor, encoded in the goal app call arg form.
                    type: string
                  round:
                    description: The round for which this information is relevant.
                    type: integer
                    x-go-type: basics.Round
                required:
                - boxes
                type: object
          description: Boxes of an application
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get all box names for a given application.
      tags:
      - public
  /v2/assets/{asset-id}:
    get:
      description: Given a asset ID, it returns asset information including creator, name, total supply and special addresses.
      operationId: GetAssetByID
      parameters:
      - description: An asset identifier.
        in: path
        name: asset-id
        required: true
        schema:
          minimum: 0
          type: integer
          x-go-type: basics.AssetIndex
        x-go-type: basics.AssetIndex
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
          description: Asset information
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid API Token
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Application Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Error
        default:
          content: {}
          description: Unknown Error
      summary: Get asset information.
      tags:
      - public
  /v2/blocks/{round}:
    get:
      operationId: GetBlock
      parameters:
      - description: A round number.
        in: path
        name: round
        required: true
        schema:
          minimum: 0
          type: integer
          x-go-type: basics.Round
        x-go-type: basics.Round
      - description: If true, only the block header (exclusive of payset or certificate) may be included in response.
        in: query
        name: header-only
        schema:
          type: boolean
      - description: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON.
        in: query
        name: format
        schema:
          enum:
          - json
          - msgpack
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  block:
         

# --- truncated at 32 KB (150 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/algorand/refs/heads/main/openapi/algorand-public-api-openapi.yml