Skip to main content

Portfolio

getBalances

Returns the user’s current balances across all active positions.

  • If agentId is omitted: retrieves balances for all agents.
  • If agentId is provided: retrieves balances for the specified agent.

Requires wallet connection: Yes

getBalances(
agentId?: AgentId
): Promise<OwneyBalances | AgentBalance>

Parameters

  • agentId?: AgentId — The agent to retrieve balances for (See AgentId for details). If omitted, retrieves balances for all agents.

Returns

  • Promise<OwneyBalances> if agentId is omitted. Includes total balance and a breakdown of balances by agent.
  • Promise<AgentBalance> if agentId is provided.

See OwneyBalances and AgentBalance for details.

getEarnings

Returns the user’s on-chain earnings summary.

  • If agentId is omitted: retrieves earnings for all agents.
  • If agentId is provided: retrieves earnings for the specified agent.

Requires wallet connection: Yes

getEarnings(
agentId?: AgentId
): Promise<OwneyEarnings | AgentEarnings>

Parameters

  • agentId?: AgentId — The agent to retrieve earnings for (See AgentId for details). If omitted, retrieves earnings for all agents.

Returns

  • Promise<OwneyEarnings> if agentId is omitted. Includes total earnings and a per-agent breakdown.
  • Promise<AgentEarnings> if agentId is provided.

See OwneyEarnings and AgentEarnings for details.


getAccountApy

Returns weighted account APY for a selected lookback period.

  • If agentId is omitted: returns the account's total APY plus per-agent APY.
  • If agentId is provided: returns APY for the specified agent.

Requires wallet connection: Yes

getAccountApy(
options: AccountApyOptions
): Promise<OwneyAccountApy | AccountAgentApy>

Parameters

  • options: AccountApyOptions — Required options (See AccountApyOptions for details):
    • days: DailyApyDays — Lookback period (e.g. "7D", "14D", or "30D").
    • agentId?: AgentId — Optional agent to query. If omitted, returns weighted account APY across all agents.

Returns

  • Promise<OwneyAccountApy> if agentId is omitted.
  • Promise<AccountAgentApy> if agentId is provided.

weightedApyAfterFeeDetails is optional and may be included by some agents when a per-asset APY breakdown is available.

See OwneyAccountApy and AccountAgentApy for details.


getHistory

Returns transaction history with optional settings and date filters.

  • If agentId is omitted: retrieves history for all agents.
  • If agentId is provided: retrieves history for the specified agent.

Requires wallet connection: Yes

getHistory(
params?: HistoryOptions
): Promise<OwneyAgentHistory>

Parameters

  • params?: HistoryOptions — Optional filters (See HistoryOptions for details).
    • agentId?: AgentId — Optional agent filter.
    • filters?: HistoryFilters — Optional date filters:
      • fromDate?: string — Start date (inclusive), format YYYY-MM-DD.
      • toDate?: string — End date (inclusive), format YYYY-MM-DD.

Returns

  • Promise<OwneyAgentHistory> — Transaction history matching the provided filters (See OwneyAgentHistory for details).

getUserProfile

Returns the authenticated user’s profile details.

  • If agentId is omitted: retrieves the user profile for all agents.
  • If agentId is provided: retrieves the user profile for the specified agent.

Requires wallet connection: Yes

getUserProfile(
agentId?: AgentId
): Promise<OwneyUserProfile | AgentUserProfile>

Parameters

  • agentId?: AgentId — The agent to retrieve the user profile for (See AgentId for details). If omitted, retrieves the user profile for all agents.

Returns

  • Promise<OwneyUserProfile> if agentId is omitted. Includes per-agent user profiles.
  • Promise<AgentUserProfile> if agentId is provided.

See OwneyUserProfile and AgentUserProfile for details.


getAgentAllocation

Returns the current fund allocation percentages across active agents.

Requires wallet connection: Yes

getAgentAllocation(): Promise<OwneyAgentAllocation>

Returns

  • Promise<OwneyAgentAllocation> — Allocation percentages keyed by agent ID.

See OwneyAgentAllocation for details.