> This page is for Internet banking (beta).

> 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.

# Get a market ad

GET https://client.api.corpx.com/v1/p2p/ads/{adId}

One ad of the book, with the same fields as an item of `GET /v1/p2p/ads` plus the pair's `network`, `asset` and `decimals`. Use it to open the order screen from a direct link or after a reload.
The advertiser's wallet and tenant are never returned: to open an order, send your own `walletId` on the pair's network. An ad that is not active, whose tenant left the book, or a buy ad whose advertiser is outside their cashout hours or has cashout blocked, is `404 ad_not_found`. An ad with no stock left still returns, with `availableAmount` at zero; `price` is null while there is no usable quote.


Reference: https://en.docs.api.corpx.com/ib/referencia/p-2-p/get-p-2-p-ad

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `adId` (string, required) — Ad id.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `X-Request-Timestamp` (string, required) — Unix seconds. Required on the signed host; tolerance is 300s either way (`403 request_timestamp_skew`).
- `X-Content-SHA256` (string, required) — Lowercase hex SHA-256 of the body. An empty body hashes the empty string, so the header is always present. Mismatch returns `400 body_hash_mismatch`.
- `X-Request-Signature` (string, required) — Detached JWS (`<protected>..<signature>`, ES256 or PS256) over `METHOD\nPATH?QUERY\nTIMESTAMP\nIDEMPOTENCY_KEY_OR_EMPTY\nX_CONTENT_SHA256`.

## Response

### 200

Ad

- `adId` (string, optional) — Ad identifier.
- `side` (enum, optional) — Advertiser side.
  - Allowed values: `sell`, `buy`
- `pair` (string, optional) — Pair code.
- `priceMode` (enum, optional) — Pricing: `spread` (bps over the Binance spot), `fixed` (fixed BRL price) or `offset` (signed BRL amount, 4 decimal places, over the Binance spot).
  - Allowed values: `spread`, `fixed`, `offset`
- `spreadBps` (integer, optional) — `spread` mode: basis points over the Binance spot.
- `offset` (string, optional) — `offset` mode: signed BRL amount per unit added to the Binance spot, 4 decimal places. Requests may still send the deprecated integer `offsetCents`; responses only send `offset`.
- `price` (string, optional, nullable) — Current BRL price per unit, 4 decimal places; `null` without a usable quote.
- `fixedPrice` (string, optional) — Fixed price per unit, 4 decimal places (owner).
- `limitsUnit` (enum, optional) — Unit the advertiser set the per-order range in.
  - Allowed values: `brl`, `asset`
- `minAmount` (string, optional) — Minimum BRL per order. With `limitsUnit` `asset` it is `minAssetAmount` at the price shown, so it moves with the price.
- `maxAmount` (string, optional) — Maximum BRL per order. With `limitsUnit` `asset` it is `maxAssetAmount` at the price shown.
- `minAssetAmount` (string, optional) — Minimum crypto per order. Only with `limitsUnit` `asset`.
- `maxAssetAmount` (string, optional) — Maximum crypto per order. Only with `limitsUnit` `asset`.
- `availableAmount` (string, optional) — Crypto available (stock minus reserved).
- `stockAmount` (string, optional) — Total stock (owner).
- `reservedAmount` (string, optional) — Reserved by open orders (owner).
- `walletId` (string, optional) — Ad wallet (owner).
- `deliveryDeadlineMin` (integer, optional) — Minutes to send after both sign.
- `instructions` (string, optional) — Advertiser instructions.
- `instructionsFlagged` (boolean, optional) — Instructions flagged for review (owner).
- `status` (enum, optional) — Ad status.
  - Allowed values: `active`, `paused`, `closed`
- `pausedReason` (string, optional) — Why the ad was paused automatically (owner). `cashout_locked` means the holder blocked the account's cashout; reactivate after unblocking.
- `hiddenReason` (enum, optional) — Owner only, active buy ads: why the market is not showing the ad right now. `cashout_locked`: cashout blocked; `cashout_outside_hours`: outside the account's cashout hours (comes back when the window opens).
  - Allowed values: `cashout_locked`, `cashout_outside_hours`
- `advertiser` (V1P2PAdsAdIdGetResponsesContentApplicationJsonSchemaAdvertiser, optional) — Advertiser (market listing).
- `createdAt` (datetime, optional, nullable) — Creation time.
- `updatedAt` (datetime, optional, nullable) — Last change.
- `network` (string, optional) — Network of the pair.
- `asset` (string, optional)
- `decimals` (integer, optional) — Decimal places of the asset amount.

## Errors

### 403 Forbidden Error

`feature_disabled`.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 404 Not Found Error

`ad_not_found`: the ad does not exist, is not active, or left the book.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

## Types

### V1P2PAdsAdIdGetResponsesContentApplicationJsonSchemaAdvertiser

