# Submit buy offer

This endpoint is designed for completing the purchase of an ordinal.\
\
**Platform Cost:** \
A platform fee is applied only when an ordinal is sold. It is not charged for listing an ordinal. The current fee is 1% of sale amount charged to the seller.

This requires the signed psbt from /create-offer end point. Which is a  psbt signed by the buyer and base64 encoded. This returns a transaction id for the ordinal sale transaction.

### `POST` Submit offer

## Submit buy offer for a an odinal

<mark style="color:green;">`POST`</mark> `https://api.ordinalsbot.com/marketplace/submit-offer`

API Key is required in the header:

`headers: { 'x-api-key': '<YOUR_API_KEY>', ...otherHeaders }`

#### Request Body

| Name                                                    | Type   | Description                                                                                                                                                 |
| ------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ordinalId<mark style="color:red;">\*</mark>             | String | Id of the ordinal being purchased.                                                                                                                          |
| signedBuyerPSBTBase64<mark style="color:red;">\*</mark> | String | Signed psbt transaction in base64 encoding. This is the output of the creating an offer using /create-offer and singing it using the buyer's payment wallet |

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

```json

{
    "txId": "aa1c27........2767", // transaction id for the purchase transaction
}

```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```json
{
    status: 'error',
    error: 'error reason'
}
```

{% endtab %}
{% endtabs %}


---

# 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/marketplace-1/submit-buy-offer.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.
