BRC20 Marketplace

Get tick k line.

post
Authorizations
Body
tickstringRequired
timeStartnumberRequired

Start time range

timeEndnumberRequired

End time range

timeStepnumberRequired

Time granularity, such as milliseconds for a 5-minute interval

Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/brc20_kline HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "tick": "text",
  "timeStart": 1,
  "timeEnd": 1,
  "timeStep": 1
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": [
    {
      "price": 1,
      "timestamp": 1
    }
  ]
}

Parameter Description

  • tick: BRC-20 tick

  • timeStart: The starting timestamp, measured in milliseconds.

  • timeEnd: The ending timestamp, measured in milliseconds.

  • timeStep: Represents the interval between each data point, measured in milliseconds.

Additionally, there are the following limitations on the requested parameters.

(timeEnd-timeStart)/timeStep <= 2016

Get statistical data, price, market capitalization, etc. for BRC20.

post
Authorizations
Body
timeTypestring · enumOptional

Optional: day1, day7, day30

Possible values:
ticksstring[]Optional

Specify a list of ticks

startnumberOptional
limitnumberOptional
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/brc20_types HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "timeType": "day1",
  "ticks": [
    "text"
  ],
  "start": 1,
  "limit": 1
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "BTCPrice": 1,
    "list": [
      {
        "tick": "text",
        "curPrice": 1,
        "changePrice": 1,
        "btcVolume": 1,
        "amountVolume": 1,
        "cap": "text"
      }
    ],
    "deploy": [
      {
        "tick": "text",
        "curPrice": 1,
        "changePrice": 1,
        "btcVolume": 1,
        "amountVolume": 1,
        "cap": "text"
      }
    ],
    "cap": [
      {
        "tick": "text",
        "curPrice": 1,
        "changePrice": 1,
        "btcVolume": 1,
        "amountVolume": 1,
        "cap": "text"
      }
    ]
  }
}

The optional values for timeType are day1, day7, day30.

ticks can be used to filter the "list," allowing it to return only the ticks that are needed.If the ticks field is not provided, all BRC20 data will be returned.

In the returned fields of this interface, only the "list" field needs attention. The "deploy" and "cap" fields are included solely for display purposes on certain pages of UniSat Marketplace. Filtering the fields will not affect "deploy" and "cap"; they will always be returned.

Use start and limit
Use ticks

Get statistical data, price, market capitalization, etc. for BRC20.

post
Authorizations
Body
timeTypestring · enumOptionalPossible values:
tickstringOptional
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/brc20_types_specified HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "timeType": "day1",
  "tick": "text"
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "tick": "text",
    "curPrice": 1,
    "changePrice": 1,
    "btcVolume": 1,
    "amountVolume": 1
  }
}

The optional values for timeType are day1, day7, day30

Bind btcAddress and nftAddress.

post
Authorizations
Body
btcAddressstringRequired
nftAddressstringRequired
signstringRequired
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/bind HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "btcAddress": "text",
  "nftAddress": "text",
  "sign": "text"
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {}
}

By default, a user's address A is used for both payment and receiving inscriptions. However, for some wallets, such as the xverse and hiro wallets, different addresses are used to store BTC and inscriptions. This method allows the wallet to use address A for payments and address B for receiving inscriptions.

import {signMessage} from "sats-connect"

const paymentAddress = "";
const ordinalsAddress = "";

const toSignStr = `Please confirm that\nPayment Address: ${paymentAddress}\nOrdinals Address: ${ordinalsAddress}`

// for xverse
signMessage({
    payload:{
        address: ordinalsAddress,
        message: toSignStr,
        network:{
            type: "Mainnet"
        }
    },
    onFinish:(signature)=>{
        axios.post('/v3/market/brc20/auction/bind', {
            btcAddress: paymentAddress,
            nftAddress: ordinalsAddress,
            sign:signature
        })

    }
}

Retrieve the list information of the market.

post
Authorizations
Body
startnumberRequired

The data is looked up from start

limitnumber · max: 100Required

Limit the amount of data

Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/list HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 223

{
  "filter": {
    "nftType": "brc20",
    "address": "text",
    "tick": "text",
    "minPrice": 1,
    "maxPrice": 1,
    "nftConfirm": true,
    "isEnd": true,
    "all": true
  },
  "sort": {
    "unitPrice": 1,
    "onSaleTime": 1,
    "initPrice": 1,
    "inscriptionNumber": 1
  },
  "start": 1,
  "limit": 1
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "list": [
      {
        "auctionId": "text",
        "inscriptionId": "text",
        "inscriptionNumber": 1,
        "marketType": "text",
        "address": "text",
        "price": 1,
        "nftType": "text",
        "tick": "text",
        "limit": 1,
        "amount": 1,
        "unitPrice": 1
      }
    ],
    "total": 1,
    "timestamp": 1
  }
}

