Authentication
To use the Swaps API, each request must be authenticated using an API key. Depending on your workspace environment, the base API URL will be different:
Sandbox: https://api.swaps-sandbox.com/{partner}/v2
Production: https://api.swaps.com/{partner}/v2
Replace {partner} with your account name provided by Swaps (e.g., metamask).
Every API request must contain the following headers:
x-api-key: Your unique API key, which can be found in the Swaps Partner Dashboard.
Accept: This should be set to application/json to specify the response format.
Signing a Request
Ensuring all requests are properly authenticated is crucial for security and to avoid disruptions in service. Always include your x-api-key in the headers for each API call.
Updated 21 days ago