> This page is for BaaS.

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

# Open a P2P order

POST https://tenant.api.corpx.com/v1/accounts/{accountId}/p2p/orders
Content-Type: application/json

Takes an ad. Inform exactly one of `amount` (BRL) or `cryptoAmount`. CorpX screens both wallets, reserves
the ad's stock and holds the buyer's BRL before answering `201`. Then the contract goes out for signature:
the buyer signs first, and the seller has `sellerWindowMin` after that to sign and send the crypto.
`202` means the opening is still running; read the order or wait for `p2p.order.updated`.

The order price is locked with a live read of the Binance spot price (`{ASSET}BRL`) at opening, also for fixed-price ads, and the full HTTP exchange (request, response, headers, TLS, timestamps, hashes) is stored as the order's price evidence (`GET .../orders/{orderId}/price-evidence`). If Binance does not answer, the order is refused with `409 price_unavailable` and nothing is created or locked; retry with the same `Idempotency-Key`. A replay with the same key does not query Binance again.

M2M only (scope `p2p.trade`). Cashout locks and the transaction PIN apply only when the taker is the buyer (sell ad): that is whose balance is held. Taking a buy ad opens without a PIN. `Idempotency-Key` is required.
On `wallet_not_approved`, `details.walletOf` says whose wallet was refused (`taker` or `maker`).

Reference: https://docs.api.corpx.com/baas/referencia/p-2-p/create-p-2-p-order

## Authentication

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

## Request

### Path parameters

- `accountId` (string, required) — Account identifier.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, required) — Client-generated idempotency token.
- `X-Acting-Document` (string, optional) — CPF of the human performing the operation. Required on cashout routes when the credential enforces a transaction PIN. On a company P2P profile contact, this CPF is the holder who signs; it is not taken from the body.
- `X-Transaction-Pin` (string, optional) — Transaction PIN of the operator in `X-Acting-Document`. Required on cashout routes when the credential enforces a PIN (`428 pin_required`).

### Body (application/json)

This endpoint expects an object.

- `adId` (string, required)
- `walletId` (string, required) — Your approved wallet: destination when you buy, source when you sell.
- `amount` (string, optional) — BRL amount.
- `cryptoAmount` (string, optional) — Crypto amount.

## Response

### 200

Idempotent retry

- `orderId` (string, optional) — Order identifier.
- `adId` (string, optional) — Ad taken.
- `role` (enum, optional) — Your role.
  - Allowed values: `buyer`, `seller`
- `side` (enum, optional) — Your side.
  - Allowed values: `buy`, `sell`
- `pair` (string, optional) — Pair code.
- `network` (string, optional) — Network.
- `status` (enum, optional) — Order status.
  - Allowed values: `opening`, `funded`, `signing`, `signed`, `crypto_sent`, `crypto_confirmed`, `released`, `disputed`, `resolved`, `cancelled`
- `amount` (string, optional) — BRL amount.
- `cryptoAmount` (string, optional) — Crypto amount.
- `price` (string, optional) — BRL price per unit locked at opening, 4 decimal places. The order amount is in cents.
- `fee` (string, optional) — CorpX fee.
- `feePayer` (enum, optional) — Party that pays the fee (the advertiser).
  - Allowed values: `buyer`, `seller`
