ZaaS HTTP API
HTTP API doc for ZaaS API
Last updated
Was this helpful?
HTTP API doc for ZaaS API
Last updated
Was this helpful?
https://zap-api.kyberswap.com/{chain}
where chain is one of the . For example: https://zap-api.kyberswap.com/arbitrum
Please contact to whitelist your client id with more rate limit quota
Refer to https://docs.kyberswap.com/kyberswap-solutions/kyberswap-zap-as-a-service/zaps-supported-chains-dexes for list of supported dexes for each chain
DEX_UNISWAPV3
Available options: id of the pool to zap into.
0x2f5e87c9312fa29aed5c179e456625d79015299c
id of the position to add liquidity to; omit to create a new uniswapV3 position. for uniswapV2 this is user address
min tick of the position, required if creating a new uniswapV3 position.
120000
max tick of the position, required if creating a new uniswapV3 position.
480000
which token(s) to use as zap source. also accepts comma separated addresses
amount(s) to zap including fee, corresponding to tokenIn. also accepts comma separated amounts.
which token(s) to use as zap source. also accepts comma separated addresses. deprecated: use tokens_in. if both fields are specified, they are combined
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
amount(s) to zap including fee, corresponding to tokenIn. also accepts comma separated amounts. deprecated: use amounts_in. if both fields are specified, they are combined
1000000000000000000
whether to disable swapping with the aggregator
comma-separated list of sources to use for aggregator
comma-separated list of sources to exclude for aggregator
comma-separated list of pools to exclude for aggregator
the address of the fee recipient.
fee percentage in per cent mille (0.001% or 1 in 100,000). Ignored if feeAddress is empty. From 0 to 100,000 inclusively. Example: 1 for 0.001%.
maximum slippage tolerance in basis points (0.01%), used for aggregator (exceeding which the transaction will revert) and pool swap during zap (for additional zapping and for refund). From 0 to 10,000 inclusively. Example: 1 for 0.01%.
100
Client Id
zap-docs
Request Id
Returns the best route to zap-in to the specified pool position.
{"message":"OK","data":{"poolDetails":{"category":"common_pair","uniswapV3":{"tick":259661,"newTick":259661,"sqrtP":"34441043722219267846042009462652656","newSqrtP":"34441043737601305531684264539945030"}},"positionDetails":{"addedLiquidity":"1149974764979","addedAmountUsd":"3670.40949860"},"zapDetails":{"initialAmountUsd":"3673.00201650","actions":[{"type":"ACTION_TYPE_PROTOCOL_FEE","protocolFee":{"pcm":50,"tokens":[{"address":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","amount":"500000000000000","amountUsd":"1.83650101"}]}},{"type":"ACTION_TYPE_AGGREGATOR_SWAP","aggregatorSwap":{"swaps":[{"tokenIn":{"address":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","amount":"499958741353837836","amountUsd":"1836.34946516"},"tokenOut":{"address":"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f","amount":"2644815","amountUsd":"1835.59443695"}}]}},{"type":"ACTION_TYPE_POOL_SWAP","poolSwap":{"swaps":[{"tokenIn":{"address":"0x82af49447d8a07e3bd95bd0d56f35241523fbab1","amount":"102872182233841","amountUsd":"0.37784973"},"tokenOut":{"address":"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f","amount":"544","amountUsd":"0.37755509"}}]}},{"type":"ACTION_TYPE_ADD_LIQUIDITY","addLiquidity":{"token0":{"address":"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f","amount":"2645358","amountUsd":"1835.97129800"},"token1":{"address":"0x82af49447d8a07e3bd95bd0d56f35241523fbab1","amount":"499438386463928322","amountUsd":"1834.43820060"}}}],"finalAmountUsd":"3670.40949860","priceImpact":0.070583075},"route":"KLUv/WAdB00bAOY5nCNAj3JMrqhs1F7Rx8ZtyeIRkgGqIXfgSOampMyhZleOYZgzAYgAigChAM2d3Nn7iLnY66vzVWYuXVS7q9ecpZ+zuUgxlxgVb4CvKk5c764QuTno0imHOZAmq01WqNmBDoff4WhbyNyxdn8hlq4uHYQOP1BjCDWHV0uHsQX9crda1svR5WSJl+75T1b4y8HZzdt+qYcdjX0yKJX+s7wxlBi85iCX0RzlUjbnuKRa5Tb3XEbqyqp2Of//RpLLhIJJCiRtYlJRk0uHGLyGI0Dr/+ek+tNxrUdW3G9EDMDECqAxIvZvK0xEXR2gEM1dLrFL1zB4KVM9X3vb1XX/1/nXb69d/6uUL4VyQUzVXKVZTCIREw9Ecimj1lUzXeXyRNWcxaVVVsuo//zJzUVQkfdfeTvXWykzqsJeinEpk7nPJOIMUC4aIpOJRPSQtIN0WgHQJtgjYZSHhEk8709hFpZLksolagwRhAISwdd1/NluW+wXS/XMIaXQYo5lmQ/kbGQyoVwGBERzLbpMKpcyJ9Aa1BoBq0SYdulScxc+sie3wgC0sIeFPXjZI7oocGLv6/pSVr7bGV0UmiXCoOZaxGERCKsQaA+kshC1iQpDSMe+u1hx768GtLq65hwWh1ZfARm1VPGq5h6XMo1GJtPIVuqpmz/Vql6ZjPnoqlZTPS3icqW+WN2bIVLDPT0pXPxk76WsnZSHSw1MvnA961prlx+iOTS4hwRyEak0h+RySWGaQ1LQUAGJWIKloEEfEoBJRLmoPJBKBNAqKpdHU9FVcXnbs/+3ZT/sdW0/ns63cyvmUGYqZ6OyQrg6PTUymeZQXBImAmEgQAJCDDOmHZLEGJj0Yxm1rG2f2YZ071vZSmuTEYMc7ksXKTyQndCnyoI34X93YwbNI3xyLUJ6AY9LrS6IJcMwm/eSsBsVqAI2PFuTKUizGWTHhcFXrKvsl7iawsClp6xyNDBUSxoFdUsqRanhffuMrI+Aa2sqmbkA6Xgu21EIhh/cypg4W7hogNnGFhyT24o1cAeaZ5ILOW7cAQIfQCmJ49N52JNgQ7O7L1gWAkKhheQ60Elw0AKCCulGAVUHGJgaPIElWIKKTLpC06UHnCVX7TvCAMNuc2ogLKuyTnCUAPqFS2x0VeyCy+qwbowuW746oVmIAg==","routerAddress":"0x6960f99e6F9A9A5EFcd44C5BaA3245aC2b145287","gas":"1451371","gasUsd":"0.05330889"},"requestId":"45fa8a6175f45233678b10fc2a72c4b9"}
Refer to https://docs.kyberswap.com/kyberswap-solutions/kyberswap-zap-as-a-service/zaps-supported-chains-dexes for list of supported dexes for each chain
DEX_UNISWAPV3
Available options: Refer to https://docs.kyberswap.com/kyberswap-solutions/kyberswap-zap-as-a-service/zaps-supported-chains-dexes for list of supported dexes for each chain
DEX_UNISWAPV3
Available options: id of the pool to zap into.
id of the pool to zap into.
id of the position to withdraw from
id of the position to add liquidity to; omit to create a new uniswapV3 position. for uniswapV2 this is user address
min tick of the position, required if creating a new uniswapV3 position.
max tick of the position, required if creating a new uniswapV3 position.
liquidity amount to withdraw, or empty or 0 to withdraw all
whether to disable swapping with the aggregator
comma-separated list of sources to use for aggregator
comma-separated list of sources to exclude for aggregator
comma-separated list of pools to exclude for aggregator
options for getting aggregator routes the address of the fee recipient.
fee percentage in per cent mille (0.001% or 1 in 100,000). Ignored if feeAddress is empty. From 0 to 100,000 inclusively. Example: 1 for 0.001%.
maximum slippage tolerance in basis points (0.01%), used for aggregator (exceeding which the transaction will revert) and pool swap during zap (for additional zapping and for refund). From 0 to 10,000 inclusively. Example: 1 for 0.01%.
100
Client Id
zap-docs
Request Id
Returns the best route to zap-migrate from an existing position to the specified pool position.
Refer to https://docs.kyberswap.com/kyberswap-solutions/kyberswap-zap-as-a-service/zaps-supported-chains-dexes for list of supported dexes for each chain
DEX_UNISWAPV3
Available options: id of the pool to withdraw from.
id of the position to withdraw from
liquidity amount to withdraw, or empty or 0 to withdraw all
whether to disable swapping with the aggregator
comma-separated list of sources to use for aggregator
comma-separated list of sources to exclude for aggregator
comma-separated list of pools to exclude for aggregator
fee recipient
fee percentage in per cent mille (0.001% or 1 in 100,000). Ignored if feeAddress is empty. From 0 to 100,000 inclusively. Example: 1 for 0.001%.
maximum slippage tolerance in basis points (0.01%), used for aggregator (exceeding which the transaction will revert) and pool swap during zap (for additional zapping and for refund). From 0 to 10,000 inclusively. Example: 1 for 0.01%.
100
Client Id
zap-docs
Request Id
Returns the best route to zap-out from an existing position to the specified pool position.
Build encoded data for zap-out transaction from the specified route.
the wallet sending the transaction, and thus, the tokens.
the wallet receiving the new position. default to sender if empty.
the route as returned from get-route endpoint.
^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
deadline for the swap transaction to execute.
the source of the zap-out transaction.
whether to throw away the position NFT or keep it.
Returns the zap-out transaction details.
Client Id
zap-docs
Request Id
Build encoded data for zap-in transaction from the specified route.
the wallet sending the transaction, and thus, the tokens.
the wallet receiving the new position. default to sender if empty.
the route as returned from get-route endpoint.
^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
deadline for the swap transaction to execute.
the source of the zap-in transaction.
map of each token address to its ERC20 permit using EIP-2612 to skip a separate approval step.
Returns the zap-in transaction details.
{"code":0,"message":"OK","data":{"routerAddress":"0x6960f99e6F9A9A5EFcd44C5BaA3245aC2b145287","callData":"0x0779b145000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000600000000000000000000000002f5e87c9312fa29aed5c179e456625d79015299c000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000a2dfeb674d997b68ec5adb0a6fb9136bd45c2d2d000000000000000000000000000000000000000000000000000000000001d4c000000000000000000000000000000000000000000000000000000000000753000000000000000000000000000000000000000000000000000000010912662471000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022ad1a118075557c20d42f2de3feedb8d16a8ee6000000000000000000000000bde6709804b89497f378c7123d5362f8a24cb7f6000000000000000000000000000000000000000000000000000000006b49d20000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000ca00000000000000000000000000000000000000000000000000000000000000be00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000088000000000000000000000000000000000000000000000000000000000000000800000000000000000000000008aec70a335b4cb0c3c0866065d9c04c26cd749fa0000000000000000000000000000000000000000000000000001c6bf5263400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006131b5fae19ea4f9d964eac0408e4408b66337b500000000000000000000000000000000000000000000000006f035d38cbf350c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000644e21fd0e9000000000000000000000000000000000000000000000000000000000000002000000000000000000000000011ddd59c33c73c44733b4123a86ea5ce57f6e854000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000f1020100000029020000004bfc22a4da7f31f8a912a79a7e44a822398b4390000000000000000000b19efb8e131ef6010a010000002b0100000082670f35306253222f8a165869b28c64739ac62e010000000000000000063e96d7feac161600010982af49447d8a07e3bd95bd0d56f35241523fbab12f2a2543b76a4166549f7aab2e75bef0aefc5b0fbde6709804b89497f378c7123d5362f8a24cb7f60000000000000000000000006b49d2000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000285b4f00000000000000000000000000000000000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000002f2a2543b76a4166549f7aab2e75bef0aefc5b0f000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000bde6709804b89497f378c7123d5362f8a24cb7f600000000000000000000000000000000000000000000000006f035d38cbf350c000000000000000000000000000000000000000000000000000000000027f3fe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000100000000000000000000000011ddd59c33c73c44733b4123a86ea5ce57f6e854000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000006f035d38cbf350c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f97b22536f75726365223a227a61702d646f6373222c22416d6f756e74496e555344223a22313833352e38373838323235313139313031222c22416d6f756e744f7574555344223a22313833352e35303836363830393034393637222c22526566657272616c223a22222c22466c616773223a302c22496e74656772697479496e666f223a7b224b65794944223a2231222c225369676e6174757265223a224943644253394c714132676248584f6c557a3349626d75637a4679657755392f49796f70636d6875476a466e596b42377044773547585347592b2f5a4f4c664c4158795958346c4c797937384f525462307667714a695632677243706c36304a52796e4338443078724d73786e44446f764f646d592b6a6e71456d615670374b664b4b45526348744f30784f4f7472776f38537a73757a4c3672384a6b716f416558335a744f6b705a4a7a4e65694843612f4971384d6938345a792b597044726e7769766b714a524a535464665950787745704b62757a6c484a6165717a445276554f4f4d5556727344643276426b45377771536b6a6e69437a784665365076374c65366c49474c784c36314b4156484e4a3343667675702f54464c386f4c6a36417a547535415a3958533034377a56574266484a4a4379326d536e7236475778536e6635536157724c734f78776b7a344a665752513d3d227d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe880000000000000000000000002f5e87c9312fa29aed5c179e456625d79015299c0000000000000000000000002f2a2543b76a4166549f7aab2e75bef0aefc5b0f00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2dfeb674d997b68ec5adb0a6fb9136bd45c2d2d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000108000000000000000000000000000000900000000000000000000000000000000100000000000000000000000000000001000000000000000000000000000000000000000000000000000000000001d4c000000000000000000000000000000000000000000000000000000000000753000000000000000000000000000000000000069118042346bcd79b11b76147d0ab000000000000000000000000000000000006b33a11557d53e337f572e1d50a4b0000000000000000000000000000000000000000000000000000010912662471000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000005d8fcbe11af100000000000000000000000000285a4600000000000000000000000000285c57000000000000000006ee8cb1ee542c44000000000000000006eee790cbf67b7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a213163b1c66b70364a5f1403ef0000000000000000000000000000000000000000000000000000000000003f64d000000000000000000000000000000000000000000000000075982b768bcece70000000000000000000000000000000000000000000000000000000000000000","value":"1000000000000000000"},"requestId":"b8c105304e178953e36021af9b26f3da"}
Build encoded data for zap-migrate transaction from the specified route.
the wallet sending the transaction, and thus, the tokens.
the wallet receiving the new position. default to sender if empty.
the route as returned from get-route endpoint.
^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
deadline for the swap transaction to execute.
the source of the zap-migrate transaction.
whether to throw away the position NFT or keep it.
Returns the zap-migrate transaction details.