Notus API
Swaps

Create Swap

This endpoint provides a real-time quote for a token swap, detailing the estimated destination token amount, fees, and other relevant parameters.

POST
/api/v1/crypto/swap

Authorization

x-api-key
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/crypto/swap" \  -H "Content-Type: application/json" \  -d '{    "amountIn": "1.2",    "chainIdIn": 42161,    "chainIdOut": 43114,    "gasFeePaymentMethod": "ADD_TO_AMOUNT",    "payGasFeeToken": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",    "tokenIn": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",    "tokenOut": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",    "walletAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464",    "toAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464"  }'
{  "quotes": [    {      "metadata": {        "key": "value"      },      "revertReason": {        "decoded": "ERC-20 insufficient balance. Address 0xf12534a4939c7fbda50f893774a9525265fe1a9a has 120. The operation requested 200.",        "raw": "0xe450d38c000000000000000000000000f12534a4939c7fbda50f893774a9525265fe1a9a0000000000000000000000000000000000000000000000068155a43676e0000000000000000000000000000000000000000000000000000ad78ebc5ac6200000",        "utf8": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000�%4�����\u000f�7t�RRe�\u001a�\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0006�U�6v�\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\n׎�Z� \u0000\u0000"      },      "tokenIn": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",      "amountIn": "1.26",      "tokenOut": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",      "chainIn": 42161,      "chainOut": 43114,      "minAmountOut": "23.48",      "amountOut": "23.48",      "estimatedExecutionTime": "2026-04-12T14:49:12.762Z",      "estimatedGasFees": {        "payGasFeeToken": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",        "maxGasFeeToken": "12.345",        "gasFeeTokenAmount": "12.345",        "gasFeeTokenAmountUSD": "0.321",        "maxGasFeeNative": "string"      },      "estimatedCollectedFee": {        "collectedFeeToken": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",        "collectedFee": "string",        "collectedFeePercent": "string",        "notusCollectedFee": "string",        "notusCollectedFeePercent": "string"      },      "amountInUSD": "23.4921",      "amountOutUSD": "23.502",      "tokenInPrice": "1.736",      "swapProvider": "CCTP",      "expiresAt": 1751469204210,      "fees": [        {          "amount": "100.5",          "token": "0x1234567890123456789012345678901234567890",          "toAddress": "0x1234567890123456789012345678901234567890",          "type": "NOTUS",          "percentage": "2"        }      ],      "typedData": {        "domain": {          "name": "Portikus",          "version": "2.0.0",          "chainId": 137,          "verifyingContract": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464"        },        "types": {          "Kernel": [            {              "name": "hash",              "type": "bytes32"            }          ]        },        "primaryType": "Order",        "message": {          "owner": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464",          "srcAmount": "1000000000000000000"        }      },      "userOperationHash": "0x2aac7a66d5331454eafc9b981be3596ad08a40dad24883e3b9c4a5362cd7f7e1",      "quoteId": "0x2aac7a66d5331454eafc9b981be3596ad08a40dad24883e3b9c4a5362cd7f7e1",      "authorization": {        "chainId": 42161,        "address": "0xd6cedde84be40893d153be9d467cd6ad37875b28",        "nonce": 10,        "hash": "0x777811ae5d51875409b9978ddc1b40a9da1bbe9570040bdd7c5f186d70ceceba"      },      "rwaApproveUserOperation": {        "userOperationHash": "string",        "authorization": {          "chainId": 42161,          "address": "0xd6cedde84be40893d153be9d467cd6ad37875b28",          "nonce": 10,          "hash": "0x777811ae5d51875409b9978ddc1b40a9da1bbe9570040bdd7c5f186d70ceceba"        }      },      "walletAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464",      "toAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464"    }  ]}