- `heldAmount` (string, optional) — BRL held from the buyer (buyer view).
- `netAmount` (string, optional) — BRL the seller receives (seller view).
- `destinationAddress` (string, optional) — Wallet the crypto must reach.
- `counterparty` (P2POrderCounterparty, optional) — The other party: only `username` and reputation. Name and masked document appear only in the receipt (`GET .../p2p/orders/{orderId}/receipt`) of a concluded order.
- `holdId` (string, optional) — Hold of the buyer's BRL (buyer view).
- `deadlineAt` (datetime, optional, nullable) — The deadline running now for the current status; `null` in dispute or a final status.
- `concluded` (boolean, optional) — Detail only. `true` when the order is `released` (or `resolved` with `release_to_seller`), both parties signed, the seller was paid and the fee was charged.
- `concludedAt` (datetime, optional, nullable) — Detail only. When the last conclusion step happened.
- `timeline` (list of P2POrderTimelineEntry, optional) — Detail only. Order history from the viewer's point of view, oldest first.
- `dispute` (P2POrderDispute, optional) — Detail only, when the order has a dispute. The dispute plus `messages` and the viewer's own `evidence`.
- `signatureUrl` (string, optional) — Your signing link while your signature is pending.
- `signatures` (list of P2POrderSignaturesItems, optional) — Signature state per party.
- `txids` (list of P2POrderTxidsItems, optional) — Transactions reported by the seller.
- `contractAvailable` (boolean, optional) — Your signed copy can be downloaded.
- `signingDeadlineAt` (datetime, optional, nullable) — Buyer's signing deadline.
- `buyerSignedAt` (datetime, optional, nullable) — Buyer signed.
- `sellerSignedAt` (datetime, optional, nullable) — Seller signed.
- `sellerDeadlineAt` (datetime, optional, nullable) — Seller's deadline to sign and send.
- `onchainDeadlineAt` (datetime, optional, nullable) — Deadline for the network confirmation.
- `releaseDeadlineAt` (datetime, optional, nullable) — Buyer's deadline to release.
- `releasedBeforeConfirmed` (boolean, optional) — Released before the confirmations completed.
- `fundedAt` (datetime, optional, nullable) — BRL held.
- `signedAt` (datetime, optional, nullable) — Both signed.
- `cryptoSentAt` (datetime, optional, nullable) — Txid reported.
- `cryptoConfirmedAt` (datetime, optional, nullable) — Network confirmed.
- `releasedAt` (datetime, optional, nullable) — BRL released.
- `cancelledAt` (datetime, optional, nullable) — Cancelled.
- `disputedAt` (datetime, optional, nullable) — Dispute opened.
- `resolvedAt` (datetime, optional, nullable) — Dispute decided.
- `cancelledBy` (string, optional) — Who cancelled.
- `fault` (string, optional) — Party at fault.
- `cancelReason` (string, optional) — Cancellation reason.
- `lastError` (string, optional) — Last processing error.
- `createdAt` (datetime, optional, nullable) — Creation time.
- `updatedAt` (datetime, optional, nullable) — Last change.

### 201

Order funded

- `orderId` (string, optional) — Order identifier.
- `adId` (string, optional) — Ad taken.
- `role` (enum, optional) — Your role.
  - Allowed values: `buyer`, `seller`
- `side` (enum, optional) — Your side.
  - Allowed values: `buy`, `sell`
- `pair` (string, optional) — Pair code.
- `network` (string, optional) — Network.
- `status` (enum, optional) — Order status.
  - Allowed values: `opening`, `funded`, `signing`, `signed`, `crypto_sent`, `crypto_confirmed`, `released`, `disputed`, `resolved`, `cancelled`
- `amount` (string, optional) — BRL amount.
- `cryptoAmount` (string, optional) — Crypto amount.
- `price` (string, optional) — BRL price per unit locked at opening, 4 decimal places. The order amount is in cents.
- `fee` (string, optional) — CorpX fee.
- `feePayer` (enum, optional) — Party that pays the fee (the advertiser).
  - Allowed values: `buyer`, `seller`
