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

# List an agent's completed executions with their receipts, newest first

> Every completed transfer, withdrawal, swap, limit order (completed: funded and placed, not filled) and deposit of the agent whose receipt is retained, newest first, in the shape getReceipt returns; `type` keeps one type. Page with `cursor` and `limit`: with `type`, a page may hold fewer than `limit` items while `next_cursor` is set, so read on until it is null.



## OpenAPI

````yaml https://api.agentsonintents.com/openapi.json get /v1/agents/{agent_id}/receipts
openapi: 3.1.0
info:
  title: NEAR Intents Agent API
  version: 1.0.0
  description: >-
    Backend API for AI agents that trade on NEAR Intents under an owner-signed
    policy.


    The Agent API is an experimental, mainnet-only beta. You and your users may
    lose all assets used with it, or lose access to them. It is operated by NEAR
    Technologies Limited.


    Before an owner signs `agent_create`, show the Owner Terms, OutLayer's terms
    and the required risk notice, and keep evidence of acceptance. Show the
    notice again before the owner funds the wallet. `preview.summary` ends with
    the notice.


    Authenticate with `X-API-Key`. Create and revoke keys at
    partners.near-intents.org; each expires after 365 days. Keep the key on your
    backend.


    Owner actions use generate-intent → owner wallet signs `intent.payload`
    unchanged → submit-intent → GET /v1/status. Agent actions (swap, withdraw,
    transfer, …) need no owner signature, only `X-Grant-Token` for a live owner
    grant (who may act), or `X-Grant-Proof` signed by a `public_key` grant's key
    for each request; the account policy decides what every grant may do, and
    return a `correlation_id` for GET /v1/status.


    The agent's account is its confidential balance: swaps, limit orders,
    transfers, deposit addresses, withdrawals and balance reads use it by
    default. The legacy public balance can only be emptied, by shield or a
    withdrawal with `confidential: false`; any other request on it is refused
    with `public_balance_exit_only`.


    Errors are JSON:API documents. Every field, parameter and error code is
    snake_case. Branch on `errors[].code`, never on `title`. `UNCERTAIN` means
    the outcome is not yet proven: keep polling the same `correlation_id` and
    never resubmit under a new `Idempotency-Key`. `PENDING_DEPOSIT` is a deposit
    address waiting for funds; a withdrawal's bridge leg reads `PROCESSING`.
    `NEEDS_REVIEW` stops routine polling: inspect `details.reason`, never retry,
    then use `refresh=true` after provider/manual resolution.
servers:
  - url: https://api.agentsonintents.com
security: []
tags:
  - name: Owner intents
  - name: Status
  - name: Agents
  - name: Policy
  - name: Grants
  - name: Approvals
  - name: Executions
  - name: Native accounts
  - name: Meta
