Skip to main content
To access the Rails APIs, developers must first configure their API keys. This process is completed through the Rails UI.

Create a New API Key

  1. Click your profile icon in the bottom left corner of the Rails UI, then select API Key Management from the menu.
Profile menu showing the API Key Management option
  1. On the API Key Management screen, you will see your existing API keys and the option to create a new one. Click the Create API Key button.
API Key Management screen showing existing keys and the Create API Key button
  1. Provide a descriptive name for your new key in API Key Name, then confirm by clicking Create API Key.
When creating an API key, you may select the read-only option. Read-only API keys can only access the following User Account endpoints across both Perpetuals and Options:

Perpetuals

Options

Attempting to access any other endpoints or WebSocket features with a read-only API key will result in a 403 Forbidden error.
Create API Key form with API Key Name field and read-only option Each API key consists of two components: the key (identifier) and the secret (authentication credential). The secret is displayed only once—be sure to copy and store it securely before confirming the creation. API key created successfully confirmation showing key and secret After creation, your new API key will appear in the management table. API Key Management table showing the newly created API key

Revoke an Existing API Key

If an API key is compromised or you wish to rotate your keys periodically, click the “trash can” icon to revoke it. Once revoked, you may generate a new API key by following the steps above.

Use an API Key

API keys (key and secret) are used to obtain a short-lived access token for authorizing with the Rails APIs. For details, refer to the Get Access Token endpoint. Security best practices:
  • Always access your API secrets securely (e.g., via environment variables).
  • Never commit your secrets to a code repository.