- `heldAmount` (string, optional) — BRL held from the buyer (buyer view).
- `netAmount` (string, optional) — BRL the seller receives (seller view).
- `destinationAddress` (string, optional) — Wallet the crypto must reach.
- `counterparty` (P2POrderCounterparty, optional) — The other party: only `username` and reputation. Name and masked document appear only in the receipt (`GET .../p2p/orders/{orderId}/receipt`) of a concluded order.
- `holdId` (string, optional) — Hold of the buyer's BRL (buyer view).
- `deadlineAt` (datetime, optional, nullable) — The deadline running now for the current status; `null` in dispute or a final status.
- `concluded` (boolean, optional) — Detail only. `true` when the order is `released` (or `resolved` with `release_to_seller`), both parties signed, the seller was paid and the fee was charged.
- `concludedAt` (datetime, optional, nullable) — Detail only. When the last conclusion step happened.
- `timeline` (list of P2POrderTimelineEntry, optional) — Detail only. Order history from the viewer's point of view, oldest first.
- `dispute` (P2POrderDispute, optional) — Detail only, when the order has a dispute. The dispute plus `messages` and the viewer's own `evidence`.
- `signatureUrl` (string, optional) — Your signing link while your signature is pending.
- `signatures` (list of P2POrderSignaturesItems, optional) — Signature state per party.
- `txids` (list of P2POrderTxidsItems, optional) — Transactions reported by the seller.
- `contractAvailable` (boolean, optional) — Your signed copy can be downloaded.
- `signingDeadlineAt` (datetime, optional, nullable) — Buyer's signing deadline.
- `buyerSignedAt` (datetime, optional, nullable) — Buyer signed.
- `sellerSignedAt` (datetime, optional, nullable) — Seller signed.
- `sellerDeadlineAt` (datetime, optional, nullable) — Seller's deadline to sign and send.
- `onchainDeadlineAt` (datetime, optional, nullable) — Deadline for the network confirmation.
- `releaseDeadlineAt` (datetime, optional, nullable) — Buyer's deadline to release.
- `releasedBeforeConfirmed` (boolean, optional) — Released before the confirmations completed.
- `fundedAt` (datetime, optional, nullable) — BRL held.
- `signedAt` (datetime, optional, nullable) — Both signed.
- `cryptoSentAt` (datetime, optional, nullable) — Txid reported.
- `cryptoConfirmedAt` (datetime, optional, nullable) — Network confirmed.
- `releasedAt` (datetime, optional, nullable) — BRL released.
- `cancelledAt` (datetime, optional, nullable) — Cancelled.
- `disputedAt` (datetime, optional, nullable) — Dispute opened.
- `resolvedAt` (datetime, optional, nullable) — Dispute decided.
- `cancelledBy` (string, optional) — Who cancelled.
- `fault` (string, optional) — Party at fault.
- `cancelReason` (string, optional) — Cancellation reason.
- `lastError` (string, optional) — Last processing error.
- `createdAt` (datetime, optional, nullable) — Creation time.
- `updatedAt` (datetime, optional, nullable) — Last change.

### 202

Opening in progress

- `orderId` (string, optional) — Order identifier.
- `adId` (string, optional) — Ad taken.
- `role` (enum, optional) — Your role.
  - Allowed values: `buyer`, `seller`
- `side` (enum, optional) — Your side.
  - Allowed values: `buy`, `sell`
- `pair` (string, optional) — Pair code.
- `network` (string, optional) — Network.
- `status` (enum, optional) — Order status.
  - Allowed values: `opening`, `funded`, `signing`, `signed`, `crypto_sent`, `crypto_confirmed`, `released`, `disputed`, `resolved`, `cancelled`
- `amount` (string, optional) — BRL amount.
- `cryptoAmount` (string, optional) — Crypto amount.
- `price` (string, optional) — BRL price per unit locked at opening, 4 decimal places. The order amount is in cents.
- `fee` (string, optional) — CorpX fee.
- `feePayer` (enum, optional) — Party that pays the fee (the advertiser).
  - Allowed values: `buyer`, `seller`
