Skip to content

accounts(): the owner's accounts by the exchange's id with their names (0.15.1) - #40

Merged
foscomputerservices merged 1 commit into
mainfrom
accounts-read
Oct 25, 2026
Merged

foscomputerservices merged 1 commit into
mainfrom
accounts-read

Conversation

@foscomputerservices

Copy link
Copy Markdown
Owner

accounts() on ExchangeClient, so a move's side can be named: a subAccountTransfer's other side is an address, and the names were resolved privately inside the Hyperliquid client.

The shared shape

  • ExchangeClientAccount { id: String, name: String? }: the exchange's own id, the same text a ledger side's account carries and an account parameter takes; the name the exchange gives it, nil where it gives none.
  • accounts() async throws -> [ExchangeClientAccount], default notOffered(member: "accounts"), so an existing conformer still compiles. Additive, so a patch version.

Hyperliquid

  • The main wallet the key is the agent of (userRole), by its address with no name (Hyperliquid names it by its address alone), then each sub-account of subAccounts, by its address lower-cased with its name, in Hyperliquid's order. The read also fills the client's private name table.

Coinbase

  • List Portfolios (GET /api/v3/brokerage/portfolios): each portfolio by its uuid with its name, in Coinbase's order. The documentation states the call "retrieves all portfolios of a user", so a deleted one is listed as Coinbase lists it (an older move may name it). The key's own account reads still answer for its portfolio alone.

Kraken

  • notOffered. Subaccounts are "currently only available to institutional clients" and no endpoint lists them.

Tests

  • Hyperliquid: the main wallet then the seven recorded sub-accounts, and a recorded move's side matched to its sub-account's name through the list. Coinbase: a documentation-derived List Portfolios fixture (default, second, deleted). Kraken and the shared defaults suite: notOffered.
  • The four client test targets pass locally.

CHANGELOG 0.15.1 rides along.

…sts them, each by the exchange's own id (the text a ledger side's account carries) with the name it gives, default notOffered; Hyperliquid's main wallet then its subAccounts by address with their names; Coinbase's List Portfolios by uuid with their names; Kraken notOffered (institutional-only subaccounts, no listing); CHANGELOG 0.15.1
@foscomputerservices
foscomputerservices merged commit d5a2ea5 into main Oct 25, 2026
5 checks passed
@foscomputerservices
foscomputerservices deleted the accounts-read branch October 25, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant