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

# API Reference

> Wallbit Public API documentation

## Welcome to the Wallbit API

Wallbit is a global neobank and **the world's first to offer a public API** for complete programmatic control of your account. Access your US account balances, manage investments in ETFs, stocks and bonds, view transaction history, execute trades, and manage crypto wallets. All through code.

<Card title="OpenAPI Specification" icon="code" href="/api-reference/openapi.json">
  View the complete OpenAPI specification file
</Card>

## Base URL

All API requests should be made to:

```
https://api.wallbit.io
```

## Authentication

All API endpoints require authentication using an API Key. Include your API key in the `X-API-Key` header with every request.

```bash theme={null}
curl -X GET "https://api.wallbit.io/api/public/v1/balance/checking" \
  -H "X-API-Key: your_api_key_here"
```

<Warning>
  Never share your API key or commit it to version control. Keep it secure and
  rotate it regularly.
</Warning>

### Getting your API Key

1. Log in to your Wallbit account (in the app or in the [Wallbit Dashboard](https://developer.wallbit.io/dashboard))
2. Navigate to **Settings → API Keys**
3. Create a new API key with the appropriate permissions

### Permissions

API keys can have different permission levels:

| Permission | Description                                                                             |
| ---------- | --------------------------------------------------------------------------------------- |
| `read`     | Read account balances, transactions, assets, fiat exchange rates, and fee configuration |
| `trade`    | Execute buy/sell trades                                                                 |

## Rate Limiting

The API implements rate limiting to ensure fair usage. When you exceed the rate limit, you'll receive a `429 Too Many Requests` response.

| Header                  | Description                           |
| ----------------------- | ------------------------------------- |
| `X-RateLimit-Limit`     | Total requests allowed per minute     |
| `X-RateLimit-Remaining` | Requests remaining in current window  |
| `X-RateLimit-Reset`     | Unix timestamp when rate limit resets |
| `Retry-After`           | Seconds to wait before retrying       |

## Error Handling

The API uses standard HTTP status codes to indicate success or failure:

| Code  | Description                                            |
| ----- | ------------------------------------------------------ |
| `200` | Success                                                |
| `400` | Bad request - Invalid parameters                       |
| `401` | Unauthorized - Missing or invalid API key              |
| `403` | Forbidden - Insufficient permissions                   |
| `404` | Not found - Resource doesn't exist                     |
| `412` | Precondition failed - KYC incomplete or account locked |
| `422` | Validation error - Invalid data                        |
| `429` | Too many requests - Rate limit exceeded                |
| `500` | Server error                                           |

## Available Endpoints

<CardGroup cols={2}>
  <Card title="Balance" icon="wallet" href="/api-reference/balance/checking">
    Query checking and investment account balances
  </Card>

  <Card title="Transactions" icon="receipt" href="/api-reference/transactions/list">
    View transaction history with filters
  </Card>

  <Card title="Trades" icon="chart-line" href="/api-reference/trades/create">
    Execute buy and sell orders for stocks
  </Card>

  <Card title="Fees" icon="percent" href="/api-reference/fees/get">
    Stock trading fees by subscription tier
  </Card>

  <Card title="Account Details" icon="building-columns" href="/api-reference/account-details/get">
    Get bank account details for deposits
  </Card>

  <Card title="Wallets" icon="coins" href="/api-reference/wallets/get">
    Retrieve crypto wallet addresses
  </Card>

  <Card title="Rates" icon="arrow-right-arrow-left" href="/api-reference/rates/get">
    Fiat exchange rates between currency pairs
  </Card>

  <Card title="Assets" icon="chart-pie" href="/api-reference/assets/list">
    Browse available stocks and ETFs
  </Card>

  <Card title="Operations" icon="right-left" href="/api-reference/operations/internal">
    Move funds between checking and investment accounts
  </Card>

  <Card title="Cards" icon="credit-card" href="/api-reference/cards/list">
    List cards and update card status
  </Card>

  <Card title="API Key" icon="key" href="/api-reference/api-key/revoke">
    Revoke the current API key
  </Card>
</CardGroup>
