NEAR Intents: Making a Request
Query tokens, request a quote, send your deposit, and track it to completion
This covers the standard ORIGIN_CHAIN swap flow end-to-end: find a token, request a quote, send your deposit, and poll status until it settles.
1. Query supported tokens
Fetch available tokens to find the assetId values you will need.
curl https://1click.chaindefuser.com/v0/tokens
const response = await fetch('https://1click.chaindefuser.com/v0/tokens');
const tokens = await response.json();
The response includes tokens with their assetId in this format:
- NEAR tokens:
nep141:wrap.near - Bridged tokens:
nep141:eth-0xdac17f958d2ee523a2206206994597c13d831ec7.omft.near
Example response
[ { "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 } ]
2. Request a quote
Request a quote with your swap parameters. Include your JWT token to use the authenticated fee schedule instead of the extra 0.25% unauthenticated 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"
}'
const quote = 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',
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: new Date(Date.now() + 3 * 60 * 1000).toISOString()
})
});
const result = await quote.json();
Key parameters
Parameter Description drytrueto validate parameters and get a quote without executing the swapswapTypeEXACT_INPUT(specify input amount) orEXACT_OUTPUT(specify output amount)slippageToleranceMaximum acceptable slippage in basis points (100 = 1%) originAssetSource token assetIdfrom the tokens endpointdepositTypeORIGIN_CHAINfor origin-chain deposits,INTENTSfor public Intents balances, orCONFIDENTIAL_INTENTSdestinationAssetTarget token assetIdfrom the tokens endpointamountAmount in smallest unit (wei, yoctoNEAR, etc.) recipientAddress to receive swapped tokens recipientTypeDESTINATION_CHAIN,INTENTS, orCONFIDENTIAL_INTENTSrefundToAddress for refunds if swap fails refundTypeORIGIN_CHAIN,INTENTS, orCONFIDENTIAL_INTENTSconfidentialitypublic(default),basic, oradvanced. Enables a confidential swap on an otherwise normal quote, see Confidential SwapsdeadlineQuote expiration timestamp in ISO format
[!TIP]
This guide uses
EXACT_INPUT, but 1Click also supportsEXACT_OUTPUT,FLEX_INPUT, andANY_INPUT. Check out Swap Types to see what each one does and when to use it.
3. 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.
4. 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"
}'
await fetch('https://1click.chaindefuser.com/v0/deposit/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
depositAddress: 'address-from-quote-response',
txHash: '0xYourTransactionHash'
})
});
5. Monitor status
Check swap progress using the deposit address.
curl "https://1click.chaindefuser.com/v0/status?depositAddress=your-deposit-address"
const status = await fetch(
'https://1click.chaindefuser.com/v0/status?depositAddress=your-deposit-address'
);
const result = await status.json();
Status response
Status Description 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.
6. Celebrate! 🎉
You just completed your first intent-based cross-chain swap!