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

# Environment Setup

> Set up your development environment to build with Raze.bot APIs

## Prerequisites

Before you begin, ensure you have:

* Node.js 18+ or Python 3.8+
* A code editor (VS Code recommended)
* For Premium API: An API key from [raze.bot](https://raze.bot)

## Installation

<Tabs>
  <Tab title="Node.js">
    ```bash theme={null}
    npm install axios dotenv @solana/web3.js bs58
    ```
  </Tab>

  <Tab title="Python">
    ```bash theme={null}
    pip install requests python-dotenv solana base58
    ```
  </Tab>
</Tabs>

## Configuration

### For Premium API

Store your API key securely in environment variables:

```bash theme={null}
# .env file
RAZE_API_KEY=your_api_key_here
```

<Warning>
  Never commit your API key to version control. Add `.env` to your `.gitignore` file.
</Warning>

## Quick Examples

### Router V3 (Public API) - No API Key Required

<Tabs>
  <Tab title="Node.js">
    ```javascript theme={null}
    import axios from 'axios';

    // Buy tokens - no API key needed
    const response = await axios.post('https://router.raze.bot/swap/sol/buy', {
      walletAddresses: ['YOUR_WALLET_ADDRESS'],
      tokenAddress: 'TOKEN_MINT_ADDRESS',
      solAmount: 0.1
    });

    console.log(response.data.transactions);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    # Buy tokens - no API key needed
    response = requests.post('https://router.raze.bot/swap/sol/buy', json={
        'walletAddresses': ['YOUR_WALLET_ADDRESS'],
        'tokenAddress': 'TOKEN_MINT_ADDRESS',
        'solAmount': 0.1
    })

    print(response.json()['transactions'])
    ```
  </Tab>
</Tabs>

### Quote - API Key Required

<Tabs>
  <Tab title="Node.js">
    ```javascript theme={null}
    import axios from 'axios';

    // Get quote - API key required
    const mint = 'TOKEN_MINT_ADDRESS';
    const response = await axios.get(
      `https://router.raze.bot/swap/sol/quote/${mint}`, {
        headers: { 'Authorization': `Bearer ${process.env.RAZE_API_KEY}` }
      }
    );

    console.log(response.data.data.avgPrice);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    import requests

    # Get quote - API key required
    mint = 'TOKEN_MINT_ADDRESS'
    response = requests.get(
        f'https://router.raze.bot/swap/sol/quote/{mint}',
        headers={'Authorization': f'Bearer {os.environ["RAZE_API_KEY"]}'}
    )

    print(response.json()['data']['avgPrice'])
    ```
  </Tab>
</Tabs>

## Endpoints

Each API has a single global hostname; GeoDNS routes you to the nearest region automatically:

| API            | Base URL                  |
| :------------- | :------------------------ |
| Trading        | `https://router.raze.bot` |
| History        | `https://api.raze.bot`    |
| Solana RPC     | `https://rpc.raze.bot`    |
| Streaming (WS) | `wss://ws.raze.bot`       |
| gRPC           | `grpc.raze.bot:443`       |

## Next Steps

<CardGroup cols={2}>
  <Card title="Development Basics" icon="book" href="/get-started/development-basics">
    Learn API fundamentals
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/router/swap/buy">
    Explore all endpoints
  </Card>
</CardGroup>
