sellMarketAmount
The sellMarketAmount()
method of Nectar
instances places a sell market order on the given market.
Usage
import { Nectar } from "@wasd3rplay/nectar-sdk";
const nectar = new Nectar();
const symbol = "WETH_ETHSEPOLIA:USDT_ETHSEPOLIA";
const market = await nectar.getMarket(symbol);
const orderId = await nectar.sellMarketAmount(market, "0.42");
Parameters
market: Market
A market to trade on.
amount: string
The amount of base token you want to sell.
signer?: Wallet
Optional
Default to
userWallet
property ofNectar
instances.A wallet placing the order.
Returns
string
An order ID, which is a unique value created by Nectar.
Last updated