---
title: "Mock a trade (non-production only)"
method: POST
path: "/trades/sell/mock-trade"
tags: ["Testing"]
---

# Mock a trade (non-production only)

`POST /trades/sell/mock-trade`

## Request

- Base URL: `https://api.breet.io/v1`
- URL: `https://api.breet.io/v1/trades/sell/mock-trade`
- Auth: API key in header `x-app-id` and API key in header `x-app-secret` and API key in header `X-Breet-Env`
- TypeScript: <https://skmtc.dev/breet/apis/breet-public-api/docs/trades/sell/mock-trade/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Request body

- object
  - `walletAddress` string, required: The deposit wallet address (from Generate Wallet Address or Fetch Wallet Addresses). Must belong to your integration and match the asset.
  - `asset` string, required: Asset identifier (e.g. TRX_TEST, USDC_TEST3). Must match the wallet's asset. Use GET /trades/assets for the list.
  - `amountInUSD` number, required: Amount in USD (must be greater than zero).
  - `cryptoReceived` number, required: Crypto amount received (must be greater than zero).
  - `reference` string, required: Unique reference for this mock transaction (e.g. UUID or test ref).
  - `txHash` string, required: Mock transaction hash for the deposit.
  - `sourceAddress` string: Optional sender/source address for the mock deposit.
  - `confirmations` integer: Optional number of confirmations to simulate (positive integer).

## Response `200`

Mock trade initiated successfully; the trade will be processed asynchronously.

## Other responses

- `401`: Invalid or missing API credentials
- `403`: Mock trade is not allowed in production. Use X-Breet-Env: sandbox.
- `404`: Wallet not found for the given walletAddress and asset.
- `422`: Request validation failed — check the errors array for field-level details
- `500`: An unexpected server error occurred

---

[API](https://skmtc.dev/breet/apis/breet-public-api.md) - [All operations](https://skmtc.dev/breet/apis/breet-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/breet/apis/breet-public-api/revisions/a2559b3ef61f?raw)
