Posting bids and asks
Using the API to post Maker orders on a Mangrove Market.
// gives unlimited approval to Mangrove to transfer Base token from liquidity provider's logic/EOA
let tx = await mgvLP.approveMangroveForBase();
await tx.wait(); // waiting for tx confirmation
// querying mangrove to know the bounty for posting a new Ask on `market`
let prov = await mgvLP.computeAskProvision();
tx = await mgvLP.fundMangrove(prov);
await tx.wait();
// posting a new Ask on Mangrove
const {id:ofrId} = await mgvLP.newAsk({volume:1000, price:0.99});
const {id:ofrId_} = await mgvLP.newBid({volume:1000, price: 1.01});Last updated
Was this helpful?