# Send a Signed Secondary-Market Step

> Coming soon, upon request — this feature is turned on for your tenant by the Aurea team. [Contact us](https://www.aureahub.com/contact)

The signature of a step the quote prepared — its approval, or its swap — checked and sent.

## Overview

- `preparedTxId` is the one the step answered; `v` (0, 1, 27 or 28), `r` and `s` are the wallet's signature of its `txHashToSign`. Checked against the prepared transaction and the wallet, then sent. The swap's step is sent within the quote's time only.
- Another quote's prepared transaction answers `400` `TOKENIZED_ASSETS_SECONDARY_REFUSED` (`This prepared transaction is not one of this quote's.`). The quote's checks run again.
- Takes an `Idempotency-Key`. 20 a minute. User token and the tenant signature ([Calling the Routes](https://docs.aureahub.com/docs/guide-tokenized-assets.md)); for `user`, `owner`, `tenantadmin` and `signer`, for themselves (another role: `403`).

## Errors

Besides [the answers every tokenized assets route can give](https://docs.aureahub.com/docs/guide-tokenized-assets.md) (no valid token or signature, the module not set up or not switched on, a field that does not fit):

| Status | details.code | When |
| --- | --- | --- |
| 403 | — | The caller's role may not call it (`Your role does not have permission to perform this action.`). |
| 404 | TOKENIZED_ASSETS_QUOTE_NOT_FOUND | `There is no such quote of yours in this environment.` (`details.quoteId`). |
| 400 | TOKENIZED_ASSETS_SECONDARY_REFUSED | `This prepared transaction is not one of this quote's.` |
| 409 | TOKENIZED_ASSETS_QUOTE_EXPIRED | The swap's step, past the quote's time. |
| 404 | TOKENIZED_ASSETS_ASSET_NOT_OFFERED | `This tenant does not offer this asset.` |
| 409 | TOKENIZED_ASSETS_NOT_SUPPORTED_FOR_ASSET | `This is not available for this asset.` |
| 403 | TOKENIZED_ASSETS_SECONDARY_ROUTE_OFF | `This tenant does not offer the secondary route.` |
| 400 | TOKENIZED_ASSETS_QUOTE_NOT_SUPPORTED | `This asset is not traded on the secondary route.` |
| 403 | TOKENIZED_ASSETS_… (eligibility) | The user's eligibility and documents, as for a [binding quote](https://docs.aureahub.com/docs/tok-quote-create.md). |
| 409 | TOKENIZED_ASSETS_ASSET_PAUSED | `Trading in this asset is paused.` (`details.side`). |
| 423 | TENANT_FROZEN, USER_FROZEN, ACCOUNT_FROZEN, WALLET_FROZEN, OPERATION_QUARANTINED | Something is frozen ([Freezes](https://docs.aureahub.com/docs/guide-freezes.md)); `503` `FREEZE_STATUS_UNREAD` when that cannot be read. |
| 400 | TOKENIZED_ASSETS_SECONDARY_REFUSED | `The swap could not be carried out.` (`details.status`). |
| 503 | TOKENIZED_ASSETS_SECONDARY_ROUTER_UNAVAILABLE | `The secondary market cannot be reached at the moment: try again shortly.` |

## Endpoint

### `POST /v1/tokenized-assets/secondary/quotes/{quoteId}/broadcast`

Authentication: bearer token required.

Sends the signature of a step the quote prepared.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `quoteId` | string | yes | A UUID. |

**Headers**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional — required for a tenant on the institutional security profile (`400` `IDEMPOTENCY_KEY_REQUIRED` without it). Up to 255 letters, digits, - or _. The same key with the same request answers with the first answer (`idempotency-replayed: true`) instead of running it again; see [Idempotency](https://docs.aureahub.com/docs/idempotency.md) |

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `isTestnet` | boolean | no | `true` for the test environment; `false` (the default) for production. |
| `preparedTxId` | string | yes | The prepared transaction the step answered. A UUID. |
| `v` | integer | yes | At least 0, at most 28. |
| `r` | string | yes | Pattern `^0x[0-9a-fA-F]{1,64}$`. |
| `s` | string | yes | Pattern `^0x[0-9a-fA-F]{1,64}$`. |

**Responses**

`200` Sent

```json
{
  "quoteId": "6f1c2d8e-4b7a-4c1e-9a52-3e2f0d9b7c41",
  "step": "swap",
  "transactionId": "4d8e2f1a-6b3c-4e95-a7d0-9c1b3e5f7a28",
  "txHash": "0x8e3b…f2c1",
  "status": "pending",
  "redeemableFromIssuer": false,
  "disclosure": "Bought or sold on the secondary market, through third-party liquidity: the price is indicative until the swap is carried out, and tokens bought this way cannot be redeemed from their issuer."
}
```

[Contact us for details](https://www.aureahub.com/contact).

---

Web version: https://docs.aureahub.com/#tok-secondary-broadcast
