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

# List API keys

> List the API keys of your account with their status, to see which keys can sign and when a rotated key stops working.

`GET /accounts/me/keys` lists every API key of the account that signs the request: the active key, keys in the grace period of a rotation, and expired and revoked keys. Each entry has its status and timestamps. Secret keys are never returned, so this list can't recover a lost one.

The API console doesn't call the key endpoints: run them from your server, where your credentials live.

Signed endpoint with no request body. Sign the method, the path and the empty string (`bodyHash` `47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU`), send no body, and send `Content-Type: application/json` and the four headers `x-api-key-id`, `x-value-info`, `x-passphrase` and `x-signature` described in [Sign requests](https://docs.olympex.io/authentication/sign-requests.md). Any key that can sign for the account can call it: an `active` key, or a `rotating` key before its `expiresAt`. `data.keys` holds one entry per key, with `apiKeyId`, `status` (`active`, `rotating`, `expired` or `revoked`), `createdAt`, `expiresAt` and `revokedAt`, all in UTC. Only `active` and `rotating` keys can sign. The response never contains a secret key. A `404 NOT_FOUND` means key management is unavailable: treat it as unavailable, not as a missing account. An account can call it 30 times per minute; over that, `429 RATE_LIMIT_EXCEEDED` means wait about a minute.

## Statuses

| `status` | Meaning | Signs requests |
| - | - | - |
| `active` | The current key. A new account starts with one, and each rotation creates a new one. | Yes |
| `rotating` | The old key of a `graceful` [rotation](https://docs.olympex.io/api-reference/accounts/rotate-api-key.md), in its grace period. | Until `expiresAt` |
| `expired` | A `rotating` key whose grace period has ended. | No |
| `revoked` | Revoked with [`POST /accounts/me/keys/{apiKeyId}/revoke`](https://docs.olympex.io/api-reference/accounts/revoke-api-key), or by a `compromised` rotation. A revoked key can't be restored. | No |

Olympex computes `status` when you call, so a `rotating` key becomes `expired` at `expiresAt` without any other change. `expiresAt` is `null` until a key is rotated. A key revoked by a `compromised` rotation has `expiresAt` and `revokedAt` set to the time of that rotation. Show every time in UTC.

## Use the list

* **Check a rotation.** After a rotation, the list shows the old key as `rotating` with the end of its grace period, and the new key as `active`. Call it with the new key to confirm that the new key works.
* **Before you revoke.** The account must keep its `active` key: revoke `rotating` and `expired` keys, and rotate the `active` key instead of revoking it.
* **Find keys to clean up.** Revoke a `rotating` key as soon as your services use the new key, instead of waiting for `expiresAt`.
* **Don't poll it.** An account can list its keys 30 times per minute, on every plan. Over that, the API answers `429` `RATE_LIMIT_EXCEEDED`: wait about a minute.

```bash cURL theme={null}
# List the API keys of your account.
# Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.
METHOD=GET
ENDPOINT=/accounts/me/keys
QUERY=''
BODY='' # GET has no body: the signature covers the empty string
TS="${OLYMPEX_TIMESTAMP:-$(date +%s)}"
NONCE="${OLYMPEX_NONCE:-$(openssl rand -hex 12)}"
BODY_HASH="$(printf '%s' "$BODY" | openssl dgst -sha256 -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')"
VALUE_INFO="$(printf '%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")"
MESSAGE="$(printf 'OLPX-HMAC-SHA256-V2\n%s\n%s\n%s\n%s\n%s\n%s' "$TS" "$NONCE" "$METHOD" "/api/v1$ENDPOINT" "$QUERY" "$BODY_HASH")"
curl -sS -X "$METHOD" "https://api-rest.olympex.io/api/v1$ENDPOINT${QUERY:+?$QUERY}" \
  -H "content-type: application/json" \
  -H "x-api-key-id: $OLYMPEX_API_KEY_ID" \
  -H "x-value-info: $(printf '%s' "$VALUE_INFO" | openssl base64 -A)" \
  -H "x-passphrase: $OLYMPEX_PASSPHRASE" \
  -H "x-signature: $(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$OLYMPEX_SECRET_KEY" -binary | od -An -v -tx1 | tr -d ' \n')"
```

```ts TypeScript theme={null}
import { olympexRequest } from "./sign-request.ts"; // /authentication/sign-requests

type ApiKey = {
  apiKeyId: string;
  status: "active" | "rotating" | "expired" | "revoked";
  createdAt: string;
  expiresAt: string | null;
  revokedAt: string | null;
};

const { keys } = await olympexRequest<{ keys: ApiKey[] }>("GET", "/accounts/me/keys");
for (const key of keys) {
  const until = key.status === "rotating" ? `, signs until ${key.expiresAt} UTC` : "";
  console.log(`${key.apiKeyId} ${key.status}${until}`);
}
```

```python Python theme={null}
from sign_request import olympex_request  # /authentication/sign-requests

keys = olympex_request("GET", "/accounts/me/keys")["keys"]
for key in keys:
    until = f", signs until {key['expiresAt']} UTC" if key["status"] == "rotating" else ""
    print(f"{key['apiKeyId']} {key['status']}{until}")
```

```json 200 During a graceful rotation theme={null}
{
  "success": true,
  "data": {
    "keys": [
      {
        "apiKeyId": "00000000-0000-4000-8000-000000000000",
        "status": "rotating",
        "createdAt": "2026-10-30T13:06:44.205Z",
        "expiresAt": "2026-10-31T13:06:45.989Z",
        "revokedAt": null
      },
      {
        "apiKeyId": "00000000-0000-4000-8000-000000000001",
        "status": "active",
        "createdAt": "2026-10-30T13:06:45.989Z",
        "expiresAt": null,
        "revokedAt": null
      }
    ]
  },
  "meta": {
    "requestId": "GDxwLh7gIAMEZIA=",
    "version": "v1",
    "accountType": "integrator",
    "apiKeyId": "00000000-0000-4000-8000-000000000001"
  }
}
```

```json 429 theme={null}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many key administration requests",
    "details": []
  },
  "meta": {
    "requestId": "GQ0byj1UoAMESSw=",
    "version": "v1",
    "accountType": "integrator",
    "apiKeyId": "00000000-0000-4000-8000-000000000000"
  }
}
```

```json 403 theme={null}
{
  "message": "Forbidden"
}
```


## OpenAPI

````yaml api-reference/openapi.json GET /accounts/me/keys
openapi: 3.0.3
info:
  title: Olympex REST API
  version: 1.0.0
  description: >-
    Aggregated swap quotes and transactions, limit orders and DCA strategies on
    EVM chains, plus the chain and token catalog and the management of your API
    keys. Every response uses the same envelope, except the API gateway's own
    responses (`{"message": …}`): `401` or `403` when the signed headers are
    missing or rejected, `429` when it throttles requests, and `500` or `503`
    when it can't get a response from Olympex in time. Each API account has a
    rate limit on every signed endpoint, shared by all its API keys: over it,
    the API answers `429` with `RATE_LIMIT_EXCEEDED`. See [Rate
    limits](https://docs.olympex.io/authentication/limits#rate-limits). Chain
    IDs are integers on every endpoint. Signed endpoints require four signed
    headers; see [Sign
    requests](https://docs.olympex.io/authentication/sign-requests).
  termsOfService: https://docs.olympex.io/legal/terms
  contact:
    name: Olympex partnerships
    email: partners@olympex.io
    url: https://docs.olympex.io
servers:
  - url: https://api-rest.olympex.io/api/v1
    description: Olympex REST API v1
security: []
tags:
  - name: Accounts
    description: Create an API account and manage its API keys.
  - name: Quotes
    description: Aggregated single-chain and cross-chain quotes.
  - name: Swap
    description: Unsigned transaction calldata for a quoted route.
  - name: TxStatus
    description: Track a cross-chain transfer after you broadcast it.
  - name: Transactions
    description: On-chain status of a transaction you broadcast.
  - name: Chains and tokens
    description: Enabled chains and the tokens listed on each.
  - name: Limit orders
    description: Orders that Olympex executes when the market reaches your price.
  - name: DCA
    description: Strategies that buy a token in equal orders over time.
  - name: Docs
    description: Machine-readable API description.
paths:
  /accounts/me/keys:
    get:
      tags:
        - Accounts
      summary: List API keys
      description: >-
        Lists every API key of the account that signed the request, including
        revoked and expired keys, with its status and timestamps. Secret keys
        are never returned. Any key that can sign for the account can list them.
        No request body: sign the empty string.
      operationId: listApiKeys
      responses:
        '200':
          description: The account's API keys, without secret keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApiKeysSuccessResponse'
              examples:
                afterRotation:
                  summary: During a graceful rotation
                  value:
                    success: true
                    data:
                      keys:
                        - apiKeyId: 00000000-0000-4000-8000-000000000000
                          status: rotating
                          createdAt: '2026-10-30T13:06:44.205Z'
                          expiresAt: '2026-10-31T13:06:45.989Z'
                          revokedAt: null
                        - apiKeyId: 00000000-0000-4000-8000-000000000001
                          status: active
                          createdAt: '2026-10-30T13:06:45.989Z'
                          expiresAt: null
                          revokedAt: null
                    meta:
                      requestId: GDxwLh7gIAMEZIA=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000001
                afterRevocation:
                  summary: After a revocation and a compromised rotation
                  value:
                    success: true
                    data:
                      keys:
                        - apiKeyId: 00000000-0000-4000-8000-000000000000
                          status: revoked
                          createdAt: '2026-10-30T13:06:44.205Z'
                          expiresAt: '2026-10-31T13:06:45.989Z'
                          revokedAt: '2026-10-30T13:06:48.094Z'
                        - apiKeyId: 00000000-0000-4000-8000-000000000001
                          status: revoked
                          createdAt: '2026-10-30T13:06:45.989Z'
                          expiresAt: '2026-10-30T13:06:48.517Z'
                          revokedAt: '2026-10-30T13:06:48.517Z'
                        - apiKeyId: 00000000-0000-4000-8000-000000000002
                          status: active
                          createdAt: '2026-10-30T13:06:48.517Z'
                          expiresAt: null
                          revokedAt: null
                    meta:
                      requestId: GDxwdjPYoAMEPcw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000002
        '401':
          description: >-
            A signing header is missing. The gateway answers with
            `{"message":"Unauthorized"}` before your request reaches Olympex;
            the handler answers with the `UNAUTHORIZED` envelope when the
            authorizer context is missing.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GatewayError'
                  - $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Unauthorized
        '403':
          description: >-
            Authentication failed: unknown, revoked or expired API key, wrong
            passphrase, invalid signature, timestamp outside the ±300 s window,
            reused nonce, or inactive account (gateway
            `{"message":"Forbidden"}`).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GatewayError'
                  - $ref: '#/components/schemas/ErrorResponse'
              examples:
                gateway:
                  summary: Signature rejected by the gateway
                  value:
                    message: Forbidden
        '404':
          description: >-
            An unknown path or method returns `NOT_FOUND`, with a message that
            names the method and path. If key management is unavailable, the
            three key endpoints return `NOT_FOUND` too: treat that as
            unavailable, not as a missing account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unknownRoute:
                  summary: Unknown path or method
                  value:
                    success: false
                    error:
                      code: NOT_FOUND
                      message: No route for GET /api/v1/quote
                      details: []
                    meta:
                      requestId: E7edogG4IAMEPYA=
                      version: v1
        '429':
          description: >-
            The account sent more than 30 requests to this endpoint in 60
            seconds (`RATE_LIMIT_EXCEEDED`, "Too many key administration
            requests"). The limit is the same on every plan. Wait about a minute
            before you send it again. See [Rate
            limits](/authentication/limits#rate-limits).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/GatewayError'
              example:
                success: false
                error:
                  code: RATE_LIMIT_EXCEEDED
                  message: Too many key administration requests
                  details: []
                meta:
                  requestId: GQ0byj1UoAMESSw=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
        '500':
          description: >-
            Olympex could not complete the request (`INTERNAL_ERROR`), or the
            gateway could not get a response (`{"message":"Internal Server
            Error"}`), which also happens on the first request after a quiet
            period. Retry with backoff.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/GatewayError'
              example:
                success: false
                error:
                  code: INTERNAL_ERROR
                  message: Unexpected internal error
                  details: []
                meta:
                  requestId: GDxv-gPgIAMEPBA=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
      security:
        - ApiKeyId: []
          ValueInfo: []
          Passphrase: []
          Signature: []
components:
  schemas:
    ListApiKeysSuccessResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          required:
            - keys
          properties:
            keys:
              type: array
              description: Every API key the account has had.
              items:
                $ref: '#/components/schemas/ApiKeySummary'
        meta:
          $ref: '#/components/schemas/Meta'
    GatewayError:
      type: object
      required:
        - message
      description: >-
        Returned by the API gateway itself: `401` or `403` when the signed
        headers are missing or rejected, `429` when it throttles requests, and
        `500` or `503` when it can't get a response from Olympex in time. It has
        no `success`, `error` or `meta`.
      properties:
        message:
          type: string
          example: Forbidden
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ErrorBody'
        meta:
          $ref: '#/components/schemas/Meta'
    ApiKeySummary:
      type: object
      required:
        - apiKeyId
        - status
        - createdAt
        - expiresAt
        - revokedAt
      properties:
        apiKeyId:
          type: string
          format: uuid
          description: The API key ID.
        status:
          type: string
          enum:
            - active
            - rotating
            - expired
            - revoked
          description: >-
            Computed when you call. `active`: signs requests. `rotating`: the
            old key of a graceful rotation, which signs requests until
            `expiresAt`. `expired`: a `rotating` key past `expiresAt`; it can't
            sign. `revoked`: revoked with `POST
            /accounts/me/keys/{apiKeyId}/revoke` or by a `compromised` rotation;
            it can't sign.
        createdAt:
          type: string
          format: date-time
          description: When the key was created, in UTC.
        expiresAt:
          type: string
          format: date-time
          description: >-
            End of the grace period of a key that was rotated, in UTC. For a key
            revoked by a `compromised` rotation, the time of that rotation.
            `null` for a key that was never rotated.
          nullable: true
        revokedAt:
          type: string
          format: date-time
          description: When the key was revoked, in UTC. `null` if it wasn't.
          nullable: true
    Meta:
      type: object
      required:
        - requestId
        - version
      properties:
        requestId:
          type: string
          description: Unique ID for this request. Include it when you contact support.
        version:
          type: string
          default: v1
          description: API version that served the request.
        accountType:
          type: string
          description: >-
            Account type resolved by the signature check, for example
            `integrator`. Present when the request was authenticated; absent on
            the `404` for an unknown path or method.
        apiKeyId:
          type: string
          format: uuid
          description: >-
            The API key ID that signed the request. Present when the request was
            authenticated; absent on the `404` for an unknown path or method.
    ErrorBody:
      type: object
      required:
        - code
        - message
        - details
      properties:
        code:
          type: string
          description: >-
            Machine-readable error code. `VALIDATION_ERROR` (400),
            `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for
            an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422),
            `RATE_LIMIT_EXCEEDED` (429), `SERVICE_UNAVAILABLE` (503, from key
            rotation and revocation), and for 500: `QUOTE_ERROR`,
            `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`, `CROSS_CHAIN_SWAP_ERROR`,
            `SUPPORT_CHAIN_ERROR`, `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`,
            `TX_STATUS_ERROR`, `INTERNAL_ERROR`. Olympex can add codes: handle
            an unknown code by its HTTP status.
        message:
          type: string
          description: Human-readable summary. Don't parse it.
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      additionalProperties: true
      description: >-
        Validation errors carry `field` and `message`; other errors carry
        `message` only.
      properties:
        field:
          type: string
          description: >-
            Dot path of the invalid field, for example `params.chainId`. Empty
            for the top level.
        message:
          type: string
  securitySchemes:
    ApiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: >-
        Your API key ID (UUID). See [Sign
        requests](https://docs.olympex.io/authentication/sign-requests).
    ValueInfo:
      type: apiKey
      in: header
      name: x-value-info
      description: >-
        Base64 of `timestamp + "\n" + nonce + "\n" + bodyHash`, where
        `timestamp` is Unix seconds, `nonce` is 24 new hexadecimal characters
        and `bodyHash` is the unpadded base64url SHA-256 of the canonical body.
    Passphrase:
      type: apiKey
      in: header
      name: x-passphrase
      description: Your account passphrase. Treat it like the secret key.
    Signature:
      type: apiKey
      in: header
      name: x-signature
      description: >-
        Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key
        string (UTF-8, not decoded), of seven lines joined with `\n`, with no
        trailing newline: `OLPX-HMAC-SHA256-V2`, `timestamp`, `nonce`, the
        uppercase method, `path`, `canonicalQuery` and `bodyHash`. `path` is the
        request path including `/api/v1`, without the query string, for example
        `/api/v1/limit-order/<id>`. `canonicalQuery` is the query parameters
        decoded (`+` is a space), sorted by key and then by value, re-encoded
        per RFC 3986 and joined with `&`, or the empty string when there is no
        query. Headers signed for one request are rejected on any other. See
        [Sign requests](https://docs.olympex.io/authentication/sign-requests).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.