Getting Prices

Use this endpoint to check the price (in satoshis) that user will need to pay to use services offered by this API.

POST price estimates

Get Inscription Price (in satoshis)

POST https://api.ordinalsbot.com/price

This endpoint will calculate all fees related to the operation and return the total as well as the breakdown.

Price breakdown

Here is a code example with the exact calculation used in pricing

const discounts = []; // array of discounts applied to the order

// set at 10% at the moment but can be changed
const chainFeeRate = 0.1;

// the parameters that are discountable
// those are the values AFTER the discount
const {
  baseFee, // base fee charged by us, per item
  rareSatsFee, // fee for rare sats, per item
  collectionServiceFee, // optional fee for collections, per item
} = dicountParamters;

// the other components of the pricing, which are not discountable
const {
  chainFee, // chain fee in sats for the whole order
  count, // items count
  postage, // the postage per item
  price, // the price per item for a collection or launchpad
  additionalFee = 0, // zero by default unless specified, applies PER item
} = basePricing;

// the total additional fee that we will charge
const additionalFeeCharged = additionalFee * count;
// service fee component calculation
const serviceFee = (baseFee + rareSatsFee + collectionServiceFee + postage + price) * count + additionalFeeCharged + Math.floor(chainFee * this.chainFeeRate);
// final amount, this is what the user has to pay!
const amount = serviceFee + chainFee;

// this is returned by the endpoint
const finalPricing = {
  ...basePricing,
  ...discountParameters,
  additionalFeeCharged,
  discounts,
  amount,
  serviceFee,
};

Discount object

If discounts are applied there will be an array of discount object in the discounts field

{
  discount: number, // the value of the discount, either as sats or as a percent
  parameter: 'baseFee' | 'rareSatsFee' | 'collectionServiceFee', // which parameter is getting the discount
  type: 'fixed' | 'percentage', // if fixed, we directly deduct dicount from parameter, otherwise we deduct as a % from the parameter
  reason: string, // the reason for discount
}

Body Parameters

NameTypeDescription

order*

Object

The order request you would send to /order, /inscribe or any other priced endpoint.

type*

string

The type of your order, see all types in the table at Order Types

{
    "chainFee": 18992,
    "baseFee": 9000,
    "rareSatsFee": 0,
    "additionalFee": 0,
    "additionalFeeCharged": 0,
    "postage": 546,
    "count": 2,
    "price": 0,
    "collectionServiceFee": 0,
    "discounts": [],
    "amount": 39983,
    "serviceFee": 20991
}

// here is a sample payload you can POST to get a pricing
{
    "type": "bulk",
    "order": {
        "files": [
            {
                "url": "https://ordinalsbot-dev.s3.amazonaws.com/7b7b3b37-792b-4f29-bd37-7436fd461453",
                "size": 860,
                "name": "btc-skull-2.jpg",
                "type": "image/jpeg"
            },
                        {
                "url": "https://ordinalsbot-dev.s3.amazonaws.com/7b7b3b37-792b-4f29-bd37-7436fd461453",
                "size": 860,
                "name": "btc-skull-2.jpg",
                "type": "image/jpeg"
            }
        ],
        "lowPostage": true,
        "receiveAddress": "tb1qwejhagpav9rkrwpk55ul6pes6f89glpkpds487",
        "rareSats": "random",
        "compress": false,
        "fee": 16
    }
}

Last updated