Skip to main content
1Click API enables you to specify a cross-chain swap intent (what you want to swap), and handles the execution for you.
There is no testnet version of NEAR Intents - use small amounts for test swaps.

Getting Started

1

Prerequisites

2

Query supported tokens

Fetch available tokens to find the assetId values you will need.
curl https://1click.chaindefuser.com/v0/tokens
The response includes tokens with their assetId in this format:
  • NEAR tokens: nep141:wrap.near
  • Bridged tokens: nep141:eth-0xdac17f958d2ee523a2206206994597c13d831ec7.omft.near
[
  {
    "assetId": "nep141:wrap.near",
    "decimals": 24,
    "blockchain": "near",
    "symbol": "wNEAR",
    "price": 1.1,
    "priceUpdatedAt": "2026-02-27T15:18:30.437Z",
    "contractAddress": "wrap.near"
  },
  {
    "assetId": "nep141:eth.omft.near",
    "decimals": 18,
    "blockchain": "eth",
    "symbol": "ETH",
    "price": 1947.28,
    "priceUpdatedAt": "2026-02-27T15:25:30.527Z",
    "contractAddress": null
  },
  {
    "assetId": "nep141:btc.omft.near",
    "decimals": 8,
    "blockchain": "btc",
    "symbol": "BTC",
    "price": 66093,
    "priceUpdatedAt": "2026-02-27T15:25:30.527Z",
    "contractAddress": null
  }
]
3

Request a quote

Request a quote with your swap parameters. Include your JWT token to avoid the 0.2% fee.
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",
    "slippageTolerance": 100,
    "originAsset": "nep141:wrap.near",
    "depositType": "ORIGIN_CHAIN",
    "destinationAsset": "nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near",
    "amount": "100000000000000000000000",
    "recipient": "0xYourArbitrumAddress",
    "recipientType": "DESTINATION_CHAIN",
    "refundTo": "your-account.near",
    "refundType": "ORIGIN_CHAIN",
    "deadline": "2025-01-01T00:00:00.000Z"
  }'
ParameterDescription
drytrue to validate parameters and get a quote without executing the swap
swapTypeEXACT_INPUT (specify input amount) or EXACT_OUTPUT (specify output amount)
slippageToleranceMaximum acceptable slippage in basis points (100 = 1%)
originAssetSource token assetId from the tokens endpoint
depositTypeORIGIN_CHAIN for origin-chain deposits, INTENTS for public Intents balances, or CONFIDENTIAL_INTENTS
destinationAssetTarget token assetId from the tokens endpoint
amountAmount in smallest unit (wei, yoctoNEAR, etc.)
recipientAddress to receive swapped tokens
recipientTypeDESTINATION_CHAIN, INTENTS, or CONFIDENTIAL_INTENTS
refundToAddress for refunds if swap fails
refundTypeORIGIN_CHAIN, INTENTS, or CONFIDENTIAL_INTENTS
deadlineQuote expiration timestamp in ISO format
CONFIDENTIAL_INTENTS is invite-only. Quotes using confidential deposit, recipient, or refund types require user authentication and only support EXACT_INPUT or EXACT_OUTPUT swap types. Contact the team via the Partner Portal to request access.
4

Send tokens

For ORIGIN_CHAIN quotes, transfer tokens to the depositAddress from the quote response. The swap begins automatically upon receipt.Save the deposit address and your transaction hash for tracking.If your quote uses depositType: INTENTS or depositType: CONFIDENTIAL_INTENTS, skip the on-chain transfer and use Signed Intent Execution instead.
5

Submit transaction hash (optional)

Speed up processing by notifying 1Click of your deposit.
curl -X POST https://1click.chaindefuser.com/v0/deposit/submit \
  -H "Content-Type: application/json" \
  -d '{
    "depositAddress": "address-from-quote-response",
    "txHash": "0xYourTransactionHash"
  }'
6

Monitor status

Check swap progress using the deposit address.
curl "https://1click.chaindefuser.com/v0/status?depositAddress=your-deposit-address"
StatusDescription
PENDING_DEPOSITAwaiting your token deposit
KNOWN_DEPOSIT_TXDeposit transaction detected
PROCESSINGSwap being executed
SUCCESSTokens delivered to destination address
INCOMPLETE_DEPOSITDeposit below required amount
REFUNDEDSwap failed, funds returned to refund address
FAILEDSwap encountered an error
View detailed transaction info on the NEAR Intents Explorer by searching for your deposit address.
7

Celebrate! 🎉

You just completed your first intent-based cross-chain swap!

Signed Intent Execution

Use signed intent execution when a quote uses depositType: INTENTS or depositType: CONFIDENTIAL_INTENTS. In both cases, the funds are already inside NEAR Intents, so the user authorizes the swap by signing an intent message off-chain instead of sending an on-chain deposit.
Deposit channeldepositTypeHow the deposit is made
Origin chain transferORIGIN_CHAINSend tokens to depositAddress, optionally notify via POST /v0/deposit/submit
Signed intentINTENTSGenerate intent, user signs, POST /v0/submit-intent
Signed intent (confidential)CONFIDENTIAL_INTENTSGenerate intent, user signs, POST /v0/submit-intent
For public Intents balances, this can speed execution because there is no on-chain deposit to wait for. For Confidential Intents balances, this is the required path because there is no RPC path for confidential intents.
Confidential Intents is invite-only for now. Confirm your integration is enabled before requesting quotes with CONFIDENTIAL_INTENTS.
POST /v0/generate-intent and POST /v0/submit-intent use partner authentication (X-API-Key recommended, JWT-auth legacy). They do not use the end-user User-Session token; the user’s authorization is the wallet signature submitted as signedData.
1

Quote

Request a quote with POST /v0/quote using depositType INTENTS or CONFIDENTIAL_INTENTS. Save the returned depositAddress; it links the signed intent back to the quote.
2

Generate

Call POST /v0/generate-intent with the depositAddress, the user’s signerId, and their wallet’s signing standard (nep413, erc191, raw_ed25519, webauthn, ton_connect, sep53, or tip191). It returns the unsigned intent payload.For the exact request fields and response shape, see Generate an intent for signing.
3

Sign

The user signs the returned intent payload with their wallet off-chain. Do not modify the payload between generation and signing; the signature must cover the exact payload returned by the API.
4

Submit

Call POST /v0/submit-intent with the signed payload (type: swap_transfer, signedData: the signed MultiPayload). It returns the intentHash.For the exact signedData schema and response shape, see Submit a signed intent.
5

Track

Poll GET /v0/status with the depositAddress, as with any swap. Include depositMemo if the quote response included one.

Next Steps

Clone the Example Repo

Clone and run a working TypeScript implementation to get started quickly.

Watch NEAR Intents 102

Follow along with this guided workshop explaining all the steps in detail.

Use the SDK

Integrate with our official SDK libraries for TypeScript, Go, or Rust.

NEAR Intents Explorer

Track transactions and view swap history

Troubleshooting

  • Check the blockchain explorer for your deposit transaction
  • Verify the deposit address matches the quote response
  • Allow up to 15 minutes for cross-chain processing
  • Use the status endpoint to check current state
  • Verify you sent the exact amount specified in the quote
  • Check your refund address for returned funds
  • Ensure your destination address format is correct for the target chain
  • Request a new quote and try again
Join our Telegram community for support.