Create an agent

Creates a new agent and allocates cash from your Alpaca account balance.
The cash is reserved for this agent and cannot be double-allocated.

Rules

  • name must be lowercase with no spaces (e.g. momentum-trader).
  • cash_allocation must be positive and cannot exceed your unallocated
    cash balance.
  • Agent names must be unique within your account.

Use case

Create an agent for each distinct strategy you want to run. Each agent
manages its own book independently.

curl -X POST https://api.usetradecraft.io/v1/agents \
  -H "Authorization: Bearer al_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "momentum-trader",
    "cash_allocation": 5000
  }'
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
^[a-z0-9\-]+$

Lowercase, no spaces. Acts as the primary identifier.

number
required
≥ 0.01

USD amount to allocate from your unallocated balance.

Responses

Language
Credentials
Bearer
tc_...
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json