Assets Listing
Workflow for listing creation, fetching and deletion.
post
Prepare listing
Body
receiverstringRequired
sellerAddressstringRequired
marketTypestringRequired
Only support "token" for now.
tickerstringRequired
isAfterSplitbooleanOptional
Responses
200Success
psbtstringRequired
Unsigned psbt to be signed by client
bidIdsstring[]Required
post
/market/v1/bid/bulk-new200Success
import { Psbt, Transaction } from "bitcoinjs-lib";
const sellerPsbt = Psbt.fromHex(psbt);
const toSignInputs = sellerPsbt.data.inputs.map((_, index) => ({
address, // seller address
index,
sighashTypes: [
Transaction.SIGHASH_SINGLE | Transaction.SIGHASH_ANYONECANPAY,
],
}));
// injectProvider could be unisat (https://docs.unisat.io/dev/unisat-wallet-api)
const signedSellerPsbt = await injectProvider.signPsbt(psbt, {
autoFinalized: false,
toSignInputs: toSignInputs,
});post
Confirm listing
Body
psbtstringRequired
Signed psbt
bidIdsstring[]Required
Responses
200Success
successbooleanRequired
post
/market/v1/bid/bulk-confirm200Success
get
Get listing history by wallet and ticker. Deprecated, use /:market/:wallet/listing instead.
Path parameters
marketanyRequired
"token"|"collection|"realm"
Query parameters
offsetanyOptional
limitanyOptional
tickerstringOptional
walletstringRequired
Responses
200Success
totalnumberRequired
get
/market/v1/{market}/listHistory200Success
post
Path parameters
marketanyRequired
"token"|"collection|"realm"
Body
bidstringRequired
pubkeystringRequired
sigstringRequired
From signing the message: "You are signing this message to unlist your asset (Listing ID: [:bidId]) from AM.
Responses
200Success
successbooleanRequired
post
/market/v1/{market}/unlist200Success
Last updated