Skip to main content
Unauthenticated requests incur a 0.2% (20 basis points) platform fee. Authenticated requests using a JWT token are fee-free - you only pay network gas costs and market maker spreads.
Get your JWT token from the Partner Dashboard for authenticated API access and fee-free swaps.

How to Use Your API Key

Once you have your JWT token from the Partner Dashboard, include it in your API requests:
Store your JWT token securely and never commit it to version control. Use environment variables or secure secret management systems.

Authenticating end users (Confidential Intents)

Your Partner JWT authenticates your integration and waives the platform fee. It does not let you read a user’s confidential data. Reading private balances or confidential transaction history requires a separate User-Session token that proves the account owner (an end user, or a solver checking its own balance) actually controls the account, since none of that data is exposed by any public endpoint.

Get a User-Session token

public_key and signature aren’t something you type in, they come from having the account owner’s wallet sign a message:
  1. Build a MultiPayload message: recipient set to "intents.near", a fresh nonce, and message set to a stringified JSON object with an empty intents array plus a deadline and the account’s signer_id. The empty intents array is what makes this a proof of ownership instead of a real swap, see Signing Intents for the full MultiPayload spec across every supported wallet standard.
  2. Have that account’s wallet sign the message. The wallet returns the public_key that signed and the resulting signature.
  3. Send payload, public_key, and signature together as signedData to /v0/auth/authenticate.

Refresh a token

When accessToken expires, exchange refreshToken for a new one instead of re-signing:
Returns a new { accessToken, expiresIn }.
See this flow wired into a real solver in Confidential Example → Authentication.