> ## 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.

# getTokens

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

# Contextualizing `getTokens`

* `getTokens`, as an alternative to `getTokensAndNFTs`, returns an object with detailed information regarding the various ERC-20 tokens owned by a given address. It takes:
  * `Address` - string.
  * `Token addresses` - (optional), an array of strings.

***

## Query example

```javascript JavaScript theme={null}
const axios = require('axios');

(async () => {
    const response = await axios.post('https://rpc.particle.network/evm-chain', {
        chainId: 1,
        jsonrpc: '2.0',
        id: 1,
        method: 'particle_getTokens',
        params: ['0x329a7f8b91Ce7479035cb1B5D62AB41845830Ce8'],
    }, {
        auth: {
            username: 'Your Project Id',
            password: 'Your Project Server Key',
        }
    });

    console.log(response.data);
})();
```


## OpenAPI

````yaml openapi-evm POST /#particle_getTokens
openapi: 3.0.0
info:
  title: Particle Network Enhanced RPC
  version: 1.0.0
servers:
  - url: https://rpc.particle.network/evm-chain
security: []
paths:
  /#particle_getTokens:
    post:
      summary: getTokens
      operationId: getTokens
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTokensRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTokensResponse'
      security:
        - basicAuth: []
components:
  schemas:
    GetTokensRequest:
      allOf:
        - $ref: '#/components/schemas/RPCRequest'
        - type: object
          properties:
            method:
              enum:
                - particle_getTokens
            params:
              type: array
              items: {}
    GetTokensResponse:
      allOf:
        - $ref: '#/components/schemas/RPCResponse'
        - type: object
          properties:
            result:
              type: object
              required:
                - native
                - tokens
              properties:
                native:
                  type: string
                  description: Native token balance.
                tokens:
                  type: array
                  description: Array of tokens.
                  items:
                    type: object
                    properties:
                      decimals:
                        type: integer
                        description: Number of decimals for the token.
                      amount:
                        type: string
                        description: Amount of tokens.
                      address:
                        type: string
                        description: Token contract address.
                      name:
                        type: string
                        description: Name of the token.
                      symbol:
                        type: string
                        description: Symbol of the token.
                      image:
                        type: string
                        description: Image URL of the token.
    RPCRequest:
      type: object
      required:
        - jsonrpc
        - id
        - method
        - params
        - chainId
      properties:
        jsonrpc:
          type: string
          default: 2
          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.
        chainId:
          type: integer
          example: 1
          description: The chain ID.
        params:
          type: array
          description: Parameters for the API method call.
    RPCResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Version of the JSON-RPC protocol, should be 2.0.
          example: '2.0'
        id:
          type: integer
          description: The request identifier.
          example: 1
        result:
          anyOf:
            - $ref: '#/components/schemas/AnyValue'
    AnyValue:
      anyOf:
        - type: string
        - type: number
        - type: integer
        - type: boolean
        - type: object
        - type: array
          items: {}
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````