> For the complete documentation index, see [llms.txt](https://svpchain.gitbook.io/svpchain-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://svpchain.gitbook.io/svpchain-docs/build/api-overview.md).

# API overview

How to talk to SVPChain programmatically — EVM JSON-RPC, WebSocket, and Cosmos REST/gRPC.

SVPChain exposes two parallel API surfaces because it has two execution layers.

| Surface           | Use for                                                                         | Default port (own node)               | Public endpoint                                          |
| ----------------- | ------------------------------------------------------------------------------- | ------------------------------------- | -------------------------------------------------------- |
| **EVM JSON-RPC**  | Solidity contracts, MetaMask, ethers/viem, indexers — the standard `eth_*` API. | `8545`                                | RPC URLs in [Networks](/svpchain-docs/chain/networks.md) |
| **EVM WebSocket** | Subscriptions: new heads, logs, pending tx.                                     | `8546` (mounted under `/ws` publicly) | WS URLs in [Networks](/svpchain-docs/chain/networks.md)  |
| **Cosmos REST**   | Staking, governance, bank, native CLOB module queries.                          | `1317`                                | TODO (no public REST gateway yet)                        |
| **Cosmos gRPC**   | Same as REST, lower-overhead binary protocol.                                   | `9090`                                | TODO                                                     |
| **CometBFT RPC**  | Block / consensus / mempool primitives, validator set, vote extensions.         | `26657`                               | TODO                                                     |

For application-layer integration (wallets, dApps, indexers) the EVM JSON-RPC and WebSocket are usually all you need. Reach for the Cosmos surfaces when you need staking, governance, or CLOB-module data that isn't reflected in EVM events.

### Choose your interface

<table data-view="cards"><thead><tr><th>Interface</th><th data-card-target data-type="content-ref">Docs</th></tr></thead><tbody><tr><td>EVM JSON-RPC — methods and examples</td><td><a href="/svpchain-docs/build/json-rpc.md">JSON-RPC</a></td></tr><tr><td>EVM WebSocket — subscriptions</td><td><a href="/svpchain-docs/build/websocket.md">WebSocket</a></td></tr><tr><td>Indexing patterns</td><td><a href="/svpchain-docs/build/indexing-and-events.md">Indexing &amp; events</a></td></tr></tbody></table>

### Auth and rate limits

Public RPC endpoints are open and require no authentication, but they are rate-limited and offered on a best-effort basis. For production traffic — sustained reads, indexing, market-making — [run your own node](/svpchain-docs/chain/run-a-node.md).

{% hint style="info" %}
If you're seeing intermittent `429` responses or dropped WebSocket connections from public endpoints, that's the rate limiter. Retry with backoff, or run your own node.
{% endhint %}

### Quick health check

```sh
# EVM JSON-RPC
curl -s -X POST https://svp-dataseeds-testnet.svpchain.org \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

# WebSocket — using websocat
echo '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
  | websocat wss://svp-dataseeds-testnet.svpchain.org/ws
```

Both should return a hex-encoded current block height.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://svpchain.gitbook.io/svpchain-docs/build/api-overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
