Skip to navigation

Open a P2P order

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

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

accountIdstringRequired
Account identifier.

Headers

X-Tenant-IdstringRequired
Tenant context used for authorization and routing.
Idempotency-KeystringRequired>=8 characters

Client-generated idempotency token.

X-Acting-DocumentstringOptional

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

Transaction PIN of the operator in X-Acting-Document. Required on cashout routes when the credential enforces a PIN (428 pin_required).

Request

This endpoint expects an object.
adIdstringRequired
walletIdstringRequired

Your approved wallet: destination when you buy, source when you sell.

amountstringOptional
BRL amount.
cryptoAmountstringOptional
Crypto amount.

Response

Idempotent retry
orderIdstringOptional
Order identifier.
adIdstringOptional
Ad taken.
roleenumOptional
Your role.
Allowed values:
sideenumOptional
Your side.
Allowed values:
pairstringOptional
Pair code.
networkstringOptional
Network.
statusenumOptional
Order status.
amountstringOptional
BRL amount.
cryptoAmountstringOptional
Crypto amount.
pricestringOptional
BRL price per unit locked at opening, 4 decimal places. The order amount is in cents.
feestringOptional
CorpX fee.
feePayerenumOptional

Party that pays the fee (the advertiser).

Allowed values:
heldAmountstringOptional

BRL held from the buyer (buyer view).

netAmountstringOptional

BRL the seller receives (seller view).

destinationAddressstringOptional
Wallet the crypto must reach.
counterpartyobjectOptional

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.

holdIdstringOptional

Hold of the buyer’s BRL (buyer view).

deadlineAtdatetime or nullOptional

The deadline running now for the current status; null in dispute or a final status.

concludedbooleanOptional

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.

concludedAtdatetime or nullOptional
Detail only. When the last conclusion step happened.
timelinelist of objectsOptional
Detail only. Order history from the viewer's point of view, oldest first.
disputeobjectOptional

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

signatureUrlstringOptionalformat: "uri"
Your signing link while your signature is pending.
signatureslist of objectsOptional
Signature state per party.
txidslist of objectsOptional
Transactions reported by the seller.
contractAvailablebooleanOptional
Your signed copy can be downloaded.
signingDeadlineAtdatetime or nullOptional
Buyer's signing deadline.
buyerSignedAtdatetime or nullOptional
Buyer signed.
sellerSignedAtdatetime or nullOptional
Seller signed.
sellerDeadlineAtdatetime or nullOptional
Seller's deadline to sign and send.
onchainDeadlineAtdatetime or nullOptional
Deadline for the network confirmation.
releaseDeadlineAtdatetime or nullOptional
Buyer's deadline to release.
releasedBeforeConfirmedbooleanOptional
Released before the confirmations completed.
fundedAtdatetime or nullOptional
BRL held.
signedAtdatetime or nullOptional
Both signed.
cryptoSentAtdatetime or nullOptional
Txid reported.
cryptoConfirmedAtdatetime or nullOptional
Network confirmed.
releasedAtdatetime or nullOptional
BRL released.
cancelledAtdatetime or nullOptional
Cancelled.
disputedAtdatetime or nullOptional
Dispute opened.
resolvedAtdatetime or nullOptional
Dispute decided.
cancelledBystringOptional
Who cancelled.
faultstringOptional
Party at fault.
cancelReasonstringOptional
Cancellation reason.
lastErrorstringOptional
Last processing error.
createdAtdatetime or nullOptional
Creation time.
updatedAtdatetime or nullOptional
Last change.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
503
Service Unavailable Error