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

# Environment Setup

## Environment Setup

### Overview

This guide explains how to set up your environment for accessing the Noodles API. It includes details on the available environments

### API Environments

The Noodles API is available in two environments:

| Environment    | Base URL                 |
| -------------- | ------------------------ |
| **Production** | `https://api.noodles.fi` |

### Obtaining an API Key

An API key is required to authenticate, access and rate limit the API.

#### Steps to Get an API Key:

1. **How to get API Key**:
   * Visit our dashboard at <https://dashboard.noodles.fi>, log in or sign up for an account.
   * After logging in, navigate to the API Keys section and generate a new API key.
   * If you encounter any issues, contact us via telegram: [@hiephho](https://t.me/hiephho)
2. **Use the API Key**:
   * Include the API key in the `x-api-key` header when making requests.

#### Example Usage

```sh
curl --location 'https://api.noodles.fi/api/v1/partner/ohlcv' \
--header 'Accept-Encoding: application/json' \
--header 'x-api-key: YOUR_API_KEY'
```

## API Error Responses

Standard error responses for all API endpoints:

### Invalid Parameters

**Status Code:** `400 Bad Request`

```json
{
    "code": 400,
    "message": "invalid pool address",
    "data": null
}
```

### Unauthorized

**Status Code:** `401 Unauthorized`

```json
{
    "code": 401,
    "message": "Invalid API Key",
    "data": null
}
```

### Rate Limited

**Status Code:** `429 Too Many Requests`

```json
{
    "code": 429,
    "message": "rate limit exceeded",
    "data": null
}
```

### Internal server error

**Status Code:** `500 Internal Server Error`

```json
{
    "code": 500,
    "message": "internal server error",
    "data": null
}
```

***

### Request to subscribe a higher tier plan

\*\* Status Code:\*\* `403 Forbidden`

```json
{
    "code": 403,
    "message": "Access denied. This endpoint requires a higher subscription tier.",
    "data": null
}
```

You can check list of api endpoints available for each subscription tier here: [List API Endpoints](/docs.noodles.fi/environment-setup/api-endpoints.md)

### Notes

* Keep your API key secure and do not share it.
* Only use `YOUR_API_KEY` on backend server side.
* Contact support if you need help with API key generation.

***

> **See also:** [List API Endpoints](/docs.noodles.fi/environment-setup/api-endpoints.md)


---

# 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://noodles-finance.gitbook.io/docs.noodles.fi/environment-setup/environment.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.
