> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.galleon8.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.galleon8.com/_mcp/server.

# ankr_getTokenPrice

POST https://advanced-api-docs-proxy.galleon8.workers.dev
Content-Type: application/json

Retrieves the USD price of the specified token.

Reference: https://docs.galleon8.com/api-reference/advanced-api/api-endpoints/token-api/ankr-get-token-price

## Request

### Body (application/json)

This endpoint expects an object.

- `blockchain` (enum, required) — Name of the blockchain.
  - Allowed values: `arbitrum`, `avalanche`, `avalanche_fuji`, `bsc`, `eth`, `eth_goerli`, `fantom`, `optimism`, `polygon`, `polygon_mumbai`, `polygon_zkevm`, `syscoin`
- `contractAddress` (string, optional) — Address of the token contract.

## Response

### 200

Result returned by ankr_getTokenPrice.

- `blockchain` (enum, required) — Supported blockchain identifier.
  - Allowed values: `arbitrum`, `avalanche`, `avalanche_fuji`, `bsc`, `eth`, `eth_goerli`, `fantom`, `optimism`, `polygon`, `polygon_mumbai`, `polygon_zkevm`, `syscoin`
- `usdPrice` (string, required) — Current token price calculated by Ankr, in US dollars.
- `contractAddress` (string, optional) — Blockchain address, ENS name, or contract address where supported.

## Examples

### ankr_getTokenPrice_ankr_token_price

**Request**

```json
[
  "eth",
  "0x990f341946a3fdb507ae7e52d17851b87168017c"
]
```

**Response**

```json
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "blockchain": "eth",
    "contractAddress": "0x8290333cef9e6d528dd5618fb97a76f268f3edd4",
    "usdPrice": "0.01661554527788047"
  }
}
```

**SDK Code**

```python ankr_getTokenPrice_ankr_token_price
import requests

url = "https://advanced-api-docs-proxy.galleon8.workers.dev/"

payload = ["eth", "0x990f341946a3fdb507ae7e52d17851b87168017c"]
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ankr_getTokenPrice_ankr_token_price
const url = 'https://advanced-api-docs-proxy.galleon8.workers.dev/';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '["eth","0x990f341946a3fdb507ae7e52d17851b87168017c"]'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ankr_getTokenPrice_ankr_token_price
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://advanced-api-docs-proxy.galleon8.workers.dev/"

	payload := strings.NewReader("[\n  \"eth\",\n  \"0x990f341946a3fdb507ae7e52d17851b87168017c\"\n]")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ankr_getTokenPrice_ankr_token_price
require 'uri'
require 'net/http'

url = URI("https://advanced-api-docs-proxy.galleon8.workers.dev/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n  \"eth\",\n  \"0x990f341946a3fdb507ae7e52d17851b87168017c\"\n]"

response = http.request(request)
puts response.read_body
```

```java ankr_getTokenPrice_ankr_token_price
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://advanced-api-docs-proxy.galleon8.workers.dev/")
  .header("Content-Type", "application/json")
  .body("[\n  \"eth\",\n  \"0x990f341946a3fdb507ae7e52d17851b87168017c\"\n]")
  .asString();
```

```php ankr_getTokenPrice_ankr_token_price
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://advanced-api-docs-proxy.galleon8.workers.dev/', [
  'body' => '[
  "eth",
  "0x990f341946a3fdb507ae7e52d17851b87168017c"
]',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp ankr_getTokenPrice_ankr_token_price
using RestSharp;

var client = new RestClient("https://advanced-api-docs-proxy.galleon8.workers.dev/");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  \"eth\",\n  \"0x990f341946a3fdb507ae7e52d17851b87168017c\"\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ankr_getTokenPrice_ankr_token_price
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["eth", "0x990f341946a3fdb507ae7e52d17851b87168017c"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://advanced-api-docs-proxy.galleon8.workers.dev/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### ankr_getTokenPrice_native_coin_price

**Request**

```json
[
  "polygon"
]
```

**Response**

```json
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "blockchain": "polygon",
    "contractAddress": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
    "usdPrice": "0.800681001477398625"
  }
}
```

**SDK Code**

```python ankr_getTokenPrice_native_coin_price
import requests

