# Midgard

Midgard is a layer 2 REST API that provides front-end consumers with semi real-time rolled up data and analytics of the THORChain network. Most requests to the network will come through Midgard. This daemon is here to keep the chain itself from fielding large quantities of requests. You can think of it as a “read-only slave” to the chain. This keeps the resources of the network focused on processing transactions.

Midgard is heavily used in dashboards and transaction scanners like [Thorchain.net](https://thorchain.net/), [Thorchain.network](https://thorchain.network/) and [Runescan.io](https://runescan.io/). You find a full overview of the REST API endpoints on:

* <https://gateway.liquify.com/chain/thorchain_api/thorchain/doc>
* <https://gateway.liquify.com/chain/thorchain_midgard/v2/doc>

For more information see [Gitlab repo](https://gitlab.com/thorchain/midgard).

## Developer Integration

For comprehensive integration guides including:

* Complete REST API documentation
* WebSocket subscription endpoints
* Query optimization strategies
* Rate limiting and best practices
* Running your own Midgard instance

See the [THORChain Developer Documentation](https://dev.thorchain.org/)


---

# Agent Instructions: 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:

```
GET https://docs.thorchain.org/technical-documentation/technology/midgard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
