Swift Place-and-Make
Complete the Swift MM flow by submitting the signed taker order and your maker fill on-chain (place-and-make). The on-chain program expects an ed25519 verification instruction before the “place signed taker order” instruction (transaction introspection). The SDK provides helpers to build the required instruction sequence.
Build ixs with DriftClient (recommended)
const ixs = await driftClient.getPlaceAndMakeSignedMsgPerpOrderIxs(
signedSignedMsgOrderParams,
signedMsgOrderUuid,
takerInfo,
makerOrderParams
);Method DriftClient.getPlaceAndMakeSignedMsgPerpOrderIxsReference ↗const txSig = await driftClient.placeAndMakeSignedMsgPerpOrder(
signedSignedMsgOrderParams,
signedMsgOrderUuid,
takerInfo,
makerOrderParams
);
console.log(txSig);Method DriftClient.placeAndMakeSignedMsgPerpOrderReference ↗Build maker params from the incoming order
For convenience, use helper builders like getLimitOrderParams(...) to create the maker order params you want to place.
import { getLimitOrderParams } from "@drift-labs/sdk";Function getLimitOrderParamsReference ↗| Name | Type | Default |
|---|---|---|
params | Omit<OptionalOrderParams, "orderType"> & { price: BN; } |
Last updated on