buyLimit
The buyLimit()
method of Nectar
instances places a buy limit 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.buyLimit(market, "3648.23", "0.1146");
Parameters
market: Market
A market to trade on.
price: string
The price at which you are willing to buy an asset (base token).
amount: string
The amount of asset (base token) you want to buy.
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