UniSat
  • home
    • UniSat Documentation Home
    • Work Priorities
      • UniSat 2025 Q2 Work priorities
      • Overview of UniSat 2025 Work Priorities
      • Production Roadmap in Q4 2024
  • 🛠️dev
    • UniSat Developer Center- Open API
      • UniSat Developer Center Plans
      • How to Acquire a UniSat API Key
      • Enable the two-factor authentication
      • FAQ
    • Open API documentation
      • UniSat Wallet
        • Connect with UniSat Mobile Wallet
        • Supported Chains
      • API for Bitcoin
        • General
          • Blocks
            • Get Blockchain Info
            • Get Block Transactions
          • Transactions
            • Get Recommended Fees
            • Get Tx Info
            • Get Tx Inputs
            • Get Tx Outputs
            • Get UTXO Info
          • Addresses
            • Get Address Balance
            • Get Address History
            • Get BTC UTXO
            • Get Inscription UTXO
          • Inscriptions
            • Get Inscription Info
            • Get Inscription Content
            • Get Inscription Events
            • Get Address Inscriptions
        • BRC-20
          • Get Best Block Height
          • Get BRC-20 List
          • Get BRC-20 Status
          • Get BRC-20 Ticker Info
          • Get BRC-20 Holders
          • Get BRC-20 Ticker History
          • Get BRC-20 Total History By Height
          • Get BRC-20 Tx History
          • Get Address BRC-20 Summary
          • Get Address BRC-20 Ticker Info
          • Get Address BRC-20 History
          • Get Transferable Inscriptions
        • Runes
          • Get Runes Status
          • Get Runes Info List
          • Get Runes Info
          • Get Runes Holders
          • Get Address Runes Balance List
          • Get Address Runes Balance
          • Get UTXO Runes Balance
          • Get Address Runes UTXO
          • Get Runes Events
        • BRC20-Swap
          • Get Global Config
          • Get Address Balance
          • Get Deposit Info
          • Get Address All Ticker
          • Deploy Pool
          • Add Liq
          • Remove Liq
          • Swap
          • Get All Pool List
          • Get My Pool List
          • Get My Pool
          • Get Overview
          • Get Gas History
          • Get Liq History
          • Get Swap History
          • Get Rollup History
          • Get Deposit List
          • Deposit
          • Withdraw
          • Cancel Withdraw
          • Get Withdraw Process
          • Get Withdraw History
          • Get System Status
        • UniSat Inscribe
          • Get Order Summary
          • Get Order List
          • Create Order
          • Search Order
          • Refund estimate
          • Refund
          • Create BRC-20 DEPLOY
          • Create BRC-20 MINT
          • Create BRC-20 TRANSFER
        • UniSat Marketplace
          • BRC20 Marketplace
          • Runes Marketplace
          • Collection Marketplace
          • Domain Marketplace
        • UniSat Collection
          • Get Collection Status
          • Get Collection List
          • Get Collection Info
          • Get Collection Holders
          • Get Collection List By Address
          • Get Collection Items
          • Get Collection Summary By Address
          • Get Collection Items By Address
          • Get Collection List By Inscription
          • Add Items
          • Remove Items
      • API for Fractal Bitcoin
        • General
          • Blocks
            • Get Blockchain Info
            • Get Block Transactions
          • Transactions
            • Get Tx Info
            • Get Tx Inputs
            • Get Tx Outputs
            • Get UTXO Info
          • Addresses
            • Get Address Balance
            • Get Address History
            • Get BTC UTXO
            • Get Inscription UTXO
          • Inscriptions
            • Get Inscription Info
            • Get Inscription Content
            • Get Inscription Events
            • Get Address Inscriptions
        • BRC-20
          • Get Best Block Height
          • Get BRC-20 List
          • Get BRC-20 Status
          • Get BRC-20 Ticker Info
          • Get BRC-20 Holders
          • Get BRC-20 Ticker History
          • Get BRC-20 Total History By Height
          • Get BRC-20 Tx History
          • Get Address BRC-20 Summary
          • Get Address BRC-20 Ticker Info
          • Get Address BRC-20 History
          • Get Transferable Inscriptions
        • Runes on Fractal
          • Get Runes Status
          • Get Runes Info List
          • Get Runes Info
          • Get Runes Holders
          • Get Address Runes Balance List
          • Get Address Runes Balance
          • Get UTXO Runes Balance
          • Get Address Runes UTXO
          • Get Runes Events
        • UniSat Inscribe on Fractal
          • Get Order Summary
          • Get Order List
          • Create Order
          • Search Order
          • Refund estimate
          • Refund
          • Create BRC-20 DEPLOY
          • Create BRC-20 MINT
          • Create BRC-20 TRANSFER
        • UniSat Marketplace on Fractal
          • BRC20 Marketplace
          • Runes Marketplace
          • Collection Marketplace
          • Domain Marketplace
        • UniSat Collection on Fractal
          • Get Collection Status
          • Get Collection List
          • Get Collection Info
          • Get Collection Holders
          • Get Collection List By Address
          • Get Collection Items
          • Get Collection Summary By Address
          • Get Collection Items By Address
          • Get Collection List By Inscription
          • Add Items
          • Remove Items
        • Get Fractal Circulating Supply
        • Get Fractal Total Supply
        • Get Fractal Total Address Count
        • Get Fractal Rich Address List
        • PizzaSwap
        • CAT Market
        • CAT20-DEX
          • Get Token Price
          • Get Market Stats
        • Fractal Development Support (testnet)
      • API Version Upgrade Notes
        • API Version Upgrade Notice: Untrack Deprecated brc20 Inscriptions
      • API Demos
      • UniSat Game Framework
    • Development for brc-20 protocol
      • brc20-swap Introduction
        • What Is an Automated Market Maker?
        • Liquidity providers (LPs)
        • Testnet guide
        • Technical Q&A
        • Modules, withdrawals, and decentralization of brc-20
      • Single-Step Transfer
    • Developer Service Legal Disclaimer
  • 💡Services (Bitcoin)
    • UniSat Wallet
      • What is Signet?
      • UniSat Wallet FAQ
      • UniSat Wallet Address Type
      • Transfer brc-20 in UniSat Wallet
    • UTXO Management
      • Understanding UTXO
      • How to unlock inscription/runes utxo and send as normal btc in utxo management.
      • FAQ
    • PizzaSwap
      • How to interact with PizzaSwap?
      • Green Channel User Guide
      • Guides for withdrawing your assets from PizzaSwap or brc20-swap
      • LPfest: Step-by-Step Guide
    • Product Chronicles
      • UniSat Wallet - Release Notes
        • v1.6.2
        • v1.6.1
        • v1.6.0
        • v1.5.8
        • v1.5.4
        • v1.5.2
        • v1.5.1
        • v1.4.10
        • v1.4.9
        • v1.4.6
        • v1.4.5
        • v1.4.2
        • v1.4.1
        • v1.4.0
        • v1.3.3
        • v1.3.2
        • v1.3.1
        • v1.3.0
        • v1.2.9
      • Timeline of brc-20 Swap and PizzaSwap Development
  • 💡Services (Fractal Bitcoin)
    • Fractal Service Links
    • FairPool
      • Getting Started with FairPool
    • Runes on Fractal
      • How to Etch Runes?
      • How to Mint Runes?
      • How to Trade Runes?
    • CAT Support
      • How to send / receive CAT20?
      • How to Buy and Sell CAT on UniSat CAT Market?
    • Simple Bridge
      • How to use the Simple Bridge
    • Guides & Tutorials
      • How to Submit Collection in GitHub?
      • Full Node Configuration
  • 📖Knowledge Base
    • Extension Wallet Safety Guide: Protecting Your Assets
      • Best Practices for Safety
    • Bitcoin Basics
      • What is Bitcoin?
      • How does Bitcoin work?
      • Understanding Bitcoin Address Types
      • Glossary
    • .unisat Names
    • Name recognized and resolved
    • Runes
      • How to Etch Runes?
      • How to Mint Runes?
      • How to Trade Runes?
  • 🎏Community
    • Reputation System
      • Guides & Explanations
        • UniSat Marketplace Fee Rates
        • FAQ
          • Drops FAQ
      • Points
      • Titles
      • Credits
    • Events
      • brc20-swap Early Access
      • UniSat OG Pass Collection
      • LPfest
      • Babylon Staking Activity
        • How to Transfer $BABY to a Cosmos Wallet
        • How to Participate in BTC Staking on Babylon Using UniSat Wallet
    • Assets potentially associated with UniSat's products
