Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt

Use this file to discover all available pages before exploring further.

Function Signature

Future<YieldXyzGetHistoricalActionsResponse> getHistoricalActions({
  int? offset,
  int? limit,
  String? address,
  YieldXyzActionStatus? status,
  YieldXyzActionIntent? intent,
  String? type,
  String? yieldId,
})

Description

Retrieve past yield actions including entries, exits, and management operations.

Parameters

ParameterTypeRequiredDescription
offsetint?NoPagination offset
limitint?NoMaximum number of results
addressString?NoFilter by wallet address
statusYieldXyzActionStatus?NoFilter by action status
intentYieldXyzActionIntent?NoFilter by action intent (enter, exit, manage)
typeString?NoFilter by action type
yieldIdString?NoFilter by yield opportunity ID

Returns

YieldXyzGetHistoricalActionsResponse - An object containing:
PropertyTypeDescription
itemsList<YieldXyzHistoricalActionItem?>List of historical actions
totalintTotal number of actions
offsetintCurrent pagination offset
limitintCurrent page size
metadataYieldXyzGetBalancesMetadata?Response metadata
errorString?Error message, if any

Example

import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

final response = await portal.yieldIntegrations.yieldxyz.getHistoricalActions(
  address: '0x1234...',
  intent: YieldXyzActionIntent.enter,
  limit: 20,
);

for (final action in response.items) {
  if (action != null) {
    print('Action: ${action.id} - ${action.status}');
  }
}

Errors

CodeDescription
NOT_INITIALIZEDPortal was not initialized
YIELD_FAILEDFailed to get historical yield actions