# Union Data

A Javascript package for fetching Union data from the graphQL endpoints.

## Quickstart

### Installation

```
npm install @unioncredit/data
```

### Example

```javascript
import { parseMemberApplications, config } from "@unioncredit/data";

// chain ID defaults to 1 but can be set to 1, 42, or 42161
const chainId = 1;
config.set("chainId", chainId);

async function fetcher() {
  const applications = await parseMemberApplications();
  const firstMemberAddress = applications[0].account;
  ...
} 
```

\_\_


---

# 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.union.finance/developers/union-data.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.