Advertiser (market listing).

- `username` (string, optional) — Username.
- `reputation` (P2PReputation, optional) — Trading statistics. Values below the tenant's minimum number of orders are `null`.

### ErrorResponsePartner

Raw error from the settlement bank, when the failure came from it. Diagnostic only.

- `code` (string, optional)
- `message` (string, optional)
- `field` (string, optional) — Field the partner pointed at, when any.

### P2PReputation

Trading statistics. Values below the tenant's minimum number of orders are `null`.

- `tradesTotal` (integer, optional) — Completed orders.
- `completionPercent` (string, optional, nullable) — Completed over taken orders, in percent.
- `deliveryMedianSeconds` (integer, optional, nullable) — Median seconds between both signing and the crypto being sent.
- `deliveryPercentile` (integer, optional, nullable) — Percentile of the delivery time within the market (higher is faster).

## Examples

**Response**

```json
{
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "side": "sell",
  "pair": "USDT_TRON",
  "priceMode": "spread",
  "spreadBps": 80,
  "price": "5.46",
  "minAmount": "100.00",
  "maxAmount": "5000.00",
  "availableAmount": "1500.000000",
  "deliveryDeadlineMin": 30,
  "status": "active",
  "advertiser": {
    "username": "mesa.sul",
    "reputation": {
      "tradesTotal": 42,
      "completionPercent": "97.61",
      "deliveryMedianSeconds": 540,
      "deliveryPercentile": 82
    }
  },
  "createdAt": "2026-10-31T14:05:00Z",
  "updatedAt": "2026-10-31T14:05:00Z",
  "network": "tron",
  "asset": "USDT",
  "decimals": 6
}
```

**SDK Code**

```python P2P_getP2PAd_example
import requests

url = "https://client.api.corpx.com/v1/p2p/ads/p2a_01JB8Z6Q4C9K7X2M3N5P"

headers = {
    "X-Content-SHA256": "X-Content-SHA256",
    "X-Request-Signature": "X-Request-Signature",
    "X-Request-Timestamp": "X-Request-Timestamp",
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript P2P_getP2PAd_example
const url = 'https://client.api.corpx.com/v1/p2p/ads/p2a_01JB8Z6Q4C9K7X2M3N5P';
const options = {
  method: 'GET',
  headers: {
    'X-Content-SHA256': 'X-Content-SHA256',
    'X-Request-Signature': 'X-Request-Signature',
    'X-Request-Timestamp': 'X-Request-Timestamp',
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go P2P_getP2PAd_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://client.api.corpx.com/v1/p2p/ads/p2a_01JB8Z6Q4C9K7X2M3N5P"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Content-SHA256", "X-Content-SHA256")
	req.Header.Add("X-Request-Signature", "X-Request-Signature")
	req.Header.Add("X-Request-Timestamp", "X-Request-Timestamp")
	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby P2P_getP2PAd_example
require 'uri'
require 'net/http'

url = URI("https://client.api.corpx.com/v1/p2p/ads/p2a_01JB8Z6Q4C9K7X2M3N5P")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Content-SHA256"] = 'X-Content-SHA256'
request["X-Request-Signature"] = 'X-Request-Signature'
request["X-Request-Timestamp"] = 'X-Request-Timestamp'
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java P2P_getP2PAd_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://client.api.corpx.com/v1/p2p/ads/p2a_01JB8Z6Q4C9K7X2M3N5P")
  .header("X-Content-SHA256", "X-Content-SHA256")
  .header("X-Request-Signature", "X-Request-Signature")
  .header("X-Request-Timestamp", "X-Request-Timestamp")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php P2P_getP2PAd_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://client.api.corpx.com/v1/p2p/ads/p2a_01JB8Z6Q4C9K7X2M3N5P', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Content-SHA256' => 'X-Content-SHA256',
    'X-Request-Signature' => 'X-Request-Signature',
    'X-Request-Timestamp' => 'X-Request-Timestamp',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

echo $response->getBody();
```

```csharp P2P_getP2PAd_example
using RestSharp;

var client = new RestClient("https://client.api.corpx.com/v1/p2p/ads/p2a_01JB8Z6Q4C9K7X2M3N5P");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Content-SHA256", "X-Content-SHA256");
request.AddHeader("X-Request-Signature", "X-Request-Signature");
request.AddHeader("X-Request-Timestamp", "X-Request-Timestamp");
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift P2P_getP2PAd_example
import Foundation

let headers = [
  "X-Content-SHA256": "X-Content-SHA256",
  "X-Request-Signature": "X-Request-Signature",
  "X-Request-Timestamp": "X-Request-Timestamp",
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://client.api.corpx.com/v1/p2p/ads/p2a_01JB8Z6Q4C9K7X2M3N5P")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```