Get calculated making amount on trading pair by provided amount

GEThttps://api.1inch.com/orderbook/v4.1/{chain}/fee-info
Supported on:
EthereumBaseBNB ChainUnichainArbitrumAvalancheZKsyncGnosisOptimismPolygonLineaSonic

Parameters

chain
* number path
makerAsset
* string query
takerAsset
* string query
makerAmount
string query
takerAmount
string query

Request Body

This request doesn’t have any request body.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const axios = require('axios');

async function httpCall() {
  const url = 'https://api.1inch.com/orderbook/v4.1/{chain}/fee-info';

  const config = {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
    },
    params: {
      makerAsset: '0x459086f2376525bdceba5bdda135e4e9d3fef5bf',
      takerAsset: '0xdac17f958d2ee523a2206206994597c13d831ec7',
      makerAmount: '1000000000000000000',
      takerAmount: '1000000000000000000',
    },
    paramsSerializer: {
      indexes: null,
    },
  };
  const body = {};

  try {
    const response = await axios.get(url, body, config);
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
}

Returns

default
FeeInfoResponse object
whitelist
* any
allOf[0]
WhitelistedResolvers object
feeBps
* number
whitelistDiscountPercent
* number
protocolFeeReceiver
* any
allOf[0]
AccountAddress object
extensionAddress
* any
allOf[0]
AccountAddress object
JSON
1
2
3
4
5
6
7
8
{
  "whitelist": {},
  "feeBps": 0,
  "whitelistDiscountPercent": 0,
  "protocolFeeReceiver": {},
  "extensionAddress": {}
}

Did you find what you need?