> For the complete documentation index, see [llms.txt](https://instadapp-3.gitbook.io/instadapp-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://instadapp-3.gitbook.io/instadapp-docs/dsa-sdk/resolvers/1inch.md).

# 1inch

1inch Resolver to get buy and sell details. You can view details like source code, ABIs on [Etherscan](https://etherscan.io/address/0x16F0a50305c6aCf1A44A3DAa225531e731f39A9F#code).

## Get buy amount

Get buy token details like amount and unit amount

```
dsa.oneInch.getBuyAmount(buyToken, sellToken, sellAmt, slippage, distribution, disableDexes);
```

| Parameter    | Type    | Description                                                                               |
| ------------ | ------- | ----------------------------------------------------------------------------------------- |
| buyToken     | address | The buy token symbol.                                                                     |
| sellToken    | address | The sell token symbol.                                                                    |
| sellAmt      | number  | The amount of tokens to sells.                                                            |
| slippage     | number  | The slippage in percent eg - 1 means 1%, 10 means 10%, etc                                |
| distribution | array   | (Optional) If not defined, default will be used. The distribution of DEXs to swap accross |
| disableDexes | number  | (Optional) If not all DEXs will stay enabled. The number of DEXs to disable.              |

**Returns:** `Object` of sell token details

```
{
  buyAmt: "2208.0499999999997",
  buyAmtRaw: "2208050000000000000000",
  unitAmt: "216388900000000000000",
  distribution: ["0", "0", ..]
}
```

| Return Parameter | Type          | Description                                                                                                                                                                      |
| ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| buyAmt           | number/string | Expected buy token amount.                                                                                                                                                       |
| buyAmtRaw        | number/string | Expected buy token amount in decimal form.                                                                                                                                       |
| unitAmt          | number/string | The unit amount is the minimum amount of buy token expected per sell token. It is calculated with the help of slippage. The parameter is passed directly in the kyber connector. |
| distribution     | array         | The distribution of swap across differnt DEXs.                                                                                                                                   |
