curl --request POST \
--url https://api.breet.io/v1/trades/sell/mock-trade \
--header 'Content-Type: application/json' \
--header 'X-Breet-Env: <api-key>' \
--header 'x-app-id: <api-key>' \
--header 'x-app-secret: <api-key>' \
--data '
{
"walletAddress": "TV8dNYYBgL3xLbQcJLMBNavY4gYNqPF8Jv",
"asset": "TRX_TEST",
"amountInUSD": 50,
"cryptoReceived": 500,
"reference": "mock-ref-550e8400-e29b-41d4-a716-446655440000",
"txHash": "0xmock550e8400e29b41d4a716446655440000"
}
'{
"message": "mock trade initiated",
"success": true,
"data": {},
"meta": {},
"summary": {},
"stats": {}
}Testing
Mock a trade (non-production only)
Simulates an incoming deposit so you can test your integration without sending real crypto. Only available when X-Breet-Env is sandbox. The wallet is identified by walletAddress; it must match the given asset. The trade is processed as if it came from the blockchain and will trigger the same webhooks and flows as a real deposit.
POST
/
trades
/
sell
/
mock-trade
curl --request POST \
--url https://api.breet.io/v1/trades/sell/mock-trade \
--header 'Content-Type: application/json' \
--header 'X-Breet-Env: <api-key>' \
--header 'x-app-id: <api-key>' \
--header 'x-app-secret: <api-key>' \
--data '
{
"walletAddress": "TV8dNYYBgL3xLbQcJLMBNavY4gYNqPF8Jv",
"asset": "TRX_TEST",
"amountInUSD": 50,
"cryptoReceived": 500,
"reference": "mock-ref-550e8400-e29b-41d4-a716-446655440000",
"txHash": "0xmock550e8400e29b41d4a716446655440000"
}
'{
"message": "mock trade initiated",
"success": true,
"data": {},
"meta": {},
"summary": {},
"stats": {}
}Authorizations
Body
application/json
Sandbox only. Picks the test outcome the mock deposit should simulate. Each value drives a different webhook sequence. If omitted, the deposit follows the happy path and ends credited.
completed— happy path. Webhook:trade.pending→trade.completed.confirming— deposit stays pending, waiting for more confirmations. Webhook:trade.pendingonly. Useful for testing your pending-state UI.below_minimum— deposit is flagged for being under the asset's minimum. Webhook:trade.pending→trade.flaggedwithbalanceRemaining. Requires youramountInUSDto actually be below the asset minimum.failed_on_chain— on-chain transaction fails to confirm. Webhook:trade.pending→trade.deletedwithreason: failed_on_chain.under_review— compliance review holds the deposit and then rejects it. Webhook:trade.flagged(subStatus: under_review) →trade.deletedwithreason: rejected_after_review.kyt_hold— AML screening flags the deposit. Webhook:trade.pending→trade.flagged(subStatus: under_review) with a populatedkytobject.
Available options:
completed, confirming, below_minimum, failed_on_chain, under_review, kyt_hold Response
Mock trade initiated successfully; the trade will be processed asynchronously.
Was this page helpful?