> 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/oasis.md).

# OasisDex

OasisDEX connector triggers the methods like buy and sell tokens You can view details like source code, ABIs on [Etherscan](https://etherscan.io/address/0x57118572267072fcaEe72b15aE18B07A8b0d6144#code).

* Use `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` to indicate ETH.
* Slippage amount is in percentage. For example, use `2 * 10 ** 16` to denote 2%.
* If not sure about the arguments `getId` and `setId`, pass 0.

## Buy

Buy tokens

```
spells.add({
  connector: "oasis",
  method: "buy",
  args: [buy_token, sell_token, buy_amt, unit_amt, getId, setId]
});
```

| Parameter   | Type    | Description                                |
| ----------- | ------- | ------------------------------------------ |
| buy\_token  | address | The token address to buy.                  |
| sell\_token | address | The token address to sell.                 |
| buy\_amt    | number  | The amount of tokens to buy.               |
| unit\_amt   | number  | sell token amt per buy token               |
| getId       | number  | ID fetches the amount of token to deposit. |
| setId       | number  | ID stores the amount of token deposited.   |

## Sell

Sell tokens

```
spells.add({
  connector: "oasis",
  method: "sell",
  args: [buy_token, sell_token, sell_amt, unit_amt, getId, setId]
});
```

| Parameter   | Type    | Description                                |
| ----------- | ------- | ------------------------------------------ |
| buy\_token  | address | The token address to buy.                  |
| sell\_token | address | The token address to sell.                 |
| sell\_amt   | number  | The amount of tokens to sell.              |
| unit\_amt   | number  | buy token amt per sell token               |
| getId       | number  | ID fetches the amount of token to deposit. |
| setId       | number  | ID stores the amount of token deposited.   |
