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

# API Introduction

> Getting started with the Bookie API

The Bookie API provides programmatic access to intent parsing, transaction building, and portfolio tracking. Built on REST principles with JSON request/response format.

## Base URL

```
https://api.pixiedefi.space/v1
```

## Authentication

All API requests require authentication via Bearer token:

```bash theme={null}
Authorization: Bearer bookie_live_abc123def456
```

## Request Format

```bash theme={null}
curl --request POST \
  --url https://api.pixiedefi.space/v1/intents \
  --header 'Authorization: Bearer bookie_live_abc123def456' \
  --header 'Content-Type: application/json' \
  --data '{
    "walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
    "command": "Swap 5 SOL for USDC"
  }'
```

## Response Format

All responses follow a consistent structure:

```json theme={null}
{
  "data": {},
  "meta": {
    "requestId": "req_abc123def456",
    "timestamp": "2024-03-08T14:30:00Z"
  }
}
```

## Error Responses

```json theme={null}
{
  "error": {
    "code": "validation_error",
    "message": "Invalid request parameters",
    "details": {
      "field": "walletAddress",
      "reason": "Invalid Solana address format"
    }
  },
  "meta": {
    "requestId": "req_abc123def456",
    "timestamp": "2024-03-08T14:30:00Z"
  }
}
```

## Rate Limits

| Tier       | Requests/min | Transactions/day |
| ---------- | ------------ | ---------------- |
| Free       | 30           | 100              |
| Pro        | 120          | 1,000            |
| Enterprise | 600          | Unlimited        |

Rate limit headers included in every response:

```
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1709913600
```

## Pagination

List endpoints support cursor-based pagination:

```bash theme={null}
GET /v1/transactions?limit=50&cursor=tx_abc123def456
```

Response includes pagination metadata:

```json theme={null}
{
  "data": [],
  "pagination": {
    "hasMore": true,
    "nextCursor": "tx_xyz789ghi012"
  }
}
```

## Versioning

The API is versioned via URL path. Current version: v1

Breaking changes will be released as new versions (v2, v3, etc.)

## SDKs

Official SDKs available:

* TypeScript/JavaScript: `npm install @bookie-network/sdk`
* Python: `pip install bookie-sdk`

<Note>
  API keys can be generated from the Developer Dashboard. Store keys securely and never expose them in client-side code.
</Note>
