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

# Quickstart

> Get started with the Futarchy DEX API in under 5 minutes

## Installation

<Steps>
  <Step title="Clone the Repository">
    ```bash theme={null}
    git clone https://github.com/metaDAOproject/futarchy-coingecko-api.git
    cd futarchy-coingecko-api
    ```
  </Step>

  <Step title="Install Dependencies">
    This project uses Bun for superior performance:

    ```bash theme={null}
    bun install
    ```
  </Step>

  <Step title="Configure Environment">
    Create a `.env` file based on the example:

    ```bash theme={null}
    cp example.env .env
    ```

    Edit `.env` with your configuration:

    ```env theme={null}
    SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
    SOLANA_WS_URL=wss://api.mainnet-beta.solana.com
    PORT=3000
    DEX_FORK_TYPE=Custom
    FACTORY_ADDRESS=YOUR_FACTORY_PROGRAM_ID
    ROUTER_ADDRESS=YOUR_ROUTER_PROGRAM_ID
    PROTOCOL_FEE_RATE=0.0025
    ```
  </Step>

  <Step title="Build and Start">
    ```bash theme={null}
    bun run build
    bun start
    ```

    For development with hot reload:

    ```bash theme={null}
    bun run dev
    ```
  </Step>
</Steps>

## Make Your First Request

You can use the live API directly or run your own instance locally.

### Using the Live API

The public API is available at `https://market-api.metadao.fi`:

```bash theme={null}
curl https://market-api.metadao.fi/
```

This returns API information including version, available endpoints, and DEX configuration.

### Get Ticker Data

Retrieve all DAO tickers with pricing and volume information:

<CodeGroup>
  ```bash cURL theme={null}
  curl https://market-api.metadao.fi/api/tickers
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://market-api.metadao.fi/api/tickers');
  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get('https://market-api.metadao.fi/api/tickers')
  data = response.json()
  print(data)
  ```
</CodeGroup>

### Local Development

If running locally, replace `https://market-api.metadao.fi` with `http://localhost:3000` in the examples above.

## Example Response

```json theme={null}
[
  {
    "ticker_id": "ZKFHiLAfAFMTcDAuCtjNW54VzpERvoe7PBF9mYgmeta_EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "base_currency": "ZKFHiLAfAFMTcDAuCtjNW54VzpERvoe7PBF9mYgmeta",
    "target_currency": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "base_symbol": "ZKFG",
    "base_name": "ZKFG",
    "target_symbol": "USDC",
    "target_name": "USD Coin",
    "pool_id": "5FPGRzY9ArJFwY2Hp2y2eqMzVewyWCBox7esmpuZfCvE",
    "last_price": "0.081340728222",
    "base_volume": "30024.81040000",
    "target_volume": "2441.23456789",
    "liquidity_in_usd": "180138.45",
    "bid": "0.080934024581",
    "ask": "0.081747431863"
  }
]
```

## Health Check

Verify the API is running properly:

```bash theme={null}
curl https://market-api.metadao.fi/health
```

Response:

```json theme={null}
{
  "status": "healthy",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "uptime": 3600.5
}
```

<Check>
  **Success!** Your API is now running and ready to serve data.
</Check>

## Next Steps

<CardGroup cols={2}>
  <Card title="Configuration Guide" icon="gear" href="/configuration">
    Learn about all configuration options
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/tickers">
    Explore the tickers endpoint
  </Card>

  <Card title="Understand Pricing" icon="calculator" href="/concepts/pricing-methodology">
    Learn how prices are calculated
  </Card>

  <Card title="Error Handling" icon="exclamation-triangle" href="/advanced/error-handling">
    Learn how to handle errors
  </Card>
</CardGroup>
