OasisDEX

Interact with 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.

Last updated