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

# Arbitrage Developer Console Overview

> The Developer Console is your hub for creating API keys, tracking usage, and debugging requests — all from a single web interface.

The Arbitrage Developer Console is a web interface at [app.revalonlabs.xyz](https://app.revalonlabs.xyz) that gives you programmatic access to Arbitrage prediction market data. From the console you can generate API keys for your applications, monitor call volume and latency over time, and inspect individual request logs when something goes wrong. Authentication here is email and password — separate from the wallet-based sign-in used by the main Predexy app.

## What you can do

* **Create and revoke API keys** — generate keys with custom names, permission scopes, and rate limits. The full key is shown once at creation; after that only the first 12 characters are displayed.
* **View usage statistics** — see total calls, success and error counts, average latency, and P95 latency broken down by hour, day, or month.
* **Inspect raw request logs** — page through individual request records showing endpoint, method, status code, and response time.

<CardGroup cols={2}>
  <Card title="Managing API Keys" icon="key" href="/console/api-keys">
    Create, list, and revoke API keys for your applications.
  </Card>

  <Card title="Usage Analytics" icon="chart-bar" href="/console/usage-analytics">
    Monitor call volume, error rates, and latency for each key.
  </Card>
</CardGroup>

## Authentication

The Developer Console uses email and password authentication backed by JWT tokens. On successful login, the API sets two httpOnly cookies:

| Token         | Expiry     | Purpose                                   |
| ------------- | ---------- | ----------------------------------------- |
| `pdx_access`  | 15 minutes | Authenticates console API requests        |
| `pdx_refresh` | 7 days     | Issues new access tokens without re-login |

<Note>
  This is distinct from the SIWE (Sign-In With Ethereum) wallet authentication used by the main Predexy app. Console accounts are email-based only.
</Note>

### Register an account

You can register through the web UI or directly via the API:

```bash theme={null}
curl -X POST https://api.predexy.com/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@company.com",
    "password": "your-password",
    "name": "Your Name"
  }'
```

The response includes your user profile and JWT tokens. The password must be at least 8 characters.

### Log in

```bash theme={null}
curl -X POST https://api.predexy.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@company.com",
    "password": "your-password"
  }'
```

**Response:**

```json theme={null}
{
  "data": {
    "id": "usr_01hx...",
    "email": "you@company.com",
    "name": "Your Name"
  },
  "tokens": {
    "access_token": "eyJ...",
    "refresh_token": "eyJ..."
  }
}
```

Use the `access_token` value as your `Authorization: Bearer` header for all subsequent console API calls.

## Password reset

If you lose access to your account, the reset flow works in three steps:

<Steps>
  <Step title="Request an OTP">
    Send your email to trigger a 6-digit one-time password sent via email. The OTP expires in 10 minutes.

    ```bash theme={null}
    curl -X POST https://api.predexy.com/api/v1/auth/forgot-password \
      -H "Content-Type: application/json" \
      -d '{"email": "you@company.com"}'
    ```

    The endpoint always returns `200` — it does not reveal whether the email is registered.
  </Step>

  <Step title="Verify the OTP">
    Submit the 6-digit code to receive a short-lived reset token (valid for 5 minutes):

    ```bash theme={null}
    curl -X POST https://api.predexy.com/api/v1/auth/verify-otp \
      -H "Content-Type: application/json" \
      -d '{
        "email": "you@company.com",
        "otp": "482910"
      }'
    ```

    The response body contains a `reset_token` JWT you use in the next step.
  </Step>

  <Step title="Set a new password">
    Use the reset token to update your password. The token is single-use and invalidated after this call.

    ```bash theme={null}
    curl -X POST https://api.predexy.com/api/v1/auth/reset-password \
      -H "Content-Type: application/json" \
      -d '{
        "reset_token": "<token from previous step>",
        "password": "your-new-password"
      }'
    ```
  </Step>
</Steps>

## Getting started

<Steps>
  <Step title="Register or log in">
    Create an account at [app.revalonlabs.xyz](https://app.revalonlabs.xyz) or via `POST /api/v1/auth/register`. Log in to get your access token.
  </Step>

  <Step title="Create an API key">
    In the console, go to **API Keys** and click **New key**, or call `POST /api/v1/console/keys`. Copy the full key — it is shown only once.
  </Step>

  <Step title="Call external endpoints">
    Pass the key in the `X-API-Key` header on any `/api/v1/external/*` endpoint. See [Managing API Keys](/console/api-keys) for a full guide.
  </Step>

  <Step title="Monitor usage">
    Check [Usage Analytics](/console/usage-analytics) to track call volume, error rates, and latency over time.
  </Step>
</Steps>
