Skip to main content
The exchange API uses API keys to authenticate requests that need to sign HyperLiquid transactions (placing orders, modifying positions, etc.). You register your wallet once and get a key back.

Register a wallet

Register your HyperLiquid private key to get an API key. The private key is encrypted and stored securely. It’s used to sign transactions on your behalf when you place orders.
Start with testnet to verify everything works before registering a mainnet wallet.
POST /exchange/register
Request body: Response:
Save the api_key value. You’ll pass it in the X-API-Key header on authenticated requests.

Revoke a key

Delete your API key and the stored encrypted private key. DELETE /exchange/register
Response:

Check your key

Verify that your API key is valid and see the associated wallet address. GET /exchange/whoami
Response:

Using your key

Once registered, pass the API key in the X-API-Key header:

Alternative: per-request private key

If you don’t want to register, pass your private key directly on each request using the X-HL-Private-Key header:
Nothing is stored. The key is used for that single request and discarded.

Security

  • Your private key is encrypted at rest using Fernet symmetric encryption
  • The encryption key is stored in an environment variable, never in code
  • Keys are never logged or exposed in API responses
  • You can revoke your key at any time to delete the stored credentials
  • All traffic is served over HTTPS