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

# Test Authentication

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.strike.markets/test-auth" \
    -H "X-API-Key: stk_your_api_key_here"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "authenticated": true,
    "wallet_address": "0x742d35cc6c6c7532b1140da4c8a2f6c8ecfc9b46",
    "api_key_present": true,
    "api_key_type": "personal",
    "timestamp": "2024-01-15T16:30:00Z"
  }
  ```
</ResponseExample>

## Overview

Test authentication and API key validity. Useful for verifying your API key setup and debugging authentication issues.

## Authentication

Include your API key in the X-API-Key header:

```
X-API-Key: stk_your_api_key_here
```

For service keys, also include the wallet address:

```
X-API-Key: your_service_key
X-Wallet-Address: 0x742d35cc6c6c7532b1140da4c8a2f6c8ecfc9b46
```

## Response Fields

<ResponseField name="authenticated" type="boolean">
  Indicates if authentication was successful
</ResponseField>

<ResponseField name="wallet_address" type="string">
  The wallet address associated with the authenticated API key
</ResponseField>

<ResponseField name="api_key_present" type="boolean">
  Confirms an API key was provided in the request
</ResponseField>

<ResponseField name="api_key_type" type="string">
  Type of API key used: "personal" or "service"
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp of the authentication test
</ResponseField>

## Error Responses

<ResponseField name="401 Unauthorized" type="object">
  Missing API key

  ```json theme={null}
  {
    "detail": "No API key provided"
  }
  ```
</ResponseField>

<ResponseField name="401 Unauthorized" type="object">
  Invalid API key format

  ```json theme={null}
  {
    "detail": "Invalid API key format"
  }
  ```
</ResponseField>

<ResponseField name="401 Unauthorized" type="object">
  Invalid or revoked API key

  ```json theme={null}
  {
    "detail": "Invalid API key"
  }
  ```
</ResponseField>

<ResponseField name="401 Unauthorized" type="object">
  Service key missing wallet address

  ```json theme={null}
  {
    "detail": "Service key requires wallet address"
  }
  ```
</ResponseField>

## Related Endpoints

* [Authentication Guide](/api-reference/authentication) - Complete auth setup
* [API Key Status](/api-reference/api-keys/status) - Check key metadata
* [Generate API Key](/api-reference/api-keys/generate) - Create new keys
* [Dashboard](/api-reference/account/dashboard) - Test auth with real data
