ZaaS HTTP API
HTTP API doc for ZaaS API
Last updated
HTTP API doc for ZaaS API
Last updated
Please refer to the following server configuration and openapi file for the http API.
Base URL
https://zap-api.kyberswap.com/{chain}
where chain is one of the supported chain. For example: https://zap-api.kyberswap.com/arbitrum
Header X-Client-Id
Some value to identify your client.
Please contact bd@kyber.network to whitelist your client id with more rate limit quota
Please refer to Zap's DEX IDs and Zap's Supported Chains/Dexes for list of supported DEXes for each chain and their corresponding IDs
curl -X GET "https://zap-api.kyberswap.com/polygon/api/v1/in/route?dex=DEX_UNISWAPV3&pool.id=0xb46388f104ff88aac68626a316aaf3a924f32055&position.tickLower=-24800&position.tickUpper=32400&tokensIn=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&amountsIn=1000000000000000000&slippage=100" \
-H "accept: application/json"\
-H "x-client-id: zap-docs"
fetch('https://zap-api.kyberswap.com/polygon/api/v1/in/route?dex=DEX_UNISWAPV3&pool.id=0xb46388f104ff88aac68626a316aaf3a924f32055&position.tickLower=-24800&position.tickUpper=32400&tokensIn=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&amountsIn=1000000000000000000&slippage=100', {
headers: {
'accept': 'application/json',
'x-client-id': 'zap-docs'
}
});
import requests
headers = {
'accept': 'application/json',
'x-client-id': 'zap-docs',
}
params = {
'dex': 'DEX_UNISWAPV3',
'pool.id': '0xb46388f104ff88aac68626a316aaf3a924f32055',
'position.tickLower': '-24800',
'position.tickUpper': '32400',
'tokensIn': '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
'amountsIn': '1000000000000000000',
'slippage': '100',
}
response = requests.get('https://zap-api.kyberswap.com/polygon/api/v1/in/route', params=params, headers=headers)
require 'net/http'
uri = URI('https://zap-api.kyberswap.com/polygon/api/v1/in/route?dex=DEX_UNISWAPV3&pool.id=0xb46388f104ff88aac68626a316aaf3a924f32055&position.tickLower=-24800&position.tickUpper=32400&tokensIn=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&amountsIn=1000000000000000000&slippage=100')
req = Net::HTTP::Get.new(uri)
req['accept'] = 'application/json'
req['x-client-id'] = 'zap-docs'
req_options = {
use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(req)
end
curl -X POST "https://zap-api.kyberswap.com/polygon/api/v1/in/route/build" \
-H "accept: application/json"\
-H "content-type: application/json"\
-H "x-client-id: zap-docs" \
-d '{"sender":"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270","recipient":"0x5cb738DAe833Ec21fe65ae1719fAd8ab8cE7f23D","route":"KLUv/WALBWUVAKavgSFAb9qflX03+n9Wj9hEtiy3sD717uBIcklIUtb9UBVFASZwAG8AewCseGGDZz+f91M98txGAZqZqQsXPJhqdXGMHUIosW9O3X9D9ykvz587bZntFA+ybObckq051tD33d6immunvvu1fJ584ZaJB7tzeUH7jBfGkjJLmzw1GHNfFpS6uHNC7SJxoQMzFkbw7EKHR7EubGBGFDwMD76LRM+krFq9qkyNUC9kEi1HIhRHC7BQ8iwgDMREw9E88FRyoQUe3d1X1WmZdd13nzPVJkbpFzKe9ImUFau7UkkdoU7rrkob/cLF8yr1lzvRdntKumohg+d/c1MyvypzJ3ZnVvmqUP/CCZ4MFRR4b3mPgEmai5fykypW/M+uUGc6UqjV+vaERXQuLpywCFTMSWW+a2rki1JyJv301E6EuKEkvAnDloWPaYxxsAqB13BIFJo3IWEHB3k7n1FCrqvSKw5wk4ZUrp6p7OnTanbzoEAo2KPg8SYgEsWHb+4OUMcV4GmAOiwMlcrDQ6WC3tilpdQOpUrWinl/I8SaO19ljaGwCjy58OK5R0HTdAWK0Cu13SgoCBMNCNMGIhgMvlCiiXg8g4PuNRIRjmcBsBUAktd4MIa1iAeTaFy8CLOY4HlIKM1baBwUDqZ/XfvWqSrba5ma77q5X5V6i/o178ZAIBHMcHBY+BoKRIInQCBAAkOIkfEBRAi1htoyA+Fh2bFWvRh8hvz97PowAKx1qdsQ5xjp2pgs22UIOyQAShdlhjfwZzCdB+z1ohnGvFnSTTKxnORd4epZFuIeA+w2wAw7LgAorNLwQsqNf+xgg82V4vgsD37S9QzcQQb7FtadgPK3lKx7U4HBskxWQGuCP0HydKwMJ+YSsBBVIoM2YptDA0F2jZS8pJQuID3loJeJAg==","deadline":1800000000,"source":"zap-docs"}'
fetch('https://zap-api.kyberswap.com/polygon/api/v1/in/route/build', {
method: 'POST',
headers: {
'accept': 'application/json',
'content-type': 'application/json',
'x-client-id': 'zap-docs'
},
body: JSON.stringify({
'sender': '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
'recipient': '0x5cb738DAe833Ec21fe65ae1719fAd8ab8cE7f23D',
'route': 'KLUv/WALBWUVAKavgSFAb9qflX03+n9Wj9hEtiy3sD717uBIcklIUtb9UBVFASZwAG8AewCseGGDZz+f91M98txGAZqZqQsXPJhqdXGMHUIosW9O3X9D9ykvz587bZntFA+ybObckq051tD33d6immunvvu1fJ584ZaJB7tzeUH7jBfGkjJLmzw1GHNfFpS6uHNC7SJxoQMzFkbw7EKHR7EubGBGFDwMD76LRM+krFq9qkyNUC9kEi1HIhRHC7BQ8iwgDMREw9E88FRyoQUe3d1X1WmZdd13nzPVJkbpFzKe9ImUFau7UkkdoU7rrkob/cLF8yr1lzvRdntKumohg+d/c1MyvypzJ3ZnVvmqUP/CCZ4MFRR4b3mPgEmai5fykypW/M+uUGc6UqjV+vaERXQuLpywCFTMSWW+a2rki1JyJv301E6EuKEkvAnDloWPaYxxsAqB13BIFJo3IWEHB3k7n1FCrqvSKw5wk4ZUrp6p7OnTanbzoEAo2KPg8SYgEsWHb+4OUMcV4GmAOiwMlcrDQ6WC3tilpdQOpUrWinl/I8SaO19ljaGwCjy58OK5R0HTdAWK0Cu13SgoCBMNCNMGIhgMvlCiiXg8g4PuNRIRjmcBsBUAktd4MIa1iAeTaFy8CLOY4HlIKM1baBwUDqZ/XfvWqSrba5ma77q5X5V6i/o178ZAIBHMcHBY+BoKRIInQCBAAkOIkfEBRAi1htoyA+Fh2bFWvRh8hvz97PowAKx1qdsQ5xjp2pgs22UIOyQAShdlhjfwZzCdB+z1ohnGvFnSTTKxnORd4epZFuIeA+w2wAw7LgAorNLwQsqNf+xgg82V4vgsD37S9QzcQQb7FtadgPK3lKx7U4HBskxWQGuCP0HydKwMJ+YSsBBVIoM2YptDA0F2jZS8pJQuID3loJeJAg==',
'deadline': 1800000000,
'source': 'zap-docs'
})
});
import requests
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-client-id': 'zap-docs',
}
json_data = {
'sender': '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
'recipient': '0x5cb738DAe833Ec21fe65ae1719fAd8ab8cE7f23D',
'route': 'KLUv/WALBWUVAKavgSFAb9qflX03+n9Wj9hEtiy3sD717uBIcklIUtb9UBVFASZwAG8AewCseGGDZz+f91M98txGAZqZqQsXPJhqdXGMHUIosW9O3X9D9ykvz587bZntFA+ybObckq051tD33d6immunvvu1fJ584ZaJB7tzeUH7jBfGkjJLmzw1GHNfFpS6uHNC7SJxoQMzFkbw7EKHR7EubGBGFDwMD76LRM+krFq9qkyNUC9kEi1HIhRHC7BQ8iwgDMREw9E88FRyoQUe3d1X1WmZdd13nzPVJkbpFzKe9ImUFau7UkkdoU7rrkob/cLF8yr1lzvRdntKumohg+d/c1MyvypzJ3ZnVvmqUP/CCZ4MFRR4b3mPgEmai5fykypW/M+uUGc6UqjV+vaERXQuLpywCFTMSWW+a2rki1JyJv301E6EuKEkvAnDloWPaYxxsAqB13BIFJo3IWEHB3k7n1FCrqvSKw5wk4ZUrp6p7OnTanbzoEAo2KPg8SYgEsWHb+4OUMcV4GmAOiwMlcrDQ6WC3tilpdQOpUrWinl/I8SaO19ljaGwCjy58OK5R0HTdAWK0Cu13SgoCBMNCNMGIhgMvlCiiXg8g4PuNRIRjmcBsBUAktd4MIa1iAeTaFy8CLOY4HlIKM1baBwUDqZ/XfvWqSrba5ma77q5X5V6i/o178ZAIBHMcHBY+BoKRIInQCBAAkOIkfEBRAi1htoyA+Fh2bFWvRh8hvz97PowAKx1qdsQ5xjp2pgs22UIOyQAShdlhjfwZzCdB+z1ohnGvFnSTTKxnORd4epZFuIeA+w2wAw7LgAorNLwQsqNf+xgg82V4vgsD37S9QzcQQb7FtadgPK3lKx7U4HBskxWQGuCP0HydKwMJ+YSsBBVIoM2YptDA0F2jZS8pJQuID3loJeJAg==',
'deadline': 1800000000,
'source': 'zap-docs',
}
response = requests.post('https://zap-api.kyberswap.com/polygon/api/v1/in/route/build', headers=headers, json=json_data)
require 'net/http'
require 'json'
uri = URI('https://zap-api.kyberswap.com/polygon/api/v1/in/route/build')
req = Net::HTTP::Post.new(uri)
req.content_type = 'application/json'
req['accept'] = 'application/json'
req['x-client-id'] = 'zap-docs'
req.body = {
'sender' => '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
'recipient' => '0x5cb738DAe833Ec21fe65ae1719fAd8ab8cE7f23D',
'route' => 'KLUv/WALBWUVAKavgSFAb9qflX03+n9Wj9hEtiy3sD717uBIcklIUtb9UBVFASZwAG8AewCseGGDZz+f91M98txGAZqZqQsXPJhqdXGMHUIosW9O3X9D9ykvz587bZntFA+ybObckq051tD33d6immunvvu1fJ584ZaJB7tzeUH7jBfGkjJLmzw1GHNfFpS6uHNC7SJxoQMzFkbw7EKHR7EubGBGFDwMD76LRM+krFq9qkyNUC9kEi1HIhRHC7BQ8iwgDMREw9E88FRyoQUe3d1X1WmZdd13nzPVJkbpFzKe9ImUFau7UkkdoU7rrkob/cLF8yr1lzvRdntKumohg+d/c1MyvypzJ3ZnVvmqUP/CCZ4MFRR4b3mPgEmai5fykypW/M+uUGc6UqjV+vaERXQuLpywCFTMSWW+a2rki1JyJv301E6EuKEkvAnDloWPaYxxsAqB13BIFJo3IWEHB3k7n1FCrqvSKw5wk4ZUrp6p7OnTanbzoEAo2KPg8SYgEsWHb+4OUMcV4GmAOiwMlcrDQ6WC3tilpdQOpUrWinl/I8SaO19ljaGwCjy58OK5R0HTdAWK0Cu13SgoCBMNCNMGIhgMvlCiiXg8g4PuNRIRjmcBsBUAktd4MIa1iAeTaFy8CLOY4HlIKM1baBwUDqZ/XfvWqSrba5ma77q5X5V6i/o178ZAIBHMcHBY+BoKRIInQCBAAkOIkfEBRAi1htoyA+Fh2bFWvRh8hvz97PowAKx1qdsQ5xjp2pgs22UIOyQAShdlhjfwZzCdB+z1ohnGvFnSTTKxnORd4epZFuIeA+w2wAw7LgAorNLwQsqNf+xgg82V4vgsD37S9QzcQQb7FtadgPK3lKx7U4HBskxWQGuCP0HydKwMJ+YSsBBVIoM2YptDA0F2jZS8pJQuID3loJeJAg==',
'deadline' => 1800000000,
'source' => 'zap-docs'
}.to_json
req_options = {
use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(req)
end
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.
A successful response.
Encompasses returned data.
const response = await fetch('https://zap-api.kyberswap.com/arbitrum/api/v1/migrate/route/build', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({}),
});
const data = await response.json();
{
"code": 0,
"message": "text",
"data": {
"routerAddress": "text",
"callData": "text",
"value": "text"
},
"requestId": "text"
}
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.
A successful response.
Encompasses returned data.
const response = await fetch('https://zap-api.kyberswap.com/arbitrum/api/v1/in/route/build', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"sender": "0xa2DFeb674d997b68ec5adB0A6fb9136BD45C2D2d",
"recipient": "0xa2DFeb674d997b68ec5adB0A6fb9136BD45C2D2d",
"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==",
"deadline": 1800000000,
"source": "zap-docs"
}),
});
const data = await response.json();
{
"code": 0,
"message": "OK",
"data": {
"routerAddress": "0x6960f99e6F9A9A5EFcd44C5BaA3245aC2b145287",
"callData": "0x0779b145000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000600000000000000000000000002f5e87c9312fa29aed5c179e456625d79015299c000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000a2dfeb674d997b68ec5adb0a6fb9136bd45c2d2d000000000000000000000000000000000000000000000000000000000001d4c000000000000000000000000000000000000000000000000000000000000753000000000000000000000000000000000000000000000000000000010912662471000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022ad1a118075557c20d42f2de3feedb8d16a8ee6000000000000000000000000bde6709804b89497f378c7123d5362f8a24cb7f6000000000000000000000000000000000000000000000000000000006b49d20000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000ca00000000000000000000000000000000000000000000000000000000000000be00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000088000000000000000000000000000000000000000000000000000000000000000800000000000000000000000008aec70a335b4cb0c3c0866065d9c04c26cd749fa0000000000000000000000000000000000000000000000000001c6bf5263400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006131b5fae19ea4f9d964eac0408e4408b66337b500000000000000000000000000000000000000000000000006f035d38cbf350c00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000644e21fd0e9000000000000000000000000000000000000000000000000000000000000002000000000000000000000000011ddd59c33c73c44733b4123a86ea5ce57f6e854000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000f1020100000029020000004bfc22a4da7f31f8a912a79a7e44a822398b4390000000000000000000b19efb8e131ef6010a010000002b0100000082670f35306253222f8a165869b28c64739ac62e010000000000000000063e96d7feac161600010982af49447d8a07e3bd95bd0d56f35241523fbab12f2a2543b76a4166549f7aab2e75bef0aefc5b0fbde6709804b89497f378c7123d5362f8a24cb7f60000000000000000000000006b49d2000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000285b4f00000000000000000000000000000000000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000002f2a2543b76a4166549f7aab2e75bef0aefc5b0f000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000bde6709804b89497f378c7123d5362f8a24cb7f600000000000000000000000000000000000000000000000006f035d38cbf350c000000000000000000000000000000000000000000000000000000000027f3fe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000100000000000000000000000011ddd59c33c73c44733b4123a86ea5ce57f6e854000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000006f035d38cbf350c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f97b22536f75726365223a227a61702d646f6373222c22416d6f756e74496e555344223a22313833352e38373838323235313139313031222c22416d6f756e744f7574555344223a22313833352e35303836363830393034393637222c22526566657272616c223a22222c22466c616773223a302c22496e74656772697479496e666f223a7b224b65794944223a2231222c225369676e6174757265223a224943644253394c714132676248584f6c557a3349626d75637a4679657755392f49796f70636d6875476a466e596b42377044773547585347592b2f5a4f4c664c4158795958346c4c797937384f525462307667714a695632677243706c36304a52796e4338443078724d73786e44446f764f646d592b6a6e71456d615670374b664b4b45526348744f30784f4f7472776f38537a73757a4c3672384a6b716f416558335a744f6b705a4a7a4e65694843612f4971384d6938345a792b597044726e7769766b714a524a535464665950787745704b62757a6c484a6165717a445276554f4f4d5556727344643276426b45377771536b6a6e69437a784665365076374c65366c49474c784c36314b4156484e4a3343667675702f54464c386f4c6a36417a547535415a3958533034377a56574266484a4a4379326d536e7236475778536e6635536157724c734f78776b7a344a665752513d3d227d7d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe880000000000000000000000002f5e87c9312fa29aed5c179e456625d79015299c0000000000000000000000002f2a2543b76a4166549f7aab2e75bef0aefc5b0f00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2dfeb674d997b68ec5adb0a6fb9136bd45c2d2d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000108000000000000000000000000000000900000000000000000000000000000000100000000000000000000000000000001000000000000000000000000000000000000000000000000000000000001d4c000000000000000000000000000000000000000000000000000000000000753000000000000000000000000000000000000069118042346bcd79b11b76147d0ab000000000000000000000000000000000006b33a11557d53e337f572e1d50a4b0000000000000000000000000000000000000000000000000000010912662471000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000005d8fcbe11af100000000000000000000000000285a4600000000000000000000000000285c57000000000000000006ee8cb1ee542c44000000000000000006eee790cbf67b7c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a213163b1c66b70364a5f1403ef0000000000000000000000000000000000000000000000000000000000003f64d000000000000000000000000000000000000000000000000075982b768bcece70000000000000000000000000000000000000000000000000000000000000000",
"value": "1000000000000000000"
},
"requestId": "b8c105304e178953e36021af9b26f3da"
}
A successful response.
Encompasses returned data.
OK
Encompasses returned data.
const response = await fetch('https://zap-api.kyberswap.com/arbitrum/api/v1/in/route', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"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"
}
const response = await fetch('https://zap-api.kyberswap.com/arbitrum/api/v1/migrate/route', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"code": 0,
"message": "text",
"data": {
"poolDetails": {
"category": "text",
"uniswapV3": {
"tick": 0,
"newTick": 0,
"sqrtP": "text",
"newSqrtP": "text"
},
"uniswapV2": {
"reserve0": "text",
"newReserve0": "text",
"reserve1": "text",
"newReserve1": "text"
},
"algebraV1": {
"tick": 0,
"newTick": 0,
"sqrtP": "text",
"newSqrtP": "text"
}
},
"positionDetails": {
"removedLiquidity": "text",
"removedAmountUsd": "text",
"addedLiquidity": "text",
"addedAmountUsd": "text"
},
"zapDetails": {
"initialAmountUsd": "text",
"actions": [
{
"type": "ACTION_TYPE_UNSPECIFIED",
"protocolFee": {
"pcm": 0,
"tokens": [
{
"address": "text",
"amount": "text",
"amountUsd": "text"
}
]
},
"partnerFee": {
"pcm": 0,
"tokens": [
{
"address": "text",
"amount": "text",
"amountUsd": "text"
}
]
},
"aggregatorSwap": {
"swaps": [
{
"tokenIn": {
"address": "text",
"amount": "text",
"amountUsd": "text"
},
"tokenOut": {
"address": "text",
"amount": "text",
"amountUsd": "text"
}
}
]
},
"poolSwap": {
"swaps": [
{
"tokenIn": {
"address": "text",
"amount": "text",
"amountUsd": "text"
},
"tokenOut": {
"address": "text",
"amount": "text",
"amountUsd": "text"
}
}
]
},
"addLiquidity": {
"tokens": [
{
"address": "text",
"amount": "text",
"amountUsd": "text"
}
],
"fees": [
{
"address": "text",
"amount": "text",
"amountUsd": "text"
}
],
"token0": {
"address": "text",
"amount": "text",
"amountUsd": "text"
},
"token1": {
"address": "text",
"amount": "text",
"amountUsd": "text"
}
},
"removeLiquidity": {
"tokens": [
{
"address": "text",
"amount": "text",
"amountUsd": "text"
}
],
"fees": [
{
"address": "text",
"amount": "text",
"amountUsd": "text"
}
],
"token0": {
"address": "text",
"amount": "text",
"amountUsd": "text"
},
"token1": {
"address": "text",
"amount": "text",
"amountUsd": "text"
}
},
"refund": {
"tokens": [
{
"address": "text",
"amount": "text",
"amountUsd": "text"
}
]
}
}
],
"finalAmountUsd": "text",
"priceImpact": 0
},
"route": "Ynl0ZXM=",
"routerAddress": "text",
"gas": "text",
"gasUsd": "text"
},
"requestId": "text"
}