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:
curl -X POST https://1click.chaindefuser.com/v0/quote \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "dry": false,
    "swapType": "EXACT_INPUT",
    "originAsset": "nep141:wrap.near",
    "destinationAsset": "nep141:usdt.tether-token.near",
    "amount": "1000000000000000000000000",
    "recipient": "your-account.near",
    "recipientType": "INTENTS",
    "refundTo": "your-account.near",
    "refundType": "INTENTS"
  }'
const response = await fetch('https://1click.chaindefuser.com/v0/quote', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${YOUR_JWT_TOKEN}`
  },
  body: JSON.stringify({
    dry: false,
    swapType: 'EXACT_INPUT',
    originAsset: 'nep141:wrap.near',
    destinationAsset: 'nep141:usdt.tether-token.near',
    amount: '1000000000000000000000000',
    recipient: 'your-account.near',
    recipientType: 'INTENTS',
    refundTo: 'your-account.near',
    refundType: 'INTENTS'
  })
});
import requests

response = requests.post(
  'https://1click.chaindefuser.com/v0/quote',
  headers={
    'Content-Type': 'application/json',
    'Authorization': f'Bearer {YOUR_JWT_TOKEN}'
  },
  json={
    'dry': False,
    'swapType': 'EXACT_INPUT',
    'originAsset': 'nep141:wrap.near',
    'destinationAsset': 'nep141:usdt.tether-token.near',
    'amount': '1000000000000000000000000',
    'recipient': 'your-account.near',
    'recipientType': 'INTENTS',
    'refundTo': 'your-account.near',
    'refundType': 'INTENTS'
  }
)
Store your JWT token securely and never commit it to version control. Use environment variables or secure secret management systems.
Authenticating end users (not your integration) uses a separate User-Session bearer token. This is part of Confidential Intents, which is currently invite-only.