Learn how to use Manifest protocol for market making and trading
Ping Agent Kit provides comprehensive integration with Manifest protocol for creating markets, placing orders, and managing trades. The integration supports various order types, batch orders, and market management functions.
"Create a new SOL/USDC market"
"Setup a trading market for BONK/USDC"
"Place a limit buy order for 1.5 SOL at $25.5"
"Create 5 buy orders totaling 100 tokens, 1% apart below $1"
"Place sell orders of 10 tokens each between $50-$55"
"Cancel all my orders in the SOL/USDC market"
"Withdraw all funds from the BONK/USDC market"
// Always specify both base and quote tokens
const [signature, marketId] = await agent.methods.manifestCreateMarket(
baseMint,
quoteMint
);
// Use batch orders instead of multiple single orders
const orders = generateOrdersfromPattern({
side: "Buy",
totalQuantity: 100,
priceRange: { min: 24, max: 25 },
numberOfOrders: 5
});
// Cancel orders before withdrawing
await agent.methods.cancelAllOrders(marketId);
await agent.methods.withdrawAll(marketId);