Powered by GitBook
On this page
  1. dev
  2. Open API documentation
  3. API for Fractal Bitcoin
  4. UniSat Inscribe on Fractal

Create Order

PreviousGet Order ListNextSearch Order

Last updated 6 months ago

FAQ

How to pay after create an order?

The order will start inscribing once the "payAddress" receives the "amount". For example, if an order requires 3000 satoshis, you have to send 3000 satoshis to payAddress. After that, the inscription will be inscribed.

How is the open-api order charged?

We charge a base service fee of 1999 for the first 25 inscriptions, along with an additional network service fee of 4.99%. We round down the final cost.

Are the orders on the open-api and the UniSat website interoperable?

No.

Open API and UniSat website inscribing service do not share data. This ensures the stability of the Open API interface and prevents it from being affected by frequent changes to website inscribing service. For similar reasons, the orders on open-api do not enjoy discounts from the OG card or .unisat domain.

How many files can I submit for each order?

An order supports a maximum of 2000 files, with each file having a maximum size of 390 KB

How to estimate fee before create an order?

const address = ''; // the receiver address
const inscriptionBalance = 546; // the balance in each inscription
const fileCount = 1000; // the fileCount
const fileSize = 1000; // the total size of all files
const contentTypeSize = 100; // the size of contentType
const feeRate = 10; // the feeRate
const feeFileSize = 100; // the total size of first 25 files
const feeFileCount = 25 // do not change this
const devFee = 1000; // the fee for developer

