> For the complete documentation index, see [llms.txt](https://blog.ordinalswallet.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.ordinalswallet.com/api/api.md).

# API

API Url: `https://turbo.ordinalswallet.com`

### Inscriptions

## Fetch an inscription

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/inscription/:inscription_id`

## Fetch the location of an inscription

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/inscription/:inscription_id/outpoint`

## Fetch the raw content of an inscription

<mark style="color:blue;">`GET`</mark> `https://cdn.ordinalswallet.com/inscription/content/:inscription_id`

## Fetch an image preview of an inscription

<mark style="color:blue;">`GET`</mark> `https://cdn.ordinalswallet.com/inscription/preview/:inscription_id`

Not all inscriptions are supported yet. When an image cannot be generated, the raw inscription content is returned

## Collections

#### Types

```rust
pub struct Inscription {
    id: String,
    meta: Option<InscriptionMeta>,
}
```

```rust
pub struct InscriptionMeta {
    pub name: Option<String>,
    pub attributes: Option<Vec<InscriptionMetaAttribute>>,
}
```

```rust
pub struct InscriptionMetaAttribute {
    pub trait_type: String,
    pub value: String,
}
```

## Create a collection

<mark style="color:green;">`POST`</mark> `https://turbo.ordinalswallet.com/collection/new`

#### Request Body

| Name                                           | Type           | Description                                      |
| ---------------------------------------------- | -------------- | ------------------------------------------------ |
| api\_secret<mark style="color:red;">\*</mark>  | String         |                                                  |
| name<mark style="color:red;">\*</mark>         | String         | human readable name of the collection            |
| icon\_inscription\_id                          | String         | inscription id of the icon of the collection     |
| icon<mark style="color:red;">\*</mark>         | String         | url of the inscription icon                      |
| slug                                           | String         | unique collection slug                           |
| active<mark style="color:red;">\*</mark>       | bool           | to show/hide the collection                      |
| description<mark style="color:red;">\*</mark>  | String         |                                                  |
| inscriptions<mark style="color:red;">\*</mark> | Inscription\[] | List of inscriptions in the collection           |
| socials<mark style="color:red;">\*</mark>      | Json           | { "twitter": "", "discord": "", "website": ""  } |

## Update a collection

<mark style="color:green;">`POST`</mark> `https://turbo.ordinalswallet.com/collection/update`

Update collection by creating a request with one or more optional parameter. There are three parameters that can be used to update collection inscriptions. The `inscriptions` parameter can be used to add and remove inscriptions. When given, it is considered the new state of the collection inscriptions. The `new_inscriptions` parameter can be used to add new inscriptions with metadata. The `new_inscription_ids` parameter can be used to add new inscriptions without metadata. These three parameters are meant to be used separately.

#### Request Body

| Name                                          | Type           | Description                                             |
| --------------------------------------------- | -------------- | ------------------------------------------------------- |
| api\_secret<mark style="color:red;">\*</mark> | String         |                                                         |
| slug<mark style="color:red;">\*</mark>        | String         | unique collection slug                                  |
| name                                          | String         | human readable name of the collection                   |
| icon\_inscription\_id                         | String         | inscription id of the icon of the collection (priority) |
| icon                                          | String         | url of the inscription icon                             |
| active                                        | bool           | to show/hide the collection                             |
| description                                   | String         |                                                         |
| inscriptions                                  | Inscription\[] | List of inscriptions in the collection                  |
| socials                                       | Json           | { "twitter": "", "discord": "", "website": ""  }        |
| remove\_icon\_inscription\_id                 | bool           | Delete icon\_inscription\_id                            |
| new\_inscription\_ids                         | String\[]      | List of new inscription ids to add to the collection    |
| new\_inscriptions                             | Inscription\[] | List of new inscriptions to add to the collection       |

## Fetch a collection

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/collection/:slug`

## List collection inscriptions

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/collection/:slug/inscriptions`

## List inscriptions that are for sale

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/collection/:slug/escrows`

## List inscriptions that sold

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/collection/:slug/sold-escrows`

## List attributes for a collection

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/collection/:slug/attributes`

## Fetch collection stats

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/collection/:slug/stats`

## Fetch collection snapshot

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/collection/:slug/snapshot`

A list of all addresses that hold an item in the collection

### Wallet

## Wallet Balance

<mark style="color:blue;">`GET`</mark> `https://turbo.ordinalswallet.com/wallet/:address`

Get the balance of a wallet. Includes bitcoin balance, inscriptions and brc20

## Verify a signed message

<mark style="color:green;">`POST`</mark> `https://turbo.ordinalswallet.com/wallet/:address/verify-message`

Bip-0322 Signed Message Verification\
<https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki>

#### Request Body

| Name                                      | Type   | Description                 |
| ----------------------------------------- | ------ | --------------------------- |
| message<mark style="color:red;">\*</mark> | String | the message that was signed |
| signature                                 | String | base64 encoded signature    |