Retrieve inscription information, including brc20, names, collection. It is necessary to first determine the inscription type before calling the relevant services.

post
Authorizations
Body
inscriptionIdstringRequired
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/inscription_info HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "inscriptionId": "text"
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "auctionId": "text",
    "inscriptionId": "text",
    "inscriptionNumber": 1,
    "marketType": "fixedPrice",
    "address": "text",
    "price": 1,
    "notSupport": true,
    "verification": true,
    "nftType": "text",
    "tick": "text",
    "limit": 1,
    "amount": 1,
    "unitPrice": 1,
    "collectionId": "text",
    "contentType": "text",
    "contentBody": "text",
    "collectionItemName": "text",
    "collectionHighResImgUrl": "text",
    "collectionName": "text",
    "notOnSale": true,
    "domain": "text",
    "domainHex": "text",
    "domainType": "sats",
    "utxo": {}
  }
}

Get the basic listing information of the specified inscription list

post
Authorizations
Body
addressstringOptional
inscriptionIdsstring[]Optional
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/inscription_info_list HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "address": "text",
  "inscriptionIds": [
    "text"
  ]
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "list": [
      {
        "auctionId": "text",
        "inscriptionId": "text",
        "inscriptionNumber": 1,
        "marketType": "text",
        "address": "text",
        "price": 1,
        "nftType": "text",
        "status": "text"
      }
    ]
  }
}

Get information on listings, delistings, and sales.

post
Authorizations
Body
startnumberRequired
limitnumber · max: 100Required
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/actions HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 121

{
  "filter": {
    "nftType": "brc20",
    "address": "text",
    "inscriptionId": "text",
    "event": "Cancel",
    "tick": "text"
  },
  "start": 1,
  "limit": 1
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "list": [
      {
        "auctionId": "text",
        "inscriptionId": "text",
        "inscriptionNumber": 1,
        "event": "Listed",
        "price": 1,
        "from": "text",
        "to": "text",
        "timestamp": 1,
        "nftConfirmNum": 1,
        "nftType": "brc20",
        "endMsg": "text",
        "newest": true,
        "name": "text",
        "unitPrice": 1,
        "amount": 1,
        "domain": "text",
        "domainType": "sats",
        "domainCategorys": [
          "Keyboard"
        ],
        "collectionId": "text",
        "collectionItemName": "text",
        "contentType": "text",
        "contentBody": "text",
        "attributes": [
          {
            "trait_type": "text",
            "value": "text"
          }
        ]
      }
    ],
    "total": 1
  }
}

Create listing order.

post
Authorizations
Body
nftTypestringOptional
inscriptionIdstringRequired
initPricestringRequired

Set the initial total price

unitPricestringRequired

Unit Price (for tick)

pubkeystringRequired

User public key

marketTypestring · enumRequiredExample: fixedPricePossible values:
btcAddressstringOptional

(Optional) Only for multi-address wallet, such as Xverse, hiro. Specifies the BTC receive address

Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/create_put_on HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 141

{
  "nftType": "text",
  "inscriptionId": "text",
  "initPrice": "text",
  "unitPrice": "text",
  "pubkey": "text",
  "marketType": "fixedPrice",
  "btcAddress": "text"
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "auctionId": "text",
    "psbt": "text",
    "signIndexes": [
      1
    ]
  }
}
  • btcAddress: (Optional) Only for multi-address wallet, such as Xverse, hiro. To specifies the BTC receive address

Confirm listing order.

post
Authorizations
Body
auctionIdstringRequired
psbtstringRequired
fromBase64booleanOptional

Is Base64 format, the default is hex format

Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/confirm_put_on HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "auctionId": "text",
  "psbt": "text",
  "fromBase64": true
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {}
}

