MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / utaAccount

Function utaAccount

ui/src/api/trading.ts:68–71  ·  view source on GitHub ↗

Broker-side account info (cash, equity, margin) for a given UTA. * Note `account` here is the *broker* account, distinct from the UTA.

(utaId: string, subAccountId?: string)

Source from the content-addressed store, hash-verified

66 /** Broker-side account info (cash, equity, margin) for a given UTA.
67 * Note `account` here is the *broker* account, distinct from the UTA. */
68 async utaAccount(utaId: string, subAccountId?: string): Promise<AccountInfo> {
69 const qs = subAccountId ? `?subAccountId=${encodeURIComponent(subAccountId)}` : ''
70 return fetchJson(`/api/trading/uta/${utaId}/account${qs}`)
71 },
72
73 async utaPositions(utaId: string, subAccountId?: string): Promise<{ positions: Position[] }> {
74 const qs = subAccountId ? `?subAccountId=${encodeURIComponent(subAccountId)}` : ''

Callers

nothing calls this directly

Calls 1

fetchJsonFunction · 0.90

Tested by

no test coverage detected