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

# Environment Variables

## Required Variables

### `NEXT_PUBLIC_HELIUS_API_KEY`

**Description:** Helius RPC API key for Solana blockchain access

**Where to get it:** <https://helius.dev> (free tier available)

**Example:**

```env
NEXT_PUBLIC_HELIUS_API_KEY=abc123-def456-ghi789
```

**Used For:**

* Future Solana wallet tracking features
* Currently optional, but recommended for full functionality

***

## Optional Variables

### `NEXT_PUBLIC_POLYMARKET_API_URL`

**Description:** Polymarket Gamma API base URL

**Default:** `https://gamma-api.polymarket.com`

**Example:**

```env
NEXT_PUBLIC_POLYMARKET_API_URL=https://gamma-api.polymarket.com
```

**When to change:** If Polymarket changes their API endpoint

***

## Example `.env.local`

```env
# Helius RPC
NEXT_PUBLIC_HELIUS_API_KEY=your_helius_api_key_here

# Polymarket API (optional, uses default)
NEXT_PUBLIC_POLYMARKET_API_URL=https://gamma-api.polymarket.com
```

***

## Security Notes

1. **`NEXT_PUBLIC_` prefix:**
   * Exposes variable to browser
   * Safe for public APIs (Helius key is public-facing)
2. **Never commit `.env.local`:**
   * Already in `.gitignore`
   * Use `.env.example` for templates
3. **Production:**
   * Set environment variables in Vercel/Railway dashboard
   * Never hardcode sensitive keys in code


---

# 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://polymarks.gitbook.io/polymarks-docs/deployment/env-vars.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.
