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

# API Overview

> Programmatically check stock, buy accounts, and manage orders

The MOG Alts API lets you automate purchases and query your account from any HTTP client.

## Base URL

```
https://mogalts.win/v1
```

## Quick Reference

<CardGroup cols={2}>
  <Card title="Format" icon="code">
    JSON over HTTPS
  </Card>

  <Card title="Auth" icon="key">
    `X-API-Key` header
  </Card>

  <Card title="Rate Limit" icon="gauge">
    200 requests/minute
  </Card>

  <Card title="Get Your Key" icon="user" href="https://mogalts.win/dashboard/api">
    Dashboard → API Key
  </Card>
</CardGroup>

## Endpoints

| Method | Endpoint               | Description                 |
| ------ | ---------------------- | --------------------------- |
| `GET`  | `/v1/stock`            | Get stock counts and prices |
| `GET`  | `/v1/balance`          | Get your credit balance     |
| `GET`  | `/v1/orders`           | List your order history     |
| `POST` | `/v1/buy`              | Purchase accounts           |
| `POST` | `/v1/replace/:orderId` | Request a replacement       |
| `POST` | `/v1/generate`         | Generate Bedrock accounts   |

## Quick Start

```bash theme={null}
# Check your balance
curl https://mogalts.win/v1/balance \
  -H "X-API-Key: mog_your_key_here"

# Buy 1 account
curl -X POST https://mogalts.win/v1/buy \
  -H "X-API-Key: mog_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"category":"Hypixel Unbanned","amount":1}'
```
