Exit Market
Exits the user's address from a Onyx Protocol market.
market(string) A string of the symbol of the market to exit.[options](CallOptions) Call options and Ethers.js overrides for the transaction. A passedgasLimitwill be used in both theapprove(if not supressed) andminttransactions.RETURN(object) Returns an Ethers.js transaction object of the exitMarket transaction.
const onyx = new Onyx(window.ethereum);
(async function () {
const trx = await onyx.exitMarket(Onyx.ETH);
console.log('Ethers.js transaction object', trx);
})().catch(console.error);Last updated