Skip to main content
Version: 1.x

user.v1

User methods read balances, transaction history, and action allowances. Send requests with the compact envelope described in Interaction Model: [1, requestId, method, payload, timestamp].

get_balances

Retrieve the balances of the user in YN.

SDK wrapper: Client.getBalances(wallet).

Request fieldTypePresenceDescription
walletstringrequiredUser wallet address.
Response fieldTypeDescription
balancesarray<balance_entry>List of asset balances.

Errors: account_not_found. See Errors.

[1, 4001, "user.v1.get_balances", { "wallet": "0xUser" }, 1741344819012]

get_transactions

Retrieve ledger transaction history with optional filtering.

SDK wrapper: Client.getTransactions(wallet, options).

Request fieldTypePresenceDescription
walletstringrequiredUser wallet address.
assetstringoptionalFilter by asset symbol.
tx_typetransaction_typeoptionalFilter by transaction type.
paginationpagination_paramsoptionalPagination parameters.
from_timeintegeroptionalStart timestamp filter.
to_timeintegeroptionalEnd timestamp filter.
Response fieldTypeDescription
transactionsarray<transaction>Ledger transactions.
metadatapagination_metadataPagination information.

metadata is optional and may be absent when the response is not paginated.

Errors: none declared in docs/api.yaml.

[1, 4002, "user.v1.get_transactions", { "wallet": "0xUser", "asset": "usdc", "pagination": { "offset": 0, "limit": 20 } }, 1741344819012]

get_action_allowances

Retrieve action allowances for a user based on their staking level.

SDK wrapper: Client.getActionAllowances(wallet).

Request fieldTypePresenceDescription
walletstringrequiredUser wallet address.
Response fieldTypeDescription
allowancesarray<action_allowance>Action allowances.

Errors: wallet_required, retrieval_failed. See Errors.

[1, 4003, "user.v1.get_action_allowances", { "wallet": "0xUser" }, 1741344819012]