- `heldAmount` (string, optional) — BRL held from the buyer (buyer view).
- `netAmount` (string, optional) — BRL the seller receives (seller view).
- `destinationAddress` (string, optional) — Wallet the crypto must reach.
- `counterparty` (P2POrderCounterparty, optional) — The other party: only `username` and reputation. Name and masked document appear only in the receipt (`GET .../p2p/orders/{orderId}/receipt`) of a concluded order.
- `holdId` (string, optional) — Hold of the buyer's BRL (buyer view).
- `deadlineAt` (datetime, optional, nullable) — The deadline running now for the current status; `null` in dispute or a final status.
- `concluded` (boolean, optional) — Detail only. `true` when the order is `released` (or `resolved` with `release_to_seller`), both parties signed, the seller was paid and the fee was charged.
- `concludedAt` (datetime, optional, nullable) — Detail only. When the last conclusion step happened.
- `timeline` (list of P2POrderTimelineEntry, optional) — Detail only. Order history from the viewer's point of view, oldest first.
- `dispute` (P2POrderDispute, optional) — Detail only, when the order has a dispute. The dispute plus `messages` and the viewer's own `evidence`.
- `signatureUrl` (string, optional) — Your signing link while your signature is pending.
- `signatures` (list of P2POrderSignaturesItems, optional) — Signature state per party.
- `txids` (list of P2POrderTxidsItems, optional) — Transactions reported by the seller.
- `contractAvailable` (boolean, optional) — Your signed copy can be downloaded.
- `signingDeadlineAt` (datetime, optional, nullable) — Buyer's signing deadline.
- `buyerSignedAt` (datetime, optional, nullable) — Buyer signed.
- `sellerSignedAt` (datetime, optional, nullable) — Seller signed.
- `sellerDeadlineAt` (datetime, optional, nullable) — Seller's deadline to sign and send.
- `onchainDeadlineAt` (datetime, optional, nullable) — Deadline for the network confirmation.
- `releaseDeadlineAt` (datetime, optional, nullable) — Buyer's deadline to release.
- `releasedBeforeConfirmed` (boolean, optional) — Released before the confirmations completed.
- `fundedAt` (datetime, optional, nullable) — BRL held.
- `signedAt` (datetime, optional, nullable) — Both signed.
- `cryptoSentAt` (datetime, optional, nullable) — Txid reported.
- `cryptoConfirmedAt` (datetime, optional, nullable) — Network confirmed.
- `releasedAt` (datetime, optional, nullable) — BRL released.
- `cancelledAt` (datetime, optional, nullable) — Cancelled.
- `disputedAt` (datetime, optional, nullable) — Dispute opened.
- `resolvedAt` (datetime, optional, nullable) — Dispute decided.
- `cancelledBy` (string, optional) — Who cancelled.
- `fault` (string, optional) — Party at fault.
- `cancelReason` (string, optional) — Cancellation reason.
- `lastError` (string, optional) — Last processing error.
- `createdAt` (datetime, optional, nullable) — Creation time.
- `updatedAt` (datetime, optional, nullable) — Last change.

## Errors

### 400 Bad Request Error

`missing_idempotency_key`, `invalid_payload`, `missing_fields` or `invalid_amount`.

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

### 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`, `wallet_not_found` or account not found.

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

### 409 Conflict Error

`ad_unavailable` (also when the buy-ad advertiser is outside their cashout hours or has cashout blocked), `price_unavailable` (Binance did not answer; nothing created), `self_trade` or `idempotency_conflict`.

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

### 422 Unprocessable Entity Error

`amount_out_of_ad_limits`, `amount_above_cap`, `wallet_not_approved`, `insufficient_available_balance`, `p2p_contact_unverified` or `signer_contact_missing`.

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

### 503 Service Unavailable Error

`screening_unavailable`, `order_unavailable`, `hold_lock_unknown` or `temporal_unavailable`. Nothing stayed locked, except on `hold_lock_unknown`.

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

### P2POrderCounterparty

The other party: only `username` and reputation. Name and masked document appear only in the receipt (`GET .../p2p/orders/{orderId}/receipt`) of a concluded order.

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

### P2POrderTimelineEntry

One step of the order history. `title` is ready to show, in Portuguese and relative to the viewer. The counterparty is never named and CorpX staff shows only as `corpx`.

- `at` (datetime, optional)
- `type` (string, optional) — Step type (`funded`, `signing_started`, `buyer_signed`, `crypto_sent`, `txid_checked`, `crypto_confirmed`, `released`, `dispute_opened`, `cancelled`, `fee_charged`, ...).
- `title` (string, optional)
- `actor` (enum, optional)
  - Allowed values: `buyer`, `seller`, `corpx`, `system`
- `actorIsYou` (boolean, optional)
- `fromStatus` (string, optional)
- `toStatus` (string, optional)
- `data` (map from string to any, optional) — Public fields of the step (amount, deadline, txid, confirmations, reason).

### P2POrderDispute

Detail only, when the order has a dispute. The dispute plus `messages` and the viewer's own `evidence`.

### P2POrderSignaturesItems

- `role` (string, optional) — Party.
- `status` (enum, optional) — Signature status.
  - Allowed values: `pending`, `sent`, `signed`, `rejected`, `expired`, `cancelled`
- `signedAt` (datetime, optional, nullable) — Signing time.

### P2POrderTxidsItems

- `txid` (string, optional) — Transaction id.
- `network` (string, optional) — Network.
- `checkStatus` (string, optional) — Check status.
- `onchainStatus` (string, optional) — Network status.
- `screeningStatus` (string, optional) — Risk screening of the transaction.
- `amount` (string, optional) — Amount seen on the network.
- `confirmations` (integer, optional) — Confirmations.
- `checkedAt` (datetime, optional, nullable) — Last check.
- `createdAt` (datetime, optional, nullable) — Report time.

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

