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

# enhancedGetPrice

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

## Understanding `enhancedGetPrice`

* `enhancedGetPrice` retrieves the real-time price (fiat exchange rate) of a Solana token (SPL token). It takes:
  * `address` - array of strings. This represents the SPL token address; for \$SOL, you can use the string `native`.
  * `currencies` - array of strings. It can contain `usd` and `cny`.

***

## Query example

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

(async () => {
    const response = await axios.post('https://rpc.particle.network/solana', {
        chainId: 103,
        jsonrpc: '2.0',
        id: 0,
        method: 'enhancedGetPrice',
        params: [
            [
                'native', 
                '2Dzzc14S1D7cEFGJyMZMACuoQRHVUYFhVE74C5o8Fwau',
            ],
            [
                'usd', 
                'cny',
            ],
        ],
    }, {
        auth: {
            username: 'Your Project Id',
            password: 'Your Project Server Key',
        },
    });

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


## OpenAPI

````yaml openapi-solana POST /#enhancedGetPrice
openapi: 3.0.0
info:
  title: Particle Network Enhanced RPC Solana
  version: 1.0.0
servers:
  - url: https://rpc.particle.network/solana
security:
  - basicAuth: []
paths:
  /#enhancedGetPrice:
    post:
      summary: enhancedGetPrice
      operationId: enhancedGetPrice
      requestBody:
        description: Request to get the price of a token.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnhancedGetPriceRequest'
      responses:
        '200':
          description: Successful response with token price information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnhancedGetPriceResponse'
      security:
        - basicAuth: []
components:
  schemas:
    EnhancedGetPriceRequest:
      allOf:
        - $ref: '#/components/schemas/RPCRequest'
        - type: object
          properties:
            method:
              enum:
                - enhancedGetPrice
            params:
              type: array
              description: Parameters for getting token price.
              items:
                type: array
                items:
                  type: string
                  description: Token address.
    EnhancedGetPriceResponse:
      allOf:
        - $ref: '#/components/schemas/RPCResponse'
        - type: object
          properties:
            result:
              type: array
              description: Array of price details for tokens.
              items:
                type: object
                properties:
                  address:
                    type: string
                    description: Token address.
                  currencies:
                    type: array
                    description: Array of currency details.
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: Currency type.
                        price:
                          type: number
                          description: Token price.
                        marketCap:
                          type: number
                          description: Market capitalization.
                        24hChange:
                          type: number
                          description: 24-hour price change percentage.
                        24hVol:
                          type: number
                          description: 24-hour trading volume.
                        lastUpdatedAt:
                          type: integer
                          description: Last updated timestamp.
    RPCRequest:
      type: object
      required:
        - jsonrpc
        - id
        - method
        - params
        - chainId
      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
        chainId:
          type: integer
          description: The blockchain chain ID.
          example: 101
        method:
          type: string
          description: API method being called.
        params:
          type: array
          description: Parameters for the API method call.
    RPCResponse:
      type: object
      required:
        - jsonrpc
        - id
        - result
        - chainId
      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
        chainId:
          type: integer
          description: The blockchain chain ID.
          example: 101
        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

````