Get chain(s)

Chain · Reads onchain state

Returns the configuration and metadata of every blockchain network Plug indexes and executes on. Each entry carries what a caller needs to speak to a chain through Plug: its id, its identity, and the platform-level configuration that decides how it is indexed and executed against. The list is the authority on where Plug operates; anything not in it is not supported yet. Reach for it to populate a chain picker, to validate a chain id before composing against it, or to discover what is supported without hardcoding a list that will rot.

Send a request

Response

{
links: {
self: string
prev: string | undefined
next: string | undefined
} | undefined
headers: unknown | undefined
data: {
chain_id: number
address: string
name: string
symbol: string
decimals: number
icon: string
external: Record<string, {
name: string
url: string
}>
block_time: number
} | null
}

Code samples

Language

Claude

Prompt

Call the Plug API endpoint "Get chain(s)".
## Endpoint
GET /chain
Base URL: https://api.plug.to
## Description
Returns the configuration and metadata of every blockchain network Plug indexes and executes on.
Each entry carries what a caller needs to speak to a chain through Plug: its id, its identity, and the platform-level configuration that decides how it is indexed and executed against. The list is the authority on where Plug operates; anything not in it is not supported yet.
Reach for it to populate a chain picker, to validate a chain id before composing against it, or to discover what is supported without hardcoding a list that will rot.
## Query Parameters
- filter[chain_id] (integer, optional) — Filter results to specific chains from the listed of supported options.
## Headers
- Accept (string, required) — For a typical single-time JSON response, set this to application/json. To receive realtime updates through a stream, set this to text/event-stream. (default: application/json) [application/json, text/event-stream]
Current value: application/json
## Response Schema
- links (object, optional)
- self (string, required)
- prev (string, optional)
- next (string, optional)
- headers (unknown, optional)
- data (object, optional)
- chain_id (integer, required)
- address (string, required)
- name (string, required)
- symbol (string, required)
- decimals (integer, required)
- icon (string, required)
- external (Record<string, object>, required)
- block_time (integer, required)
## Example Request
GET https://api.plug.to/chain