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

# Quickstart

> Create an API agent, fund its wallet, and place your first trade.

## 1. Register

Create an API agent. This provisions a dedicated Privy server wallet and returns your API key.

```bash theme={null}
curl -X POST https://api.trydocent.com/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"name": "my-trading-bot"}'
```

```json Response theme={null}
{
  "agentId": "jg7h0r7m7j6q6y4m2jv1v67jv17m9h3k",
  "apiKey": "dk_live_a1b2c3d4..."
}
```

<Warning>
  Save your API key now. It is only shown once and cannot be retrieved later.
</Warning>

## 2. Get your wallet address

Use auth status to fetch your deposit address after registration.

```bash theme={null}
curl https://api.trydocent.com/v1/auth/status \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."
```

```json Response theme={null}
{
  "agentId": "jg7h0r7m7j6q6y4m2jv1v67jv17m9h3k",
  "addresses": {
    "ethereum": "0x1234...abcd"
  }
}
```

## 3. Fund your wallet

Send USDC to `addresses.ethereum` on Arbitrum or Base. Docent uses OneBalance to move funds between venues, so you do not need to bridge manually before you trade.

## 4. Check your balance

```bash theme={null}
curl https://api.trydocent.com/v1/balances \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."
```

```json Response theme={null}
{
  "balances": {
    "evm": {
      "address": "0x1234...abcd",
      "value": 1.25,
      "available": "1250000"
    },
    "hyperliquid": {
      "address": "0x1234...abcd",
      "value": 0,
      "available": "0"
    },
    "polymarket": {
      "address": null,
      "value": 0,
      "available": "0"
    },
    "totals": {
      "value": 1.25,
      "cash": 1.25
    }
  }
}
```

## 5. Place a trade

```bash theme={null}
curl -X POST https://api.trydocent.com/v1/orders/perp \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "BTC",
    "side": "long",
    "size": "0.001",
    "orderType": "market"
  }'
```

```json Response theme={null}
{
  "success": true,
  "actionId": "action_123",
  "workflowId": "wf_456"
}
```

## 6. Poll for completion

Orders execute asynchronously. Poll the action until `status` is `completed` or `failed`.

```bash theme={null}
curl "https://api.trydocent.com/v1/actions?actionId=action_123" \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."
```

```json Response theme={null}
{
  "id": "action_123",
  "workflowId": "wf_456",
  "venue": "hyperliquid_perp",
  "status": "completed",
  "summary": "API: long 0.001 BTC market",
  "createdAt": 1744700000000,
  "startedAt": 1744700000200,
  "completedAt": 1744700004200,
  "error": null
}
```

Use `GET /v1/transfers?transferId=...` the same way when you create a venue transfer.

## Next steps

* Browse the full [endpoint reference](/api-reference/endpoint/register)
* Use `POST /v1/orders/polymarket` to trade prediction markets
* Use `POST /v1/transfers` to move funds between venues
* Use `POST /v1/auth/keys/rotate` to rotate your API key periodically
