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

# checkApprove

> Learn how to use the checkApprove JSON-RPC method.

# Contextualizing `checkApprove`

* `checkApprove` returns a Boolean based upon whether a given address has approved spending of a specified amount for a particular ERC-20 token. It takes:
  * `address` - string.
  * Token object, containing:
    * `tokenAddress` - string.
    * `amount` - string.

***

## Query example

```json JSON theme={null}
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "particle_swap_checkApprove",
  "params": [
    "0x369aa8a7a7BE683E1a46d9A056806B2B3FD778C8", // wallet address
    {
      "tokenAddress": "0x111111111117dc0aa78b770fa6a738034120c302", // from token address
      "amount": "1000000000"
    }
  ]
}
```


## OpenAPI

````yaml openapi-swap POST /#particle_swap_checkApprove
openapi: 3.0.0
info:
  title: Particle Network Enhanced RPC Swap
  version: 1.0.0
servers:
  - url: https://rpc.particle.network/evm-chain
security:
  - basicAuth: []
paths:
  /#particle_swap_checkApprove:
    post:
      summary: checkApprove
      operationId: checkApprove
      requestBody:
        description: Request to check if a token is approved for swapping.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckApproveRequest'
      responses:
        '200':
          description: Successful response with approval status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckApproveResponse'
      security:
        - basicAuth: []
components:
  schemas:
    CheckApproveRequest:
      allOf:
        - $ref: '#/components/schemas/RPCRequest'
        - type: object
          properties:
            method:
              enum:
                - particle_swap_checkApprove
            params:
              type: array
              description: Parameters for checking token approval.
              items:
                oneOf:
                  - type: string
                    description: User address.
                    example: '0x369aa8a7a7BE683E1a46d9A056806B2B3FD778C8'
                  - type: object
                    description: Token approval details.
                    properties:
                      tokenAddress:
                        type: string
                        description: Token contract address.
                        example: '0x111111111117dc0aa78b770fa6a738034120c302'
                      amount:
                        type: string
                        description: Amount to be approved.
                        example: '1000000000'
    CheckApproveResponse:
      allOf:
        - $ref: '#/components/schemas/RPCResponse'
        - type: object
          properties:
            result:
              type: object
              description: Approval status and transaction details.
              properties:
                approved:
                  type: boolean
                  description: Approval status.
                tx:
                  type: object
                  description: Transaction details.
                  properties:
                    to:
                      type: string
                      description: Recipient address.
                      example: '0x111111111117dC0aa78b770fA6A738034120C302'
                    data:
                      type: string
                      description: Transaction data.
                      example: >-
                        0x095ea7b30000000000000000000000001111111254fb6c44bac0bed2854e76f90643097d000000000000000000000000000000000000000000000000000000003b9aca00
                    value:
                      type: string
                      description: Transaction value.
                      example: '0x0'
    RPCRequest:
      type: object
      required:
        - jsonrpc
        - id
        - method
        - params
      properties:
        jsonrpc:
          type: string
          default: '2.0'
          description: Version of the JSON-RPC protocol, should be 2.0.
          example: '2.0'
        id:
          type: integer
          default: 1
          description: The request identifier.
          example: 1
        method:
          type: string
          description: API method being called.
        params:
          type: array
          description: Parameters for the API method call.
        chainId:
          type: integer
          description: The blockchain chain ID.
          example: 1
    RPCResponse:
      type: object
      required:
        - jsonrpc
        - id
        - result
      properties:
        jsonrpc:
          type: string
          default: '2.0'
          description: Version of the JSON-RPC protocol, should be 2.0.
          example: '2.0'
        id:
          type: integer
          default: 1
          description: The request identifier.
          example: 1
        result:
          anyOf:
            - $ref: '#/components/schemas/AnyValue'
        chainId:
          type: integer
          description: The blockchain chain ID.
          example: 1
    AnyValue:
      anyOf:
        - type: string
        - type: number
        - type: integer
        - type: boolean
        - type: object
        - type: array
          items: {}
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````