paths:
  /v1/agents/{agent_id}/receipts:
    get:
      tags:
        - Status
      summary: List an agent's completed executions with their receipts, newest first
      description: >-
        Every completed transfer, withdrawal, swap, limit order (completed:
        funded and placed, not filled) and deposit of the agent whose receipt is
        retained, newest first, in the shape getReceipt returns; `type` keeps
        one type. Page with `cursor` and `limit`: with `type`, a page may hold
        fewer than `limit` items while `next_cursor` is set, so read on until it
        is null.
      operationId: listReceipts
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{64}$
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            maxLength: 128
        - name: limit
          in: query
          required: false
          schema:
            default: 25
            type: integer
            minimum: 1
            maximum: 100
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - transfer
              - withdraw
              - swap
              - limit_order
              - deposit
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            correlation_id:
                              type: string
                              pattern: ^op_[A-Za-z0-9_-]{43}$
                            type:
                              type: string
                              const: transfer
                            status:
                              type: string
                              enum:
                                - PROVEN
                                - PENDING
                                - UNLOGGED
                            details:
                              type: object
                              properties:
                                asset:
                                  type: string
                                amount:
                                  type: string
                                recipient:
                                  type: string
                                confidential:
                                  type: boolean
                                reference:
                                  type: string
                                settled_at:
                                  type: string
                                usd_value:
                                  type: string
                                  pattern: ^[0-9]{1,24}\.[0-9]{6}$
                                note:
                                  type: string
                                  pattern: ^[^\p{Cc}\p{Cs}\p{Zl}\p{Zp}]{1,500}$
                                grant_id:
                                  type: string
                                policy_epoch:
                                  type: string
                                  pattern: ^(0|[1-9][0-9]{0,19})$
                                intent_hash:
                                  type: string
                                transfer_intent_hash:
                                  type: string
                                tx_hash:
                                  type: string
                                destination_tx_hash:
                                  type: string
                                settlement_tx_hash:
                                  type: string
                                receipt_hash:
                                  type: string
                              required:
                                - asset
                                - amount
                                - recipient
                                - confidential
                                - settled_at
                              additionalProperties: false
                            receipt:
                              anyOf:
                                - type: object
                                  properties:
                                    version:
                                      type: number
                                      const: 1
                                    origin:
                                      type: string
                                    leaf_index:
                                      type: string
                                      pattern: ^(0|[1-9][0-9]{0,19})$
                                    opening:
                                      type: string
                                    terms:
                                      type: string
                                  required:
                                    - version
                                    - origin
                                    - leaf_index
                                    - opening
                                    - terms
                                  additionalProperties: false
                                - type: 'null'
                          required:
                            - correlation_id
                            - type
                            - status
                            - details
                            - receipt
                          additionalProperties: false
                        - type: object
                          properties:
                            correlation_id:
                              type: string
                              pattern: ^op_[A-Za-z0-9_-]{43}$
                            type:
                              type: string
                              const: withdraw
                            status:
                              type: string
                              enum:
                                - PROVEN
                                - PENDING
                                - UNLOGGED
                            details:
                              type: object
                              properties:
                                asset:
                                  type: string
                                amount:
                                  type: string
                                recipient:
                                  type: string
                                confidential:
                                  type: boolean
                                reference:
                                  type: string
                                chain:
                                  type: string
                                memo:
                                  type: string
                                amount_out:
                                  type: string
                                settled_at:
                                  type: string
                                usd_value:
                                  type: string
                                  pattern: ^[0-9]{1,24}\.[0-9]{6}$
                                note:
                                  type: string
                                  pattern: ^[^\p{Cc}\p{Cs}\p{Zl}\p{Zp}]{1,500}$
                                grant_id:
                                  type: string
                                policy_epoch:
                                  type: string
                                  pattern: ^(0|[1-9][0-9]{0,19})$
                                intent_hash:
                                  type: string
                                transfer_intent_hash:
                                  type: string
                                tx_hash:
                                  type: string
                                destination_tx_hash:
                                  type: string
                                settlement_tx_hash:
                                  type: string
                                receipt_hash:
                                  type: string
                              required:
                                - asset
                                - amount
                                - recipient
                                - confidential
                                - chain
                                - settled_at
                              additionalProperties: false
                            receipt:
                              anyOf:
                                - type: object
                                  properties:
                                    version:
                                      type: number
                                      const: 1
                                    origin:
                                      type: string
                                    leaf_index:
                                      type: string
                                      pattern: ^(0|[1-9][0-9]{0,19})$
                                    opening:
                                      type: string
                                    terms:
                                      type: string
                                  required:
                                    - version
                                    - origin
                                    - leaf_index
                                    - opening
                                    - terms
                                  additionalProperties: false
                                - type: 'null'
                          required:
                            - correlation_id
                            - type
                            - status
                            - details
                            - receipt
                          additionalProperties: false
                        - type: object
                          properties:
                            correlation_id:
                              type: string
                              pattern: ^op_[A-Za-z0-9_-]{43}$
                            type:
                              type: string
                              const: swap
                            status:
                              type: string
                              enum:
                                - PROVEN
                                - PENDING
                                - UNLOGGED
                            details:
                              type: object
                              properties:
                                origin_asset:
                                  type: string
                                destination_asset:
                                  type: string
                                amount:
                                  type: string
                                confidential:
                                  type: boolean
                                amount_out:
                                  type: string
                                min_amount_out:
                                  type: string
                                settled_at:
                                  type: string
                                usd_value:
                                  type: string
                                  pattern: ^[0-9]{1,24}\.[0-9]{6}$
                                note:
                                  type: string
                                  pattern: ^[^\p{Cc}\p{Cs}\p{Zl}\p{Zp}]{1,500}$
                                grant_id:
                                  type: string
                                policy_epoch:
                                  type: string
                                  pattern: ^(0|[1-9][0-9]{0,19})$
                                intent_hash:
                                  type: string
                                transfer_intent_hash:
                                  type: string
                                tx_hash:
                                  type: string
                                destination_tx_hash:
                                  type: string
                                settlement_tx_hash:
                                  type: string
                                receipt_hash:
                                  type: string
                              required:
                                - origin_asset
                                - destination_asset
                                - amount
                                - confidential
                                - settled_at
                              additionalProperties: false
                            receipt:
                              anyOf:
                                - type: object
                                  properties:
                                    version:
                                      type: number
                                      const: 1
                                    origin:
                                      type: string
                                    leaf_index:
                                      type: string
                                      pattern: ^(0|[1-9][0-9]{0,19})$
                                    opening:
                                      type: string
                                    terms:
                                      type: string
                                  required:
                                    - version
                                    - origin
                                    - leaf_index
                                    - opening
                                    - terms
                                  additionalProperties: false
                                - type: 'null'
                          required:
                            - correlation_id
                            - type
                            - status
                            - details
                            - receipt
                          additionalProperties: false
                        - type: object
                          properties:
                            correlation_id:
                              type: string
                              pattern: ^op_[A-Za-z0-9_-]{43}$
                            type:
                              type: string
                              const: limit_order
                            status:
                              type: string
                              enum:
                                - PROVEN
                                - PENDING
                                - UNLOGGED
                            details:
                              type: object
                              properties:
                                origin_asset:
                                  type: string
                                destination_asset:
                                  type: string
                                amount:
                                  type: string
                                confidential:
                                  type: boolean
                                amount_out:
                                  type: string
                                side:
                                  type: string
                                  enum:
                                    - sell
                                    - buy
                                price:
                                  type: string
                                quantity:
                                  type: string
                                deadline:
                                  type: string
                                order_id:
                                  type: string
                                settled_at:
                                  type: string
                                usd_value:
                                  type: string
                                  pattern: ^[0-9]{1,24}\.[0-9]{6}$
                                note:
                                  type: string
                                  pattern: ^[^\p{Cc}\p{Cs}\p{Zl}\p{Zp}]{1,500}$
                                grant_id:
                                  type: string
                                policy_epoch:
                                  type: string
                                  pattern: ^(0|[1-9][0-9]{0,19})$
                                intent_hash:
                                  type: string
                                transfer_intent_hash:
                                  type: string
                                tx_hash:
                                  type: string
                                destination_tx_hash:
                                  type: string
                                settlement_tx_hash:
                                  type: string
                                receipt_hash:
                                  type: string
                              required:
                                - origin_asset
                                - destination_asset
                                - amount
                                - confidential
                                - side
                                - price
                                - quantity
                                - order_id
                                - settled_at
                              additionalProperties: false
                            receipt:
                              anyOf:
                                - type: object
                                  properties:
                                    version:
                                      type: number
                                      const: 1
                                    origin:
                                      type: string
                                    leaf_index:
                                      type: string
                                      pattern: ^(0|[1-9][0-9]{0,19})$
                                    opening:
                                      type: string
                                    terms:
                                      type: string
                                  required:
                                    - version
                                    - origin
                                    - leaf_index
                                    - opening
                                    - terms
                                  additionalProperties: false
                                - type: 'null'
                          required:
                            - correlation_id
                            - type
                            - status
                            - details
                            - receipt
                          additionalProperties: false
                        - type: object
                          properties:
                            correlation_id:
                              type: string
                              pattern: ^op_[A-Za-z0-9_-]{43}$
                            type:
                              type: string
                              const: deposit
                            status:
                              type: string
                              enum:
                                - PROVEN
                                - PENDING
                                - UNLOGGED
                            details:
                              type: object
                              properties:
                                origin_asset:
                                  type: string
                                destination_asset:
                                  type: string
                                amount:
                                  type: string
                                confidential:
                                  type: boolean
                                deposited_amount:
                                  type: string
                                amount_out:
                                  type: string
                                deposit_address:
                                  type: string
                                deposit_tx_hash:
                                  type: string
                                settled_at:
                                  type: string
                                usd_value:
                                  type: string
                                  pattern: ^[0-9]{1,24}\.[0-9]{6}$
                                note:
                                  type: string
                                  pattern: ^[^\p{Cc}\p{Cs}\p{Zl}\p{Zp}]{1,500}$
                                grant_id:
                                  type: string
                                policy_epoch:
                                  type: string
                                  pattern: ^(0|[1-9][0-9]{0,19})$
                                intent_hash:
                                  type: string
                                transfer_intent_hash:
                                  type: string
                                tx_hash:
                                  type: string
                                destination_tx_hash:
                                  type: string
                                settlement_tx_hash:
                                  type: string
                                receipt_hash:
                                  type: string
                              required:
                                - origin_asset
                                - confidential
                                - settled_at
                              additionalProperties: false
                            receipt:
                              anyOf:
                                - type: object
                                  properties:
                                    version:
                                      type: number
                                      const: 1
                                    origin:
                                      type: string
                                    leaf_index:
                                      type: string
                                      pattern: ^(0|[1-9][0-9]{0,19})$
                                    opening:
                                      type: string
                                    terms:
                                      type: string
                                  required:
                                    - version
                                    - origin
                                    - leaf_index
                                    - opening
                                    - terms
                                  additionalProperties: false
                                - type: 'null'
                          required:
                            - correlation_id
                            - type
                            - status
                            - details
                            - receipt
                          additionalProperties: false
                  next_cursor:
                    type:
                      - string
                      - 'null'
                required:
                  - data
                  - next_cursor
                additionalProperties: false
        '400':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '401':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '403':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '404':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '409':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '410':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '429':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '502':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '503':
          description: 'Error document. Documented codes: `transparency_log_disabled`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
      security:
        - ApiKey: []
components:
  schemas:
    ErrorDocument:
      type: object
      properties:
        errors:
          minItems: 1
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                pattern: ^[1-5][0-9]{2}$
              code:
                type: string
                pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$
              layer:
                type: string
                enum:
                  - request
                  - auth
                  - grant
                  - policy
                  - budget
                  - balance
                  - provider
                  - api
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
                required:
                  - pointer
                additionalProperties: false
              meta:
                type: object
                properties:
                  retryable:
                    type: boolean
                  available_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  min_amount:
                    type: string
                    pattern: ^[0-9]{1,78}$
                  available_amount:
                    type: string
                    pattern: ^[0-9]{1,78}$
                required:
                  - retryable
                additionalProperties: false
            required:
              - status
              - code
              - layer
              - title
            additionalProperties: false
        meta:
          type: object
          properties:
            request_id:
              type: string
          additionalProperties: false
      required:
        - errors
        - meta
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.