### P2P_createP2POrder_example

**Request**

```json
{
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
}
```

**Response**

```json
{
  "orderId": "p2o_01JB8Z6Q4C9K7X2M3N5P",
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "role": "buyer",
  "side": "buy",
  "pair": "USDT_TRON",
  "network": "TRON",
  "status": "signing",
  "amount": "546.00",
  "cryptoAmount": "100",
  "price": "5.46",
  "fee": "0.00",
  "feePayer": "seller",
  "heldAmount": "546.00",
  "destinationAddress": "TQ5Nj4oxdkN1kq6bQSgWvVQb8m1Gj8hQ2x",
  "counterparty": {
    "username": "mesa.sul",
    "reputation": {
      "tradesTotal": 42,
      "completionPercent": "97.61",
      "deliveryMedianSeconds": 540,
      "deliveryPercentile": 82
    }
  },
  "signatureUrl": "https://sign.dracmatrust.com/s/8f2c1a",
  "signatures": [
    {
      "role": "buyer",
      "status": "sent",
      "signedAt": null
    },
    {
      "role": "seller",
      "status": "pending",
      "signedAt": null
    }
  ],
  "txids": [],
  "contractAvailable": false,
  "signingDeadlineAt": "2026-10-31T14:20:00Z",
  "buyerSignedAt": null,
  "sellerSignedAt": null,
  "sellerDeadlineAt": null,
  "onchainDeadlineAt": null,
  "releaseDeadlineAt": null,
  "releasedBeforeConfirmed": false,
  "fundedAt": "2026-10-31T14:05:00Z",
  "createdAt": "2026-10-31T14:05:00Z",
  "updatedAt": "2026-10-31T14:05:00Z"
}
```

**SDK Code**

```python P2P_createP2POrder_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders"

payload = {
    "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
    "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
    "amount": "546.00"
}
headers = {
    "Idempotency-Key": "Idempotency-Key",
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript P2P_createP2POrder_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'Idempotency-Key',
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"adId":"p2a_01JB8Z6Q4C9K7X2M3N5P","walletId":"p2w_01JB8Z6Q4C9K7X2M3N5P","amount":"546.00"}'
};

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

```go P2P_createP2POrder_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders"

	payload := strings.NewReader("{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "Idempotency-Key")
	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'Idempotency-Key'
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")
  .header("Idempotency-Key", "Idempotency-Key")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders', [
  'body' => '{
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'Idempotency-Key',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp P2P_createP2POrder_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "Idempotency-Key");
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift P2P_createP2POrder_example
import Foundation