url = "https://advanced-api-docs-proxy.galleon8.workers.dev/"

payload = ["polygon"]
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ankr_getTokenPrice_native_coin_price
const url = 'https://advanced-api-docs-proxy.galleon8.workers.dev/';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '["polygon"]'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ankr_getTokenPrice_native_coin_price
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://advanced-api-docs-proxy.galleon8.workers.dev/"

	payload := strings.NewReader("[\n  \"polygon\"\n]")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ankr_getTokenPrice_native_coin_price
require 'uri'
require 'net/http'

url = URI("https://advanced-api-docs-proxy.galleon8.workers.dev/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n  \"polygon\"\n]"

response = http.request(request)
puts response.read_body
```

```java ankr_getTokenPrice_native_coin_price
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://advanced-api-docs-proxy.galleon8.workers.dev/")
  .header("Content-Type", "application/json")
  .body("[\n  \"polygon\"\n]")
  .asString();
```

```php ankr_getTokenPrice_native_coin_price
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://advanced-api-docs-proxy.galleon8.workers.dev/', [
  'body' => '[
  "polygon"
]',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp ankr_getTokenPrice_native_coin_price
using RestSharp;

var client = new RestClient("https://advanced-api-docs-proxy.galleon8.workers.dev/");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  \"polygon\"\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ankr_getTokenPrice_native_coin_price
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["polygon"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://advanced-api-docs-proxy.galleon8.workers.dev/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### ankr_getTokenPrice_usdt_price

**Request**

```json
[
  "eth",
  "0xdac17f958d2ee523a2206206994597c13d831ec7"
]
```

**Response**

```json
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "blockchain": "eth",
    "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "usdPrice": "1"
  }
}
```

**SDK Code**

```python ankr_getTokenPrice_usdt_price
import requests

url = "https://advanced-api-docs-proxy.galleon8.workers.dev/"

payload = ["eth", "0xdac17f958d2ee523a2206206994597c13d831ec7"]
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ankr_getTokenPrice_usdt_price
const url = 'https://advanced-api-docs-proxy.galleon8.workers.dev/';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '["eth","0xdac17f958d2ee523a2206206994597c13d831ec7"]'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ankr_getTokenPrice_usdt_price
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://advanced-api-docs-proxy.galleon8.workers.dev/"

	payload := strings.NewReader("[\n  \"eth\",\n  \"0xdac17f958d2ee523a2206206994597c13d831ec7\"\n]")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ankr_getTokenPrice_usdt_price
require 'uri'
require 'net/http'

url = URI("https://advanced-api-docs-proxy.galleon8.workers.dev/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n  \"eth\",\n  \"0xdac17f958d2ee523a2206206994597c13d831ec7\"\n]"

response = http.request(request)
puts response.read_body
```

```java ankr_getTokenPrice_usdt_price
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://advanced-api-docs-proxy.galleon8.workers.dev/")
  .header("Content-Type", "application/json")
  .body("[\n  \"eth\",\n  \"0xdac17f958d2ee523a2206206994597c13d831ec7\"\n]")
  .asString();
```

```php ankr_getTokenPrice_usdt_price
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://advanced-api-docs-proxy.galleon8.workers.dev/', [
  'body' => '[
  "eth",
  "0xdac17f958d2ee523a2206206994597c13d831ec7"
]',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp ankr_getTokenPrice_usdt_price
using RestSharp;

var client = new RestClient("https://advanced-api-docs-proxy.galleon8.workers.dev/");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  \"eth\",\n  \"0xdac17f958d2ee523a2206206994597c13d831ec7\"\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ankr_getTokenPrice_usdt_price
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["eth", "0xdac17f958d2ee523a2206206994597c13d831ec7"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://advanced-api-docs-proxy.galleon8.workers.dev/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```