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

# Introduction

> Winnie API Documentation

# Introduction to Winnie API

The Winnie API is a JSON-RPC API that allows you to interact with the Winnie network.

## API URL

The base URL of the API is:

```
https://api.henlo-winnie.dev/{network}/{apiKey}
```

Where:

* `{network}` can be:
  * `mainnet` for the main network
  * `devnet` for the test network
* `{apiKey}` is your API key

## Authentication

All requests must include your API key in the URL.

## Request Format

Requests must be sent in JSON-RPC 2.0 format with the following fields:

* `jsonrpc`: "2.0"
* `method`: The name of the method to call
* `params`: An array containing the method parameters
* `id`: A unique identifier for the request

## Request Example

```bash theme={null}
curl --request POST \
  --url https://api.henlo-winnie.dev/mainnet/your-api-key \
  --header 'Content-Type: application/json' \
  --data '{
    "jsonrpc": "2.0",
    "method": "getBalance",
    "params": ["address"],
    "id": 1
  }'
```

## Responses

Responses are also in JSON-RPC 2.0 format with the following fields:

* `jsonrpc`: "2.0"
* `result`: The result of the method call (on success)
* `error`: An error object (on failure)
* `id`: The corresponding request identifier