Return params before creating purchase order.

post
Authorizations
Body
auctionIdstringRequired
bidPricenumberRequired
addressstringRequired

Bidder address

pubkeystringRequired

Bidder pubkey

Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/create_bid_prepare HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "auctionId": "text",
  "bidPrice": 1,
  "address": "text",
  "pubkey": "text"
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "serverFee": 1,
    "serverReal": 1,
    "serverFeeRate": 1,
    "txSize": 1,
    "nftValue": 1,
    "feeRate": 1,
    "availableBalance": 1,
    "allBalance": 1
  }
}
  • serverFee: Service Fee

  • serverReal: The service fee after deducting various discounts.

  • serverFeeRate: Service fee rate

  • txSzie: The virtual size of this transaction.

  • nftValue: Satoshis in the inscription

  • feeRate: The current accepted minimum network fee rate.

  • availableBalance:BTC balance available for constructing transactions."

Create purchase order.

post
Authorizations
Body
auctionIdstringRequired
bidPricenumberRequired
addressstringRequired

Bidder address

pubkeystringRequired

Bidder pubkey

feeRatenumberOptional

The user sets the rate

nftAddressstringOptional

(Optional) Only for multi-address wallet, such as Xverse, hiro. Inscription receiving address

Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/create_bid HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 134

{
  "auctionId": "text",
  "bidPrice": 1,
  "address": "text",
  "pubkey": "text",
  "feeRate": 1,
  "nftAddress": "text",
  "utxos": [
    {
      "txid": "text",
      "index": 1
    }
  ]
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "bidId": "text",
    "psbtBid": "text",
    "psbtBid2": "text",
    "psbtSettle": "text",
    "serverFee": 1,
    "networkFee": 1,
    "feeRate": 1,
    "nftValue": 1,
    "bidSignIndexes": [
      1
    ]
  }
}

Confirm purchase order.

post
Authorizations
Body
auctionIdstringRequired
bidIdstringRequired
psbtBidstringRequired
psbtBid2stringOptional

Auction mode is used, and the current empty string can be passed

psbtSettlestringOptional

Auction mode is used, and the current empty string can be passed

fromBase64booleanOptional

Is Base64 format, the default is hex format

Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/confirm_bid HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 108

{
  "auctionId": "text",
  "bidId": "text",
  "psbtBid": "text",
  "psbtBid2": "text",
  "psbtSettle": "text",
  "fromBase64": true
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "txid": "text"
  }
}

Create delisting order.

post
Authorizations
Body
auctionIdstringRequired
nftAddressstringOptional

(Optional) Only for multi-address wallet, such as Xverse, hiro. Inscription receiving address.

btcPubkeystringOptional

(Optional) Only for multi-address wallet, such as Xverse, hiro. The public key used in the inscription of the order.

rbfbooleanOptional
offChainbooleanOptional
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/create_put_off HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 122

{
  "auctionId": "text",
  "nftAddress": "text",
  "btcPubkey": "text",
  "utxos": [
    {
      "txid": "text",
      "index": 1
    }
  ],
  "rbf": true,
  "offChain": true
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "psbt": "text",
    "txSize": 1,
    "btcSignIndexes": [
      1
    ],
    "nftSignIndexes": [
      1
    ]
  }
}

Confirm delisting order.

post
Authorizations
Body
auctionIdstringRequired
psbtstringRequired
fromBase64booleanOptional

Is Base64 format, the default is hex format

offChainbooleanOptional
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/confirm_put_off HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "auctionId": "text",
  "psbt": "text",
  "fromBase64": true,
  "offChain": true
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "txid": "text"
  }
}

Create the order for price adjustment.

post
Authorizations
Body
auctionIdstringRequired
initPricestringRequired
unitPricestringRequired
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/create_modify_price HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "auctionId": "text",
  "initPrice": "text",
  "unitPrice": "text"
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "psbt": "text",
    "signIndexes": [
      1
    ]
  }
}

Confirm the order for price adjustment.

post
Authorizations
Body
auctionIdstringRequired
psbtstringRequired
fromBase64booleanRequired
Responses
200
Default Response
application/json
post
POST /v3/market/brc20/auction/confirm_modify_price HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "auctionId": "text",
  "psbt": "text",
  "fromBase64": true
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {}
}

Last updated