Skip to content

Manager API

Use the Manager API to read and manage strategies with an issued, scoped server key. Start with the manager integration guide, Scalar API reference, and machine-readable contract. These maintained references cover authentication, key lifecycle, strategy routes, share links and rebalance status.

Goal Interface
Read or update manager-owned strategy configuration /api/v1/manager-api with a scoped manager Bearer key
Sign in to the manager browser UI /api/v1/manager-auth with wallet authentication and a protected session
Issue, list or revoke manager keys /api/v1/manager-api-keys with the documented wallet authorization
Add customer joining to a partner application Approved distribution integration; a manager key is not a partner credential

The production origin is https://api.app.trustedstake.ai. Obtain the intended testing origin from the release owner before integration tests. A response from a documentation example does not establish environment compatibility.

Keep an existing issued key in server secret storage. This example reads strategies only and requires strategies:read; never include it in a browser bundle or print the key.

const origin = new URL(process.env.TRUSTEDSTAKE_API_ORIGIN);
if (origin.protocol !== 'https:' || origin.username || origin.password ||
origin.pathname !== '/' || origin.search || origin.hash) {
throw new Error('Use the approved HTTPS API origin.');
}
const response = await fetch(new URL('/api/v1/manager-api/strategies', origin), {
headers: { Authorization: `Bearer ${process.env.TRUSTEDSTAKE_MANAGER_KEY}` },
cache: 'no-store',
redirect: 'error',
});
if (!response.ok) throw new Error(`Manager read unavailable (${response.status}).`);
const result = await response.json();
if (result.success !== true || !result.data) throw new Error('Unexpected manager response.');
// Apply your application's response validation before rendering permitted fields.

Use strategies:write for authorized configuration changes, rebalances:trigger for an explicitly intended manual rebalance and operations:read for status/activity. Key scope and strategy ownership/manager permissions are separate checks. A strategy appearing in a list does not grant mutation rights. Never paste keys into an agent prompt.

Read the current strategy before proposing changes. Standard manager keys support DAILY and MANUAL_ONLY frequency in the reviewed implementation. Validate the accepted DTO for your release rather than submitting operational flags or privileged strategy fields. Updates and rebalance triggers are separate operations.

A public/custom label does not identify the underlying strategy table or imply a new pure proxy is needed. Use the API’s strategy ID and authoritative context; TrustedStake owns controller signing and execution infrastructure. Manager integrations and distribution partners never export controller secrets or build a competing allocation worker.

A successful POST /api/v1/manager-api/strategies/{id}/rebalance returns HTTP 202 with data.correlationId and data.statusLookup. This is queue acceptance. Read the matching status with operations:read; do not infer execution from the trigger response, a refreshed chart or an activity entry.

The status response uses data.state: not_observed, in_progress, executed, no_effect, partially_failed, or failed, with operation evidence. See the status meanings. The server generates the correlation ID. A caller-supplied correlation header does not make a trigger idempotent; after a timeout, reconcile accepted work before deciding whether another trigger is appropriate. Handle 429 without repeatedly queueing work.

Give your implementation agent a bounded task

Section titled “Give your implementation agent a bounded task”

Read the manager guide and OpenAPI for the approved API release. Implement a server-only read/status integration first. Reuse our existing authenticated secret-store integration; never expose its key. Keep configuration updates and manual rebalance triggers as distinct reviewed actions. Persist returned correlation IDs and observe the corresponding status. Report missing DTO details or permissions rather than inventing endpoints, creating credentials or retrying uncertain mutations. Do not deploy, rotate keys or submit live strategy changes as part of implementation.

For public machine-readable documentation, start at llms.txt and agent instructions. Private partner materials require approved distribution access; public manager documentation does not grant partner scopes or wallet authority.