> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pacifica.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Print Order

> This endpoint allows users to place a Print order, with an optional builder code.

```http theme={null}
POST /api/v1/game/deposit
```

Locks your deposit in a new Print order. See [Placing & Managing Orders](/print/placing-and-managing-orders) for how Print orders work.

#### Operation Type (for Signing)

| Header Field | Type | Content |
| - | - | - |
| `"type"` | string | `"deposit_to_game"` |

#### Request Body

<table><thead><tr><th width="194">Field</th><th width="98">Type</th><th width="95">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>"account"</code></td><td>string</td><td>required</td><td>User's wallet address</td><td><code>42trU9A5...</code></td></tr><tr><td><code>"signature"</code></td><td>string</td><td>required</td><td>Cryptographic signature</td><td><code>5j1Vy9Uq...</code></td></tr><tr><td><code>"timestamp"</code></td><td>integer</td><td>required</td><td>Current timestamp in milliseconds</td><td><code>1716200000000</code></td></tr><tr><td><code>"game"</code></td><td>string</td><td>required</td><td>Print product, set by market and cycle length: <code>BTC\_24H</code>, <code>BTC\_7D</code>, <code>BTC\_1M</code> (30 days), <code>ETH\_24H</code>, and so on</td><td><code>BTC\_24H</code></td></tr><tr><td><code>"deposit\_amount"</code></td><td>string</td><td>required</td><td>Deposit in USDC, minimum 10</td><td><code>1000.00</code></td></tr><tr><td><code>"direction"</code></td><td>integer</td><td>required</td><td><code>0</code> - long: the order opens a long if the price falls to the target<br /><code>1</code> - short: the order opens a short if the price rises to the target</td><td><code>1</code></td></tr><tr><td><code>"strike\_price"</code></td><td>string</td><td>required</td><td>Target price</td><td><code>95000.00</code></td></tr><tr><td><code>"leverage"</code></td><td>string</td><td>required</td><td>Leverage, up to the market's maximum</td><td><code>2.0</code></td></tr><tr><td><code>"total\_segments"</code></td><td>integer</td><td>optional</td><td>Number of cycles the order runs, 1 to 1000. If omitted, the order rolls over until you end it</td><td><code>7</code></td></tr><tr><td><code>"idempotency\_key"</code></td><td>string</td><td>optional</td><td>Full UUID string. Prevents duplicate orders</td><td><code>550e8400-e29b-41d4-a716-446655440000</code></td></tr><tr><td><code>"agent\_wallet"</code></td><td>string</td><td>optional</td><td>Agent wallet address</td><td><code>69trU9A5...</code></td></tr><tr><td><code>"expiry\_window"</code></td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td><code>30000</code></td></tr><tr><td><code>"builder\_code"</code></td><td>string</td><td>optional</td><td>Builder program code (3-16 alphanumeric characters). See below</td><td><code>MYCODE</code></td></tr></tbody></table>

```json theme={null}
{
  "account": "42trU9A5...",
  "signature": "5j1Vy9Uq...",
  "timestamp": 1716200000000,
  "game": "BTC_24H",
  "deposit_amount": "1000.00",
  "direction": 1,
  "strike_price": "95000.00",
  "leverage": "2.0",
  "total_segments": 7,
  "idempotency_key": "550e8400-e29b-41d4-a716-446655440000",
  "agent_wallet": "69trU9A5...",
  "expiry_window": 30000,
  "builder_code": "MYCODE"
}
```

#### Builder codes

A builder code on a Print order pays its owner **10% of each premium** of that order. The premium is the yield, and it is paid at the start of every cycle, so the reward applies to every roll-over. A later liquidation does not reverse it.

* The user pays no fee for the code. The reward comes from Pacifica's revenue.
* The user's referrer earns nothing for an order that carries a builder code.
* The user must have [approved](/programs/builder-program) a code from the same builder. The approval's `max_fee_rate` does not need to cover the code's fee rate.
* A code that belongs to the user's own account or one of their subaccounts is ignored, and the order is placed without it.

See the [Builder Program](/programs/builder-program) for how to get a code.

#### Response

* Status 200: Order created successfully

```json theme={null}
{
  "success": true,
  "data": {
    "game_account_address": "Cdoykiss4V6kWydv7Q1EQghNqens9Hpte2iB7qjxNxc6"
  },
  "error": null,
  "code": null
}
```

`game_account_address` is the address of the new Print order.

* Status 400: Bad request

```json theme={null}
{
  "success": false,
  "data": null,
  "error": "total_segments must be between 1 and 1000",
  "code": 400
}
```

* Status 401: Unauthorized
* Status 409: Duplicate idempotency key
* Status 500: Internal server error

#### Code Example (Python)

```python theme={null}
import requests

payload = {
    "account": "42trU9A5...",
    "signature": "5j1Vy9Uq...",
    "timestamp": 1716200000000,
    "game": "BTC_24H",
    "deposit_amount": "1000.00",
    "direction": 1,
    "strike_price": "95000.00",
    "leverage": "2.0",
    "builder_code": "MYCODE"
}

response = requests.post(
    "/api/v1/game/deposit",
    json=payload,
    headers={"Content-Type": "application/json"}
)

data = response.json()
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.