> ## 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.

# Check API Key Status

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

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

  headers = {
      'X-API-Key': os.environ['STRIKE_API_KEY']
  }

  response = requests.get(
      'https://api.strike.markets/api-key/status',
      headers=headers
  )

  if response.status_code == 200:
      data = response.json()
      print(f"API Key Status: {data['status']}")
      print(f"Wallet: {data['wallet_address']}")
      print(f"Created: {data['created_at']}")
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch('https://api.strike.markets/api-key/status', {
    method: 'GET',
    headers: {
      'X-API-Key': process.env.STRIKE_API_KEY
    }
  });

  if (response.ok) {
    const data = await response.json();
    console.log(`API Key Status: ${data.status}`);
    console.log(`Wallet: ${data.wallet_address}`);
    console.log(`Created: ${data.created_at}`);
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response - Active Key theme={null}
  {
    "success": true,
    "status": "active",
    "wallet_address": "0x742d35cc6c6c7532b1140da4c8a2f6c8ecfc9b46",
    "created_at": "2024-01-15T14:30:00Z",
    "last_used_at": "2024-01-15T16:45:00Z",
    "request_count": 142,
    "rate_limit": {
      "limit": 10,
      "remaining": 8,
      "reset_at": "2024-01-15T16:46:00Z"
    }
  }
  ```

  ```json Error - Invalid Key theme={null}
  {
    "error": "INVALID_API_KEY",
    "message": "Invalid or revoked API key"
  }
  ```

  ```json Error - No Key theme={null}
  {
    "error": "API_KEY_NOT_FOUND",
    "message": "No API key found"
  }
  ```
</ResponseExample>

## Description

Check the status and metadata of an API key. This endpoint is useful for verifying that your API key is valid and active, monitoring usage, and checking rate limits.

## Authentication

This endpoint requires:

* The API key you want to check status for

## Request Headers

| Header    | Type   | Required | Description          |
| --------- | ------ | -------- | -------------------- |
| X-API-Key | string | Yes      | The API key to check |

## Response Fields

| Field           | Type    | Description                                              |
| --------------- | ------- | -------------------------------------------------------- |
| success         | boolean | Whether the operation was successful                     |
| status          | string  | Status of the key: `active` or `inactive`                |
| wallet\_address | string  | The wallet address associated with this key              |
| created\_at     | string  | ISO 8601 timestamp of when the key was created           |
| last\_used\_at  | string  | ISO 8601 timestamp of last API call (null if never used) |
| request\_count  | number  | Total number of requests made with this key              |
| rate\_limit     | object  | Current rate limit status                                |

### Rate Limit Object

| Field     | Type   | Description                                   |
| --------- | ------ | --------------------------------------------- |
| limit     | number | Maximum requests allowed in the window        |
| remaining | number | Requests remaining in current window          |
| reset\_at | string | ISO 8601 timestamp when the rate limit resets |

## Error Codes

| Code                 | Description                                     |
| -------------------- | ----------------------------------------------- |
| INVALID\_API\_KEY    | The provided key is invalid or has been revoked |
| API\_KEY\_NOT\_FOUND | No API key was provided                         |
| UNAUTHORIZED         | Authentication failed                           |

## Rate Limiting

This endpoint itself has minimal rate limiting:

* 60 requests per minute per API key
* Does not count against your trading rate limits

## Notes

* This endpoint is useful for debugging authentication issues
* The `request_count` is a lifetime counter for the key
* The `last_used_at` field helps identify inactive keys
* Rate limit information is real-time and updates with each request
* Use this endpoint to implement smart rate limit management in your applications
