Skip to main content

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.

The Docent API lets you create API agents, fund a dedicated wallet, place trades, check balances, and move funds between Hyperliquid and Polymarket. Each API account gets its own non-custodial wallet powered by Privy.

Base URL

https://api.trydocent.com

Authentication

All endpoints except POST /v1/auth/register require a Bearer token.
curl https://api.trydocent.com/v1/balances \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."
API keys use the dk_live_ prefix. You receive your key exactly once during registration.

Permissions

Each API key has four permission scopes.
PermissionWhat it controls
readBalances, positions, markets, actions, and transfer status
tradeOrder placement
transferVenue-to-venue transfers
strategiesReserved for coming soon strategy endpoints
All permissions are enabled by default on new keys.

Rate limits

TierLimit
Standard60 requests/minute
Premium300 requests/minute
When rate limited, the response includes a Retry-After header in seconds and a retryAfter field in milliseconds.

Asynchronous execution

Orders and transfers run through durable workflows.
  1. Call POST /v1/orders/perp, POST /v1/orders/spot, POST /v1/orders/polymarket, or POST /v1/transfers.
  2. Docent returns an actionId for orders or a transferId for transfers.
  3. The workflow handles funding and execution in the background.
  4. Poll GET /v1/actions?actionId=... for orders or GET /v1/transfers?transferId=... for transfers.
This is why a request can be accepted before the trade or transfer is finished.

Error format

All errors follow the same shape.
{
  "error": "Human-readable message",
  "code": "MACHINE_CODE"
}
StatusCodeMeaning
400BAD_REQUESTInvalid query params or business-rule failure
400VALIDATION_ERRORInvalid request body
400ORDER_REJECTEDOrder could not be accepted
400ORDER_FAILEDOrder request failed before execution
400TRANSFER_FAILEDTransfer request failed before execution
401UNAUTHORIZEDMissing, invalid, or expired API key
403FORBIDDENKey lacks the required permission
404NOT_FOUNDRequested action or transfer was not found
429RATE_LIMITEDToo many requests
501NOT_IMPLEMENTEDEndpoint exists but is not live yet

Supported venues

VenueWhat you can trade
Hyperliquid perpetualsBTC, ETH, SOL, and other perpetual markets
Hyperliquid spotPURR, HFUN, and other Hyperliquid spot tokens
PolymarketPrediction markets with Yes/No outcomes
The API supports trading and venue-to-venue transfers. External withdrawals to arbitrary addresses are not supported.