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

# Update or pause a managed balance refill policy



## OpenAPI

````yaml /openapi/openapi.json patch /execution/balance-refill-policies/{policyId}
openapi: 3.0.2
info:
  title: AGG API
  version: 1.0.0
  description: >-
    Prediction market aggregator REST API — authentication, users, venue events,
    venue markets, orderbooks, charts, and execution workflows.
servers:
  - url: https://api.agg.market
    description: Production
  - url: https://api.staging.agg.market
    description: Staging
security: []
paths:
  /execution/balance-refill-policies/{policyId}:
    patch:
      tags:
        - Execution
      summary: Update or pause a managed balance refill policy
      operationId: updateBalanceRefillPolicy
      parameters:
        - name: policyId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                minimumRaw:
                  pattern: ^[1-9][0-9]*$
                  type: string
                refillAmountRaw:
                  pattern: ^[1-9][0-9]*$
                  type: string
                dailyCapRaw:
                  pattern: ^[1-9][0-9]*$
                  type: string
                maxFeeRaw:
                  pattern: ^[1-9][0-9]*$
                  type: string
                status:
                  type: string
                  enum:
                    - enabled
                    - paused
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - targetChainId
                  - targetTokenAddress
                  - targetTokenSymbol
                  - minimumRaw
                  - refillAmountRaw
                  - dailyCapRaw
                  - maxFeeRaw
                  - status
                  - cooldownSeconds
                  - lastObservedRaw
                  - lastEvaluatedAt
                  - nextEligibleAt
                  - consentedAt
                  - createdAt
                  - updatedAt
                  - latestAttempt
                properties:
                  id:
                    type: string
                  targetChainId:
                    type: integer
                  targetTokenAddress:
                    type: string
                  targetTokenSymbol:
                    type: string
                    enum:
                      - USDC
                  minimumRaw:
                    pattern: ^[1-9][0-9]*$
                    type: string
                  refillAmountRaw:
                    pattern: ^[1-9][0-9]*$
                    type: string
                  dailyCapRaw:
                    pattern: ^[1-9][0-9]*$
                    type: string
                  maxFeeRaw:
                    pattern: ^[1-9][0-9]*$
                    type: string
                  status:
                    type: string
                    enum:
                      - enabled
                      - paused
                  cooldownSeconds:
                    minimum: 60
                    type: integer
                  lastObservedRaw:
                    pattern: ^[0-9]+$
                    type: string
                    nullable: true
                  lastEvaluatedAt:
                    format: date-time
                    type: string
                    nullable: true
                  nextEligibleAt:
                    format: date-time
                    type: string
                    nullable: true
                  consentedAt:
                    format: date-time
                    type: string
                  createdAt:
                    format: date-time
                    type: string
                  updatedAt:
                    format: date-time
                    type: string
                  latestAttempt:
                    type: object
                    required:
                      - id
                      - policyId
                      - status
                      - triggerBalanceRaw
                      - requestedDeliveryRaw
                      - sourceAmountRaw
                      - completedAmountRaw
                      - sourceChainId
                      - targetChainId
                      - feeRaw
                      - errorMessage
                      - startedAt
                      - completedAt
                      - createdAt
                    properties:
                      id:
                        type: string
                      policyId:
                        type: string
                      status:
                        type: string
                        enum:
                          - reserved
                          - executing
                          - completed
                          - failed
                      triggerBalanceRaw:
                        pattern: ^[0-9]+$
                        type: string
                      requestedDeliveryRaw:
                        pattern: ^[1-9][0-9]*$
                        type: string
                      sourceAmountRaw:
                        pattern: ^[1-9][0-9]*$
                        type: string
                      completedAmountRaw:
                        pattern: ^[0-9]+$
                        type: string
                        nullable: true
                      sourceChainId:
                        type: integer
                      targetChainId:
                        type: integer
                      feeRaw:
                        pattern: ^[0-9]+$
                        type: string
                        nullable: true
                      errorMessage:
                        type: string
                        nullable: true
                      startedAt:
                        format: date-time
                        type: string
                        nullable: true
                      completedAt:
                        format: date-time
                        type: string
                        nullable: true
                      createdAt:
                        format: date-time
                        type: string
                    nullable: true
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
      security:
        - appId: []
          bearerAuth: []
components:
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-app-id
      description: Your application ID. Required for all app-tier and user-tier routes.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token returned by POST /auth/verify. Required for user-tier
        routes.

````