HTTP API · Access
Raise the rate limit
A 24-hour grant that lifts /quote from 60 to 600 requests per minute, paid over x402 or unlocked by a Pro Pass.
curl "https://www.swaps.pro/api/sdk/v1/access"Quotes are free and stay free. What this sells is capacity: the per-IP ceiling exists because every quote fans out to upstream venues whose quota SwapsPro does not own.
Two ways in. x402: call with no headers, receive a 402 challenge, pay the USDC amount it names on Base, call again with the PAYMENT-SIGNATURE header, receive the grant. Pro Pass: ?address=0x… returns a message to sign; send address, issued and signature back and the pass is read from chain, never asserted by the caller.
The grant is a bearer token. Everyone presenting it draws from the same bucket, so sharing it divides your headroom rather than multiplying it.
Parameters#
| Name | In | Type | Description |
|---|---|---|---|
PAYMENT-SIGNATURE | header | x402 v2 payload | The signed payment answering the 402 challenge. X-PAYMENT is accepted for x402 v1. |
address | query | address | Pro Pass flow, step 1: the wallet holding the pass. Returns the message to sign. |
issued | query | ISO time | Pro Pass flow, step 2: the issued value from step 1, verbatim. |
signature | query | 0x signature | Pro Pass flow, step 2: EIP-191 personal_sign of the step-1 message. |
Responses#
Success is the body below. Every error is { "error": string, "code": string } with a matching HTTP status — never a 200 that says no.
When: payment settled, or the Pro Pass signature verified. Shape from the route source; the token and subject are placeholders.
{
"token": "sp_acc_…",
"header": "X-SwapsPro-Access",
"subject": "0x21c9…Ad3e",
"via": "x402",
"limit": {
"requestsPerMinute": 600,
"previously": 60
},
"expiresAt": "2026-09-04T12:00:00.000Z",
"ttlSeconds": 86400,
"usage": "Send \"X-SwapsPro-Access: <token>\" (or \"Authorization: Bearer <token>\") on GET /api/sdk/v1/quote.",
"note": "Quotes are free at 60 requests per minute with no credential at all — this token only raises the ceiling. It is a bearer token: everyone presenting it draws from the same bucket, so sharing it divides your headroom rather than multiplying it."
}Fields worth knowing#
| Field | Meaning |
|---|---|
token | the bearer grant |
header | the header name to send it as |
limit.requestsPerMinute | the new ceiling; previously is the free one |
expiresAt / ttlSeconds | when the grant stops working |
For agents#
The brief below is what Copy for agents puts on the clipboard: the parameters, one example, the 200 body and the rules. It is Markdown, and it is short on purpose — everything in it is load-bearing.
- Do not buy a grant until you have actually been rate limited (a 429 from /quote). At the free ceiling most agents never need one.
- Keep the token server-side. Presenting it from many clients shares one bucket.
- The route may answer 503 with
missingConfigon a deployment without a facilitator; treat that as "no grants here", not as a retryable error.
