Token API Quickstart
This quickstart shows how to make a first Token API request over HTTPS using JSON-RPC 2.0.
Prerequisites
Before you start, make sure you have:
- A W3api project with Advanced API access.
- A project API key copied from the W3api platform.
- A terminal with
curl.
Keep your API key private. Do not commit it to source control or expose it in frontend code.
Set Your Endpoint
Token API requests use the Advanced API multichain endpoint:
Replace <apiKey> with your project API key. In the examples below, store the full URL as YOUR_ADVANCED_API_ENDPOINT.
Make a Request with curl
Use ankr_getTokenPrice to request the current price for the ANKR token on Ethereum:
A successful response returns a JSON-RPC result object with token price data: