Skip to content

Schemas ​

PortfolioAnalysisRequest ​

typescript
interface PortfolioAnalysisRequest {
  identifiers: InstrumentIdentifier[];   // 1–200 items
  includeExtraIdentifiers?: boolean;     // default false
  includeRecommendedUnits?: boolean;     // default false
}

InstrumentIdentifier ​

typescript
interface InstrumentIdentifier {
  requestKey: string;        // required, unique within the request
  isin?: string;             // at least one of isin, compositeBbgId, ticker
  compositeBbgId?: string;
  ticker?: string;
  exchange?: string;         // accepted, not used for matching
  mic?: string;              // accepted, not used for matching
  country?: string;          // accepted, not used for matching
}

PortfolioAnalysisResponse ​

typescript
interface PortfolioAnalysisResponse {
  successResults: PortfolioAnalysisItemSuccess[];
  failureResults: PortfolioAnalysisItemFailure[];
  totalCount: number;
}

PortfolioAnalysisItemSuccess ​

typescript
interface PortfolioAnalysisItemSuccess {
  requestKey: string;
  isin: string;
  potentialReturn: number | null;   // USD per unit per day
  lendingRateBps: number | null;    // VWAR in bps: your loans, else Sharegain-wide
  utilization: number;              // 0–1
  date: string | null;              // ISO 8601, UTC
  compositeBbgid?: string;          // only with includeExtraIdentifiers
  compositeTicker?: string;         // only with includeExtraIdentifiers
  recommendedUnitsToAdd?: number;   // only with includeRecommendedUnits
}

PortfolioAnalysisItemFailure ​

typescript
interface PortfolioAnalysisItemFailure {
  requestKey: string;
  isin: string | null;   // the ISIN you sent, if any
  errorMessage: string;
}

QuotaResponse ​

typescript
interface QuotaResponse {
  requestsPerMinute: QuotaResponseItem;
  requestsPerDay: QuotaResponseItem;
  requestItemsPerDay: QuotaResponseItem;
}

interface QuotaResponseItem {
  current: number;
  max: number;
}

HotStocksRequest ​

typescript
interface HotStocksRequest {
  instrumentType?: 'Stock' | 'Fixed Income' | 'ETF';
  countryOfListing?: string;     // two-letter uppercase code
  minimumBenchmarkFee?: number;  // bps, default 100
  maximumBenchmarkFee?: number;  // bps
}

HotStockItem ​

typescript
interface HotStockItem {
  isin: string;
  actualUtilization: number;           // 0–1
  benchmarkFeeHighestLoanBps: number;
}

Sharegain API Documentation