# DefiLlama — Get current prices of tokens by contract address

Get DefiLlama Current Token Prices data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by DeFiLlama, configure supported query parameters and filters, and retrieve structured data including coins, <coin>, token ticker symbol, confidence, and on-chain token decimal places for value multi-chain portfolios, price lp and vault positions, and validate quote quality.

Documentation: https://openany.si/defillama/defillama-get-current-prices-of-tokens-by-contract-address/6a38db65-63d2-4f30-8043-42cc6b0ebdd3/
API ID: 6a38db65-63d2-4f30-8043-42cc6b0ebdd3
Provider: defillama
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/defillama/prices/current/{coins}
Page update time: 2026-12-03T02:55:15.117Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:55:14.703Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## DefiLlama Current Token Prices API

Pass one or more comma-separated `{chain}:{address}` or `coingecko:{id}` identifiers in the `coins` path parameter. The response returns a `coins` map keyed by each matched identifier with price, symbol, timestamp, confidence and optional decimals.

## What You Can Build

- **Value multi-chain portfolios**: Batch contract addresses from Ethereum, BSC and other chains into one valuation call.
- **Price LP and vault positions**: Combine contract-level prices with on-chain balances to compute real-time USD NAV.
- **Validate quote quality**: Check the confidence score and timestamp before using a token price in automated workflows.

## Returned Data

| Field | Meaning |
| --- | --- |
| `coins` | Map of requested token identifiers to current price objects |
| `coins.<coin>` | Price record keyed by the {chain}:{address} or coingecko:{id} string |
| `coins.<coin>.price` | Current token price in USD |
| `coins.<coin>.symbol` | Token ticker symbol |
| `coins.<coin>.timestamp` | UNIX timestamp of the price observation |
| `coins.<coin>.confidence` | Confidence score reported for the price quote |
| `coins.<coin>.decimals` | On-chain token decimal places when available |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DefiLlama — Get current prices of tokens by contract address request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "coins": {
          "type": "string",
          "description": "set of comma-separated tokens defined as {chain}:{address}"
        }
      },
      "required": [
        "coins"
      ]
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "coins": {
      "type": "object",
      "properties": {
        "coingecko:ethereum": {
          "type": "object",
          "properties": {
            "confidence": {
              "type": "number"
            },
            "price": {
              "type": "number"
            },
            "symbol": {
              "type": "string"
            },
            "timestamp": {
              "type": "integer"
            }
          }
        },
        "ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8": {
          "type": "object",
          "properties": {
            "confidence": {
              "type": "number"
            },
            "decimals": {
              "type": "integer"
            },
            "price": {
              "type": "number"
            },
            "symbol": {
              "type": "string"
            },
            "timestamp": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Recorded upstream example (2026-11-18)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/defillama/prices/current/ethereum%3A0xdF574c24545E5FfEcb9a659c229253D4111d87e1%2Ccoingecko%3Aethereum%2Cbsc%3A0x762539b45a1dcce3d36d080f74d1aed37844b878%2Cethereum%3A0xdB25f211AB05b1c97D595516F45794528a807ad8' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "coins": {
    "coingecko:ethereum": {
      "confidence": 0.999,
      "price": 1794.751648,
      "symbol": "ETH",
      "timestamp": 1795008828
    },
    "ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8": {
      "confidence": 0.99,
      "decimals": 2,
      "price": 1.0954811194768705,
      "symbol": "EURS",
      "timestamp": 1795008180
    }
  }
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### How should token identifiers be formatted in coins?
Format each token as {chain}:{address} or coingecko:{id}, separated by commas in the coins path parameter.

### Can I query multiple tokens in one request?
Yes. Pass a comma-separated list of tokens in the coins path segment to retrieve all quotes in a single JSON map.

### Why is decimals present on some tokens and absent on others?
On-chain contract entries include decimals, while CoinGecko-keyed entries such as coingecko:ethereum omit decimals in the reference sample.

### What does the confidence field indicate?
It reports DefiLlama price confidence for the quote so callers can filter low-confidence feeds.

### How do I retrieve prices from a past timestamp instead?
Use the DefiLlama Historical Token Prices API with a UNIX timestamp path parameter.

### Does this endpoint return percentage price changes?
No. Use the DefiLlama Token Price Change API to query percentage change over a chosen period.

## Available implementations
- defillama: https://openany.si/defillama/defillama-get-current-prices-of-tokens-by-contract-address/6a38db65-63d2-4f30-8043-42cc6b0ebdd3/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