let headers = [
  "Idempotency-Key": "Idempotency-Key",
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### P2P_createP2POrder_example

**Request**

```json
{
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
}
```

**Response**

```json
{
  "orderId": "p2o_01JB8Z6Q4C9K7X2M3N5P",
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "role": "buyer",
  "side": "buy",
  "pair": "USDT_TRON",
  "network": "TRON",
  "status": "signing",
  "amount": "546.00",
  "cryptoAmount": "100",
  "price": "5.46",
  "fee": "0.00",
  "feePayer": "seller",
  "heldAmount": "546.00",
  "destinationAddress": "TQ5Nj4oxdkN1kq6bQSgWvVQb8m1Gj8hQ2x",
  "counterparty": {
    "username": "mesa.sul",
    "reputation": {
      "tradesTotal": 42,
      "completionPercent": "97.61",
      "deliveryMedianSeconds": 540,
      "deliveryPercentile": 82
    }
  },
  "signatureUrl": "https://sign.dracmatrust.com/s/8f2c1a",
  "signatures": [
    {
      "role": "buyer",
      "status": "sent",
      "signedAt": null
    },
    {
      "role": "seller",
      "status": "pending",
      "signedAt": null
    }
  ],
  "txids": [],
  "contractAvailable": false,
  "signingDeadlineAt": "2026-10-31T14:20:00Z",
  "buyerSignedAt": null,
  "sellerSignedAt": null,
  "sellerDeadlineAt": null,
  "onchainDeadlineAt": null,
  "releaseDeadlineAt": null,
  "releasedBeforeConfirmed": false,
  "fundedAt": "2026-10-31T14:05:00Z",
  "createdAt": "2026-10-31T14:05:00Z",
  "updatedAt": "2026-10-31T14:05:00Z"
}
```

**SDK Code**

```python P2P_createP2POrder_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders"

payload = {
    "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
    "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
    "amount": "546.00"
}
headers = {
    "Idempotency-Key": "Idempotency-Key",
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript P2P_createP2POrder_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'Idempotency-Key',
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"adId":"p2a_01JB8Z6Q4C9K7X2M3N5P","walletId":"p2w_01JB8Z6Q4C9K7X2M3N5P","amount":"546.00"}'
};

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

```go P2P_createP2POrder_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders"

	payload := strings.NewReader("{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "Idempotency-Key")
	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'Idempotency-Key'
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")
  .header("Idempotency-Key", "Idempotency-Key")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders', [
  'body' => '{
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'Idempotency-Key',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp P2P_createP2POrder_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "Idempotency-Key");
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift P2P_createP2POrder_example
import Foundation

let headers = [
  "Idempotency-Key": "Idempotency-Key",
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### P2P_createP2POrder_example

**Request**

```json
{
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
}
```

**Response**

```json
{
  "orderId": "p2o_01JB8Z6Q4C9K7X2M3N5P",
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "role": "buyer",
  "side": "buy",
  "pair": "USDT_TRON",
  "network": "TRON",
  "status": "opening",
  "amount": "546.00",
  "cryptoAmount": "100",
  "price": "5.46",
  "fee": "0.00",
  "feePayer": "seller",
  "heldAmount": "546.00",
  "destinationAddress": "TQ5Nj4oxdkN1kq6bQSgWvVQb8m1Gj8hQ2x",
  "counterparty": {
    "username": "mesa.sul",
    "reputation": {
      "tradesTotal": 42,
      "completionPercent": "97.61",
      "deliveryMedianSeconds": 540,
      "deliveryPercentile": 82
    }
  },
  "signatureUrl": "https://sign.dracmatrust.com/s/8f2c1a",
  "signatures": [
    {
      "role": "buyer",
      "status": "sent",
      "signedAt": null
    },
    {
      "role": "seller",
      "status": "pending",
      "signedAt": null
    }
  ],
  "txids": [],
  "contractAvailable": false,
  "signingDeadlineAt": "2026-10-31T14:20:00Z",
  "buyerSignedAt": null,
  "sellerSignedAt": null,
  "sellerDeadlineAt": null,
  "onchainDeadlineAt": null,
  "releaseDeadlineAt": null,
  "releasedBeforeConfirmed": false,
  "fundedAt": "2026-10-31T14:05:00Z",
  "createdAt": "2026-10-31T14:05:00Z",
  "updatedAt": "2026-10-31T14:05:00Z"
}
```

**SDK Code**

```python P2P_createP2POrder_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders"

payload = {
    "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
    "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
    "amount": "546.00"
}
headers = {
    "Idempotency-Key": "Idempotency-Key",
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript P2P_createP2POrder_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'Idempotency-Key',
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"adId":"p2a_01JB8Z6Q4C9K7X2M3N5P","walletId":"p2w_01JB8Z6Q4C9K7X2M3N5P","amount":"546.00"}'
};

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

```go P2P_createP2POrder_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders"

	payload := strings.NewReader("{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "Idempotency-Key")
	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'Idempotency-Key'
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")
  .header("Idempotency-Key", "Idempotency-Key")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders', [
  'body' => '{
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'Idempotency-Key',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp P2P_createP2POrder_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "Idempotency-Key");
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"adId\": \"p2a_01JB8Z6Q4C9K7X2M3N5P\",\n  \"walletId\": \"p2w_01JB8Z6Q4C9K7X2M3N5P\",\n  \"amount\": \"546.00\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift P2P_createP2POrder_example
import Foundation

let headers = [
  "Idempotency-Key": "Idempotency-Key",
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "adId": "p2a_01JB8Z6Q4C9K7X2M3N5P",
  "walletId": "p2w_01JB8Z6Q4C9K7X2M3N5P",
  "amount": "546.00"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/p2p/orders")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```