---
title: "Add test funds (paper trading only)"
url: https://docs.truemarkets.co/api/gateway/create-paper-deposit
description: "**Paper-trading environments only.** This endpoint is not served in production, where it answers `404`. It exists so integrations can be exercised end to end in a sandbox without moving real money."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Add test funds (paper trading only)

```
POST https://api.truemarkets.co/v1/gateway/paper/deposits
```

**Paper-trading environments only.** This endpoint is not served in production, where it answers `404`. It exists so integrations can be exercised end to end in a sandbox without moving real money.

Mints `amount` of the DeFi listing `asset_id` into the caller's paper wallet. When the funds are allocated, the caller's CeFi trading account is set up if it has none and the same amount is allocated to CeFi trading through `POST /cefi/allocations`, returned in `allocation`. With `allocate` unset, only a listing with a CeFi market is allocated; a DeFi-only listing stays in the wallet. `allocate: true` on a DeFi-only listing answers `400` before anything is minted. The allocation settles in the background exactly like any other; poll `GET /cefi/allocations/{id}` for its outcome.

If the allocation step fails, the minted funds stay in the wallet unallocated.

## Authentication

Bearer token in `Authorization`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `TM-On-Behalf-Of` | header | string (uuid) | no | Act as one of your organization's users. The value is the `user_id` returned when the user was created; the request then reads and writes that user's account. Requires an organization token and a user your organization created: `400` for a personal token, a repeated header or a non-UUID, `403` for a user outside your organization. Not accepted on organization-scoped routes. |

## Request body

`application/json`, required

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `asset_id` | string (uuid) | yes | DeFi listing identifier (UUID) |
| `amount` | string | yes | Amount to add, as a positive decimal string in asset units |
| `allocate` | boolean | no | Whether to also allocate the added funds to CeFi trading through an allocation. Unset allocates them when the listing has a CeFi market. |

Example:

```json
{
  "asset_id": "b3d9e5f2-1a4c-4e7b-9f0d-2c8a6b3e5f91",
  "amount": "1000",
  "allocate": true
}
```

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 200

Test funds added, and allocated to CeFi trading when `allocation` is present

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `asset_id` | string (uuid) | yes | DeFi listing identifier (UUID) |
| `amount` | string | yes | Amount added, as a decimal string |
| `wallet_balance` | string | yes | The paper wallet's balance of the listing after the funds were added |
| `allocation` | object | no | An allocation and what it has left behind on each side so far. |
| `allocation.id` | string (uuid) | yes | Allocation identifier |
| `allocation.status` | string, one of `allocating`, `crediting`, `releasing`, `completed`, `rejected`, `stranded` | yes | Where the allocation stands. * **allocating** — The amount is being allocated in the wallet. * **crediting** — The amount is allocated and is being credited to CeFi. * **releasing** — The allocation was refused and the amount is being freed in the wallet. * **completed** — The amount is available to trade on CeFi. * **rejected** — The allocation was refused and the amount is free in the wallet again. * **stranded** — The outcome is unknown and support has to resolve it. |
| `allocation.asset_id` | string (uuid) | yes | DeFi listing identifier (UUID) |
| `allocation.asset_symbol` | string | yes | Symbol of the listing |
| `allocation.amount` | string | yes | Amount this allocation sets aside, as a decimal string |
| `allocation.allocated_total` | string | no | Everything the caller has allocated of the listing after this allocation, as a decimal string |
| `allocation.transfer` | object | no | The CeFi transfer an allocation or release started, under the exchange's id |
| `allocation.transfer.id` | string | yes | Exchange transfer identifier |
| `allocation.transfer.status` | string, one of `INITIALIZED`, `PENDING`, `PROCESSING`, `COMPLETED`, `REJECTED`, `FAILED` | yes | Status as last seen from the exchange |
| `allocation.failure_reason` | string | no | Why the allocation was refused or stranded |
| `allocation.created_at` | string (date-time) | yes |  |
| `allocation.updated_at` | string (date-time) | yes |  |

### 400

Bad request

### 401

Unauthorized

### 403

Forbidden. On order creation this also covers an asset that is not available to trade from the country the request came from.

### 404

Not found

### 409

Conflict

### 422

Request is well-formed but cannot be processed (e.g. leverage missing or out of range for a perp order)

### 500

Internal server error

### 503

Service unavailable
