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)
POSThttps://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
constdiscounts= []; // array of discounts applied to the order// set at 10% at the moment but can be changedconstchainFeeRate=0.1;// the parameters that are discountable// those are the values AFTER the discountconst {baseFee,// base fee charged by us, per itemrareSatsFee,// fee for rare sats, per itemcollectionServiceFee,// optional fee for collections, per item} = dicountParamters;// the other components of the pricing, which are not discountableconst {chainFee,// chain fee in sats for the whole ordercount,// items countpostage,// the postage per itemprice,// the price per item for a collection or launchpadadditionalFee=0,// zero by default unless specified, applies PER item} = basePricing;// the total additional fee that we will chargeconstadditionalFeeCharged= additionalFee * count;// service fee component calculationconst serviceFee = (baseFee + rareSatsFee + collectionServiceFee + postage + price) * count + additionalFeeCharged + Math.floor(chainFee * this.chainFeeRate);
// final amount, this is what the user has to pay!constamount= serviceFee + chainFee;// this is returned by the endpointconstfinalPricing= {...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}
// 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 }}