> This page is for BaaS.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server.

# P2P Crypto — ads

Any account with a profile can take ads. To **publish** an ad, the account must be an advertiser approved by CorpX.

## Advertiser request

`POST /v1/accounts/{accountId}/p2p/advertiser-requests` answers `202`: the request enters the CorpX queue. No `username`: `409 username_required`. An account that is already an advertiser or is suspended: `409 advertiser_request_not_allowed`. The decision arrives as `p2p.advertiser.updated` and shows up in `advertiserStatus` on `GET .../p2p/profile`.

```mermaid
stateDiagram-v2
    [*] --> none
    none --> pending: POST advertiser-requests
    pending --> approved: CorpX approves (with level)
    pending --> refused: CorpX refuses
    refused --> pending: new request
    approved --> suspended: CorpX suspends
    suspended --> approved: CorpX reinstates
```

On approval, CorpX sets the advertiser's **level** (which fixes the fee) and, when it wants, a **per-order cap**. A suspended or refused advertiser has their active ads paused.

## Create and edit an ad

`POST .../p2p/ads`:

| Field                    | Rule                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `side`                   | `sell` (the advertiser sells crypto) or `buy` (buys). Cannot change later.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `pair`                   | A pair enabled in the market (`GET /v1/p2p/pairs`). Cannot change later.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `priceMode`              | `spread` (basis points over the Binance spot), `fixed` (fixed price) or `offset` (a signed BRL amount, 4 decimal places, over the Binance spot). The unit price always has 4 decimal places. The fee is always in bps of the order amount, in every mode.                                                                                                                                                                                                                                                                            |
| `spreadBps`              | In `spread` mode, from -500 to 500 basis points over the Binance spot (`{ASSET}BRL`). The `price` shown in the list and on the ad is indicative, read at request time; what binds is the spot captured when the order opens.                                                                                                                                                                                                                                                                                                         |
| `fixedPrice`             | In `fixed` mode, price per unit in BRL with up to 4 decimal places (`"5.4321"`). The order locks that price; only the order's BRL amount rounds to cents.                                                                                                                                                                                                                                                                                                                                                                            |
| `offset`                 | In `offset` mode, signed BRL per unit added to the spot, up to 4 decimal places: `"-0.0100"` buys one cent below, `"0.0001"` is one ten-thousandth. Must stay within 5% of the current spot (`422 invalid_offset`); without a Binance quote when publishing or changing `offset`, `409 price_unavailable`. The cap is only checked at those two moments: editing stock or limits does not depend on Binance. The deprecated integer `offsetCents` is still accepted and stored with two extra zeros; responses only return `offset`. |
| `stockAmount`            | How much crypto the ad offers (or wants to buy).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `minAmount`, `maxAmount` | Per-order limits, in BRL. `maxAmount` respects the CorpX cap, the advertiser's tenant cap and the advertiser cap (`422 amount_above_cap`). On opening, the taker's tenant cap also applies.                                                                                                                                                                                                                                                                                                                                          |
| `deliveryDeadlineMin`    | Promised delivery deadline, within the market's range.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `walletId`               | Approved wallet on the pair's network (on a `sell` ad, the source of the crypto).                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `instructions`           | Up to 500 characters. Text with contact or off-platform payment details is flagged.                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

`PATCH .../p2p/ads/{adId}` changes price, stock, limits, deadline, instructions, wallet and `status` (`active`, `paused`, `closed`). A closed ad does not come back. Stock cannot go below what is reserved in open orders (`422 stock_below_reserved`).

## States and stock

```mermaid
stateDiagram-v2
    [*] --> active: POST ads
    active --> paused: owner pauses or<br />automatic pause (pausedReason)
    paused --> active: owner turns it back on
    active --> closed: owner closes
    paused --> closed: owner closes
    closed --> [*]
```

| `pausedReason`                               | Reason                                                                                |
| -------------------------------------------- | ------------------------------------------------------------------------------------- |
| `pair_disabled`                              | CorpX disabled the pair in the market.                                                |
| `advertiser_suspended`, `advertiser_refused` | The advertiser lost their approval.                                                   |
| `wallet_removed`                             | The ad's wallet was removed.                                                          |
| `insufficient_balance`                       | `buy` ad without balance to hold a taken order.                                       |
| `staff_suspended`                            | CorpX suspended the ad.                                                               |
| `cashout_locked`                             | `buy` ad: the holder blocked the account's cashout. Turn it back on after unblocking. |

* Each order **reserves** crypto from the stock on opening. Release consumes the reservation; cancellation and a refund in a dispute give it back.
* The ad only shows up in the book with free stock (stock minus reserved) above zero. With `amount` in the book filter, only ads whose minimum and maximum cover the amount come back.
* **Suspension by CorpX.** CorpX can suspend an ad (`pausedReason: staff_suspended`). While suspended, turning it back on answers `422 ad_suspended`. Orders that were already open carry on normally.
* **Cashout locks of the buying advertiser.** On a `buy` ad, the order amount is held from the advertiser's account, and they release it through their own [cashout locks](/baas/guias/autenticacao/seguranca-da-conta). So the ad only takes orders when they could pay: with cashout blocked, active `buy` ads are paused (`cashout_locked`), and creating or turning one back on answers `423 cashout_locked`; outside the cashout hours, the ad leaves the book and the detail (`404 ad_not_found`), and opening an order on it answers `409 ad_unavailable`, until the window opens. In the owner's list, a hidden active ad has `hiddenReason` (`cashout_locked` or `cashout_outside_hours`). The IP restriction does not apply: on opening, the caller is the taker.

## Intermediation fee

The fee is **paid by the advertiser** and calculated when the order opens:

`fee = order amount × feeBps of the advertiser's level ÷ 10,000`, rounded to the cent **up**. A fraction of a cent never drops to zero. The order amount, by contrast, truncates to the cent (crypto × the 4-decimal price).

| Ad     | Who advertises | Who pays the fee | How it is charged                                                                          |
| ------ | -------------- | ---------------- | ------------------------------------------------------------------------------------------ |
| `sell` | Seller         | Seller           | The seller receives the full amount and the fee is debited from their account right after. |
| `buy`  | Buyer          | Buyer            | The hold on opening already includes the fee (`heldAmount` = amount + fee).                |

The order shows `fee` and `feePayer`. The buyer sees `heldAmount`; the seller sees `netAmount`. Details and numeric examples in [Money and fee](/baas/guias/p2p/dinheiro-e-taxa).