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

# Reading on-chain Data

> Easily get data from our subgraph

## Reading blockchain data

Reading blockchain data is equally important as writing transactions to the chain.
That's why we're indexing all transactions conducted through the OPENFORMAT smart contracts.
These are accessible via a user-friendly GraphQL API, known as a Subgraph. To simplify the process,
we've established dedicated GET endpoints. These are specifically designed for retrieving Leaderboard data
for XP and on-chain profile information for individual users.

### Leaderboard

<CodeGroup>
  ```curl cURL theme={null}
  curl --request GET \
    --url https://api.openformat.tech/v1/leaderboard \
    --header 'X-API-KEY: <x-api-key>'
  ```

  ```json JSON Response theme={null}
  [
    {
      "user": "0x03755352654d73da06756077dd7f040adce3fd58",
      "xp_rewarded": "310"
    },
    {
      "user": "0x16bb52a951e3dd1d2cdb95b1a70c2b05ce1e4cee",
      "xp_rewarded": "110"
    },
    {
      "user": "0xb98492ec79fcc78cb584eafacee18d9a4cdc3424",
      "xp_rewarded": "60"
    },
    {
      "user": "0x7d92949b4dace9aee85ecd7d362b3a8ffc40e00a",
      "xp_rewarded": "30"
    }
  ]
  ```
</CodeGroup>

### Profile

<CodeGroup>
  ```curl cURL theme={null}
  curl --request GET \
    --url https://api.openformat.tech/v1/profile \
    --header 'X-API-KEY: <x-api-key>'
  ```

  ```json JSON Response theme={null}
  {
    "eth_address": "0x03755352654D73DA06756077Dd7f040ADcE3Fd58",
    "xp_balance": "171",
    "reward_token_balance": "992",
    "completed_missions": [
      {
        "id": "0xc29f7758b99623ea83073cd04f907d9a62d98f10964275bdb8ec7d9999f2657f-0x746573745f6d697373696f6e0000000000000000000000000000000000000000",
        "metadata": {
          "name": "test_mission"
        },
        "tokens": [
          {
            "token": {
              "id": "0x174c1ce92020de916c864159cf661e9dfcd5a8fb",
              "name": "SPECIAL"
            },
            "amount_rewarded": "5000000000000000000"
          }
        ],
        "badges": [],
        "createdAt": "1703776269",
        "xp_rewarded": "0"
      }
    ],
    "completed_actions": [
      {
        "id": "0xdbd31989bb92b7154e38309cd60cda2d9dd0640136d6d7282ad4bd912dfc026a-0x1",
        "metadata": {
          "name": "banana"
        },
        "xp_rewarded": "5000000000000000000",
        "createdAt": "1706292958"
      },
      {
        "id": "0xb375f0f6f05c484969900fd8296d8aa0995de4988adf57564ce7696862964df6-0x17",
        "metadata": {
          "name": "banana"
        },
        "xp_rewarded": "5000000000000000000",
        "createdAt": "1706291664"
      }
    ]
  }
  ```
</CodeGroup>

### Data Transparency

Data transparency is a key priority for us and a major reason behind our adoption of blockchain technology.
Our software is open-source, and we're committed to utilising as much open-source software as possible.
Our entire stack is accessible on Github. For a deeper understanding of how we store and manage on-chain data,
we recommend exploring our [smart contracts](), [API](), and [graph-node]().
