Sell and buy orders
Using the API to pass taker orders on a Mangrove market.
// buy limit order for 100 base tokens at an average price of 0.1 quote per base
const buyResult = mgvMarket.buy({volume:100, price:0.1, slippage:2});
// limit order with a desired quantitiy
const buyResult_ = mgvMarket.buy({wants:100, gives:1000, slippage:2});
// sell limit order (selling 10 base tokens).
const sellResult = mgvMarket.sell({volume:10, price: 0.09, slippage:2});Last updated
Was this helpful?