# 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)

<mark style="color:blue;">`POST`</mark> `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

```javascript
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,
  sizeFee, // normally 10% of chain fee but does not apply for direct orders
} = 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 + sizeFee;
// 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

```typescript
{
  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

<table><thead><tr><th width="165">Name</th><th width="134">Type</th><th>Description</th></tr></thead><tbody><tr><td>order<mark style="color:red;">*</mark></td><td>Object</td><td>The order request you would send to /order, /inscribe or any other priced endpoint. </td></tr><tr><td>type<mark style="color:red;">*</mark></td><td>string</td><td>The type of your order, see all types in the table at <a href="/pages/94b6LcO0JMXYUm5p0e0M">Order Types</a></td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK " %}

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

{% endtab %}
{% endtabs %}

```json
// 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
    }
}
```

## Non Standard Transaction Fees

We use <https://slipstream.mara.com/> to submit any non-standard transactions (larger than 400kb mempool policy limit) to be included in the bitcoin blockchain.

{% hint style="warning" %}
This means you need to check for their minimum fees before submitting a managed order request that will require a non-standard transaction.

You are also bound by ToS of slipstream if you create a managed inscription order with any file larger than 400kb or batch inscription request that would lead to a transaction that is over the default bitcoin mempool policy limit.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ordinalsbot.com/api/getting-prices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
