TypeScript Types
Typescript object specifications
// Portformer Analysis - 3rd party API integrations
export interface IntegrationDescription {
app_name: string;
full_name: string;
description?: string;
integration_description?: string;
logo_url?: string;
permissions?: string;
url?: string;
email?: string;
api_key?: string;
}
// API Request and Reponses
export interface APIAnalysisRequestBody {
positions: Position[];
as_of_date: string;
}
export interface APIAnalysisResponse {
data?: AnalysisResponse;
err?: any;
}
export interface AnalysisResponse {
positions: (AnalyzedPosition[] | AnalyzedPositionWithAlts[]);
totals: AnalyzedTotals;
status: APIStatus;
}
export interface APIStatus {
request_id: string;
session_id: string;
timestamp: number;
msg?: string;
requests_remaining?: number,
}
// Object Details
export interface AnalyzedTotals {
count: number;
missing: number;
portformers: number;
value_all: number;
value_matched: number;
max_score: number;
avg_score: number;
net_fee_diff_top: number;
net_fee_diff_all: number;
est_savings_top: number;
est_savings_all: number;
url: string;
}
export interface Position {
ticker: string;
value: number;
shares?: number;
household_id?: string;
acct_id?: string;
acct_type?: string;
}
export interface AnalyzedPosition extends Position {
found_ticker?: boolean;
found_alternative?: boolean;
max_score?: number;
net_fee_diff?: number;
est_savings?: number;
as_of_date?: string;
analyze_url?: string;
}
export interface AnalyzedPositionWithAlts extends AnalyzedPosition {
alt_tickers?: string[];
weights?: number[];
}
Updated over 2 years ago