> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Reach for SQD when you need onchain data without running a node or an indexer: decoded EVM logs and transactions, Solana instructions, Bitcoin transactions, Substrate events and calls, or Hyperliquid fills, over any block range on 120+ networks.
> To query directly, POST to https://portal.sqd.dev/datasets/{dataset}/stream. The full API is described at https://docs.sqd.dev/openapi.json, and responses to the stream endpoints are JSON Lines.
> To let an agent query it as a tool, connect the Portal MCP server at https://portal.sqd.dev/mcp.
> Every page on this site is available as Markdown by appending .md to its URL.

# Enjin Relaychain

> Access Enjin Relaychain blockchain data through the Portal API.

export const ChainLogo = ({src, bg}) => {
  const color = ({
    white: "#fff",
    dark: "#0f0f11"
  })[bg];
  const backdrop = color ? `background-color:${color};padding:0.14em;` : "";
  return <style>{`#page-title{display:flex;align-items:center;gap:0.4em}#page-title::before{content:"";flex:none;width:1.1em;height:1.1em;border-radius:25%;background-image:url(${JSON.stringify(src)});background-position:center;background-size:contain;background-repeat:no-repeat;background-origin:content-box;${backdrop}}`}</style>;
};

<ChainLogo src="https://cdn.subsquid.io/img/networks/enjin.png" />

| Property | Value |
| - | - |
| Network ID | `enjin-relay` |
| Real-time | No |
| Pricing tier | [Partner](/en/portal/pricing#chain-tiers) |

## Endpoint

<Tabs>
  <Tab title="Portal (recommended)">
    ```
    https://portal.sqd.dev/datasets/enjin-relay
    ```
  </Tab>

  <Tab title="v2 archives (legacy)">
    <Warning>
      **API key required from May 19, 2026 12:00 UTC.** v2 archives will be sunset soon. [Migrate to Portal](/en/portal/migration), or attach an API key to keep using v2: see [Accessing SQD data with API keys](/en/data/api-keys). Cloud squids are not affected.
    </Warning>

    ```
    https://v2.archive.subsquid.io/network/enjin-relay
    ```
  </Tab>
</Tabs>

## Quick start

```bash theme={"system"}
curl --compressed -X POST \
  'https://portal.sqd.dev/datasets/enjin-relay/stream' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "substrate",
    "fromBlock": 0,
    "toBlock": 100,
    "fields": {
      "block": { "number": true, "timestamp": true },
      "event": { "name": true, "args": true }
    },
    "events": [{}]
  }'
```

For full SDK examples:

<CardGroup cols={2}>
  <Card title="Pipes SDK Quickstart" icon="text-align-start" href="/en/sdk/pipes-sdk/substrate/quickstart">
    Streaming pipeline indexer
  </Card>

  <Card title="Squid SDK Quickstart" icon="server" href="/en/sdk/squid-sdk/quickstart">
    GraphQL API indexer
  </Card>
</CardGroup>

## Schema

<AccordionGroup>
  <Accordion title="Blocks">
    | Field | Type | Description |
    | - | - | - |
    | `number` | integer | Block number |
    | `hash` | string | Block hash |
    | `parentHash` | string | Parent block hash |
    | `timestamp` | integer | Block timestamp |
    | `stateRoot` | string | State root hash |
    | `extrinsicsRoot` | string | Extrinsics root hash |
    | `specVersion` | integer | Runtime specification version |
  </Accordion>

  <Accordion title="Extrinsics">
    | Field | Type | Description |
    | - | - | - |
    | `index` | integer | Extrinsic index in block |
    | `hash` | string | Extrinsic hash |
    | `version` | integer | Extrinsic version |
    | `signature` | object | Signature information |
    | `success` | boolean | Whether extrinsic succeeded |
    | `error` | object | Error information if failed |
    | `fee` | string | Extrinsic fee as a decimal string |
  </Accordion>

  <Accordion title="Events">
    | Field | Type | Description |
    | - | - | - |
    | `index` | integer | Event index |
    | `phase` | string | ApplyExtrinsic, Finalization, Initialization |
    | `extrinsicIndex` | integer | Associated extrinsic index |
    | `name` | string | Event name |
    | `args` | object | Event arguments |
  </Accordion>

  <Accordion title="Calls">
    | Field | Type | Description |
    | - | - | - |
    | `name` | string | Call name (pallet.method) |
    | `args` | object | Call arguments |
    | `origin` | object | Call origin |
    | `success` | boolean | Whether call succeeded |
    | `error` | object | Error information if failed |
  </Accordion>
</AccordionGroup>

## Reference

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/en/api/substrate/finalized-stream">
    Field definitions and query syntax
  </Card>

  <Card title="Portal Migration" icon="arrow-right" href="/en/portal/migration">
    Migrate from v2 archives to Portal
  </Card>
</CardGroup>


## Related topics

- [Enjin Matrixchain](/en/data/substrate/enjin-matrix.md)
- [Enjin Canary Matrixchain](/en/data/substrate/enjin-canary-matrix.md)
- [Portal pricing](/en/portal/pricing.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.