For more information around API Config Key limits, please reach out to us in the Discord API channel.
API Config Keys are generated via REST API. The Python SDK provides examples for how API Config Key can be generated, listed and revoked: https://github.com/pacifica-fi/python-sdk/blob/main/rest/api_config_keys.py.
Each account can have up to 5 API Config Keys.
Request Body
| Field | Type | Need | Description | Example |
|---|---|---|---|---|
”account” | string | required | User’s wallet address | 42trU9A5… |
“signature” | string | required | Cryptographic signature | 5j1Vy9Uq… |
“timestamp” | integer | required | Current timestamp in milliseconds | 1716200000000 |
”expiry_window” | integer | optional | Signature expiry in milliseconds | 30000 |
Response
API Config Keys are generated with a prefix for fast lookup
Format:
"{8_char_prefix}_{base58_encoded_uuid}"
Using a Pacifica API Config Key
Pacifica’s API Config Keys are used to enhance websocket rate-limiting. The default rate for an API Config Key follows the same restrictions as IP-based rate limits.Pacifica API Config Keys are used in the connection header to specify API Config Key rate limiting. Using the Python SDK as an example,
- for Websockets, add
extra_headers={"PF-API-KEY": "your_rate_limit_key"}intowebsockets.connect - for REST APIs, add
"PF-API-KEY": "your_rate_limit_key"intoheaderswith{"Content-Type": "application/json"}