# OasisDEX

OasisDEX is a decentralized exchange protocol.  These connectors allow you to buy and sell tokens through OasisDEX.

## Buy Order

This connector buys tokens on OasisDEX using a buy order

```
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 Order

This connector sell tokens on OasisDEX using a sell order

```
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.   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://instadapp-3.gitbook.io/instadapp-docs/dsa-sdk/connectors/oasis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
