> ## Documentation Index
> Fetch the complete documentation index at: https://developers.fireblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculate the AOT quota for a policy rule

> <Badge color="blue" shape="pill">EA</Badge> Early Availability: this endpoint may change before GA.

Returns the Amount Over Time (AOT) quota calculated for a specific policy rule.

Endpoint Permissions: Owner, Admin, Non-Signing Admin.




## OpenAPI

````yaml https://swagger.fireblocks.com/openapi.yaml post /policy/rules/quota
openapi: 3.0.0
info:
  title: Fireblocks API
  description: >
    Fireblocks provides a suite of applications to manage digital asset
    operations and a complete development platform to build your business on the
    blockchain.


    - Visit our website for more information: [Fireblocks
    Website](https://fireblocks.com)

    - Visit our developer docs: [Fireblocks
    DevPortal](https://developers.fireblocks.com)
  version: 1.6.2
  contact:
    email: developers@fireblocks.com
servers:
  - url: https://api.fireblocks.io/v1
    description: Fireblocks Production Environment Base URL
  - url: https://sandbox-api.fireblocks.io/v1
    description: Fireblocks Sandbox Environment Base URL
security: []
paths:
  /policy/rules/quota:
    post:
      tags:
        - Policy Editor V2
      summary: Calculate the AOT quota for a policy rule
      description: >
        <Badge color="blue" shape="pill">EA</Badge> Early Availability: this
        endpoint may change before GA.


        Returns the Amount Over Time (AOT) quota calculated for a specific
        policy rule.


        Endpoint Permissions: Owner, Admin, Non-Signing Admin.
      operationId: getPolicyRuleQuota
      parameters:
        - $ref: '#/components/parameters/X-Idempotency-Key'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyRuleQuotaRequest'
      responses:
        '200':
          description: The calculated AOT quota for the rule
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyRuleQuotaResponse'
        '400':
          description: >-
            Invalid request parameters or rule configuration prevents AOT
            calculation.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '403':
          description: Caller lacks permission to access the requested rule.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: The requested policy rule was not found.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '429':
          description: 'Rate limit exceeded: slow down and retry later.'
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Internal server error while calculating AOT quota.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response: Promise<FireblocksResponse<PolicyRuleQuotaResponse>>
            =
            fireblocks.policyEditorV2.getPolicyRuleQuota(policyEditorV2ApiGetPolicyRuleQuotaRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<PolicyRuleQuotaResponse>> response =
            fireblocks.policyEditorV2().getPolicyRuleQuota(policyRuleQuotaRequest,
            idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.policy_editor_v2.get_policy_rule_quota(policy_rule_quota_request,
            idempotency_key);
components:
  parameters:
    X-Idempotency-Key:
      name: Idempotency-Key
      in: header
      description: >-
        A unique identifier for the request. If the request is sent multiple
        times with the same idempotency key, the server will return the same
        response as the first request. The idempotency key is valid for 24
        hours.
      required: false
      schema:
        type: string
  schemas:
    PolicyRuleQuotaRequest:
      type: object
      required:
        - ruleId
      properties:
        ruleId:
          type: string
          description: The ID of the policy rule to calculate AOT quota for
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        initiator:
          type: string
          description: Optional initiator identifier for the AOT calculation
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        source:
          $ref: '#/components/schemas/PolicyRuleQuotaParticipant'
        destination:
          $ref: '#/components/schemas/PolicyRuleQuotaParticipant'
    PolicyRuleQuotaResponse:
      type: object
      properties:
        amount:
          type: string
          description: The calculated Amount Over Time (AOT) quota for the rule
          example: '10000'
        quotaConfig:
          $ref: '#/components/schemas/AmountOverTimeConfig'
        currency:
          type: string
          description: The currency of the AOT amount
          example: USD
        windowStart:
          type: number
          description: Unix timestamp (seconds) of the start of the current AOT time window
          example: 1699913600
        windowEnd:
          type: number
          description: >-
            Unix timestamp (seconds) of the end of the current AOT time window
            (when the AOT was calculated)
          example: 1700000000
        transactionCount:
          type: number
          description: Number of transactions in the current AOT time window
          example: 5
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
    PolicyRuleQuotaParticipant:
      type: object
      description: Participant identifier for AOT quota calculation
      required:
        - id
        - type
      properties:
        id:
          type: string
          description: Participant identifier (integer for VAULT accounts, UUID for others)
          example: '123'
        type:
          type: string
          description: Participant type
          example: VAULT
      example:
        id: '123'
        type: VAULT
    AmountOverTimeConfig:
      type: object
      description: Amount over time configuration
      properties:
        range:
          $ref: '#/components/schemas/AmountRangeMinMax-2'
        currency:
          $ref: '#/components/schemas/PolicyCurrency'
        timePeriod:
          $ref: '#/components/schemas/TimePeriodConfig'
      required:
        - range
        - currency
        - timePeriod
    AmountRangeMinMax-2:
      type: object
      description: Amount range with minimum and maximum values
      properties:
        min:
          type: string
          description: Minimum amount
          example: '100'
        max:
          type: string
          description: Maximum amount
          example: '10000'
      required:
        - min
      example:
        min: '100'
        max: '10000'
    PolicyCurrency:
      type: string
      enum:
        - NATIVE
        - USD
        - EUR
      description: Currency for the amount
      example: USD
    TimePeriodConfig:
      type: object
      description: Time period configuration
      properties:
        seconds:
          type: string
          description: Time period in seconds
          example: '86400'
        initiator:
          $ref: '#/components/schemas/TimePeriodMatchType'
        source:
          $ref: '#/components/schemas/TimePeriodMatchType'
        destination:
          $ref: '#/components/schemas/TimePeriodMatchType'
      required:
        - seconds
        - initiator
        - source
        - destination
    TimePeriodMatchType:
      type: string
      enum:
        - PER_SINGLE_MATCH
        - ACROSS_ALL_MATCHES
      description: Type of match for time period application
      example: PER_SINGLE_MATCH
  headers:
    X-Request-ID:
      schema:
        type: string
      description: >-
        Unique ID correlated to the API request. Please provide it in any
        support ticket you create or on Github issues related to Fireblocks SDKs
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'

````