OasisDEX

Decentralised Exchange

OasisDEX connector triggers the methods like buy and sell tokens You can view details like source code, ABIs on Etherscan.

  • 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]
});
ParameterTypeDescription
buy_tokenaddressThe token address to buy.
sell_tokenaddressThe token address to sell.
buy_amtnumberThe amount of tokens to buy.
unit_amtnumbersell token amt per buy token
getIdnumberID fetches the amount of token to deposit.
setIdnumberID 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]
});
ParameterTypeDescription
buy_tokenaddressThe token address to buy.
sell_tokenaddressThe token address to sell.
sell_amtnumberThe amount of tokens to sell.
unit_amtnumberbuy token amt per sell token
getIdnumberID fetches the amount of token to deposit.
setIdnumberID stores the amount of token deposited.

If you still can't find something you're looking for or have any questions, ask them at our developers community on Telegram, Discord or simply send an Email.

Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.

Best way to stay connected with our progress.