Dexible SDK v2.0
  • Dexible API & SDK v2.0
  • Overview
    • How Dexible Works
      • Costs
      • Verification and Validation
  • Modules
  • Major SDK Components
    • DEX Filters
    • Token
    • Quotes
    • Algos
      • Market
      • Limit
      • Stop Price Algos
      • Take Profit
      • TrailingStop
      • TWAP
    • Swap Order
  • Policies
  • Policy Overview
    • Custom Algos
  • Reporting
    • Summary Reports
    • Auditable Records
Powered by GitBook
On this page

Was this helpful?

  1. Major SDK Components
  2. Algos

Market

This is the simplest order type since it has very few required parameters. It's also the riskiest since it leaves the execution exposed to whatever the market price is for the tokens being swapped. Here is an example of a market order:

const mkt = new MarketSwap({
    amountIn:  units.inBNUnits("1", 18),
    tokenOut: matic,
    tokenIn: weth,
    slippage: new Slippage(.5, false)
});

That's it. The tokens, amount of input, and slippage are all that's needed to get a quote and submit for execution.

PreviousAlgosNextLimit

Last updated 2 years ago

Was this helpful?