Skip to main content
POST
enhancedGetPrice

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

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Request to get the price of a token.

jsonrpc
string
default:2.0
required

Version of the JSON-RPC protocol, should be 2.0.

Example:

"2.0"

id
integer
default:1
required

The request identifier.

Example:

1

chainId
integer
required

The blockchain chain ID.

Example:

101

method
enum<string>
required

API method being called.

Available options:
enhancedGetPrice
params
string[][]
required

Parameters for getting token price.

Token address.

Response

200 - application/json

Successful response with token price information.

jsonrpc
string
default:2.0
required

Version of the JSON-RPC protocol, should be 2.0.

Example:

"2.0"

id
integer
default:1
required

The request identifier.

Example:

1

chainId
integer
required

The blockchain chain ID.

Example:

101

result
object[]
required

Array of price details for tokens.