# LI.FI — Get gas price for the specified chainId

Get LI.FI Chain Gas Price data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Lifi, configure supported query parameters and filters, and retrieve structured data including standard gas price tier, fast gas price tier, fastest gas price tier, and provider rate update timestamp to display rate tiers, and separate rate and total cost.

Documentation: https://openany.si/lifi/lifi-li-fi-get-gas-price-for-the-specified-chainid/15c796b5-eb9e-4fd9-9627-53bc80cfdb05/
API ID: 15c796b5-eb9e-4fd9-9627-53bc80cfdb05
Provider: lifi
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/lifi/v1/gas/prices/{chainId}
Page update time: 2026-12-03T02:43:34.301Z
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:43:32.794Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## LI.FI Chain Gas Price API

Provide chainId in the path. The response reports three rate tiers and lastUpdated for that chain.

## What You Can Build

- **Display rate tiers**: Label each tier with its chain context.
- **Separate rate and total cost**: Combine rates with an appropriate transaction gas estimate in your application.

## Returned Data

| Field | Meaning |
| --- | --- |
| `standard` | Standard gas price tier |
| `fast` | Fast gas price tier |
| `fastest` | Fastest gas price tier |
| `lastUpdated` | Provider rate update timestamp |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "LI.FI — Get gas price for the specified chainId 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": {
        "chainId": {
          "type": "string",
          "description": "ChaindId from which gas prices should be shown"
        }
      },
      "required": [
        "chainId"
      ]
    },
    "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": {
    "fast": {
      "type": "integer"
    },
    "fastest": {
      "type": "integer"
    },
    "lastUpdated": {
      "type": "integer"
    },
    "standard": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/lifi/v1/gas/prices/1' \
  -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
{
  "fast": 56309338,
  "fastest": 186614317,
  "lastUpdated": 1793258460,
  "standard": 47490151
}
```

## 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
### Which inputs are required?
chainId is a required path parameter.

### Is this a total transaction fee?
No. Gas price rates and total transaction cost are different quantities.

### Is lastUpdated the API call time?
It is the provider rate update timestamp; do not substitute the local request time.

### Is fastest a guaranteed inclusion time?
No. It is a reported price tier, not a confirmation-time guarantee.

### How do I identify each chain?
Keep the requested chainId with its rate result.

### Are network fees the OpenAny API call price?
No. Gas and transfer fee estimates describe the on-chain operation. Review the selected implementation pricing separately for the OpenAny request.

## Available implementations
- lifi: https://openany.si/lifi/lifi-li-fi-get-gas-price-for-the-specified-chainid/15c796b5-eb9e-4fd9-9627-53bc80cfdb05/

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