const balance = inscriptionBalance * fileCount;

let addrSize = 25+1; // p2pkh
if(address.indexOf('bc1q')==0 || address.indexOf('tb1q')==0){
    addrSize = 22+1;
}else if(address.indexOf('bc1p')==0 || address.indexOf('tb1p')==0){
    addrSize = 34+1;
}else if(address.indexOf('2')==0 || address.indexOf('3')==0){
    addrSize = 23+1;
}

const baseSize = 88;
let networkSats = Math.ceil(((fileSize+contentTypeSize) / 4 + ( baseSize+8+addrSize+8+23)) * feeRate);
if(fileCount>1){
    networkSats = Math.ceil(((fileSize+contentTypeSize) / 4 + (baseSize+8+addrSize+(35+8)*(fileCount-1)+ 8+23 +(baseSize+8+addrSize+0.5)*(fileCount-1) )) * feeRate);
}
let networkSatsByFeeCount = Math.ceil(((feeFileSize+contentTypeSize) / 4 + ( baseSize+8+addrSize+8+23)) * feeRate);
if(fileCount>1){
    networkSatsByFeeCount = Math.ceil(((( feeFileSize)+contentTypeSize*(feeFileCount/fileCount)) / 4 + (baseSize+8+addrSize+(35+8)*(fileCount-1)+ 8+23 +(baseSize+8+addrSize+0.5)*Math.min(fileCount-1,feeFileCount-1) )) * feeRate);
}

const baseFee = 1999 * Math.min(fileCount, feeFileCount); // 1999 base fee for top 25 files
const floatFee = Math.ceil(networkSatsByFeeCount * 0.0499); // 4.99% extra miner fee for top 25 transations
const serviceFee = Math.floor(baseFee + floatFee);

const total = balance + networkSats + serviceFee; 
const truncatedTotal = Math.floor((total) / 1000) * 1000; // truncate
const amount = truncatedTotal + devFee; // add devFee at the end

console.log("The final amount need to pay: ",amount)
🛠️
  • POSTCreate an order
  • FAQ
  • How to pay after create an order?
  • How is the open-api order charged?
  • Are the orders on the open-api and the UniSat website interoperable?
  • How many files can I submit for each order?
  • How to estimate fee before create an order?

Create an order

post

Create an order to inscribe something

Authorizations
Body
receiveAddressstringOptional

Bitcoin address to receive the inscriptions

feeRatenumber · floatOptional

The fee rate of transaction

Example: 1
outputValueinteger · int32Optional

The balance of inscription

Example: 546
devAddressstringOptional

Developer address to receive extra fee

devFeeinteger · int32Optional

Extra fee to pay to developer's address

Responses
200
Successful operation
application/json
401
Invalid API Key
post
POST /v2/inscribe/order/create HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 227

{
  "receiveAddress": "text",
  "feeRate": 1,
  "outputValue": 546,
  "files": [
    {
      "filename": "1000.sats",
      "dataURL": "data:text/plain;charset=utf-8;base64,eyJwIjoic25zIiwib3AiOiJyZWciLCJuYW1lIjoiMTAwMDAuc2F0cyJ9"
    }
  ],
  "devAddress": "text",
  "devFee": 1
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "orderId": "",
    "status": "pending",
    "payAddress": "",
    "receiveAddress": "",
    "amount": 3000,
    "paidAmount": 1,
    "outputValue": 1,
    "feeRate": 1,
    "minerFee": 1,
    "serviceFee": 1,
    "devFee": 1,
    "files": [
      {
        "filename": "10000.sats",
        "inscriptionId": "",
        "status": "pending"
      }
    ],
    "count": 1,
    "pendingCount": 1,
    "unconfirmedCount": 0,
    "confirmedCount": 0,
    "createTime": 1693439128100,
    "refundTxid": "",
    "refundAmount": 1,
    "refundFeeRate": 1
  }
}