Atomicals Market
  • API
    • Overview
    • Guides
      • Assets Listing
      • Assets Buying
      • Error Codes
      • Token split upgrade
Powered by GitBook
On this page
  1. API
  2. Guides

Assets Buying

Workflow for assets buying.

PreviousAssets ListingNextError Codes

Last updated 1 year ago

  1. Prepare buying

  1. Client sign psbt from last step's response

const signedPsbt = await unisat.signPsbt(psbt, {
	autoFinalized: false
})
  1. Confirm buying psbt in the post body is last step's signedPsbt

  • POST/market/v1/{market}/bulk-buy
  • POST/market/v1/bid/bulk-confirm
post

Prepare buy

Path parameters
marketanyRequired

"token"|"collection|"realm"

Body
bidIdsstring[]Required
buyerstringRequired
gasRateany ofRequired
string ยท numericOptionalDefault: 0
or
numberOptional
isExpressBuybooleanOptional
receiverstringOptional
Responses
200Success
post
POST /market/v1/{market}/bulk-buy HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 119

{
  "bidIds": [
    "text"
  ],
  "buyer": "text",
  "gasRate": 0,
  "isExpressBuy": true,
  "receiver": "text",
  "utxos": [
    {
      "txid": "text",
      "vout": 1
    }
  ]
}
200Success
{
  "bidIds": [
    "text"
  ],
  "gasCost": 1,
  "psbt": "text",
  "serviceFee": 1,
  "txSize": 1,
  "signIndexes": [
    1
  ]
}
post

Confirm listing

Body
psbtstringRequired

Signed psbt

bidIdsstring[]Required
Responses
200Success
post
POST /market/v1/bid/bulk-confirm HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "psbt": "text",
  "bidIds": [
    "text"
  ]
}
200Success
{
  "success": true
}