UNPKG

@cranberry-money/shared-services

Version:

Platform-agnostic API services with pure functions and dependency injection. Includes auth, portfolios, instruments, countries, sectors, and more.

28 lines 1.97 kB
import { AxiosInstance } from 'axios'; import type { Instrument, InstrumentSnapshot, InstrumentsQueryParams, PaginatedResponse } from '@cranberry-money/shared-types'; export declare const configureInstruments: (apiClient: AxiosInstance) => void; export declare const getInstruments: (params?: InstrumentsQueryParams) => Promise<import("axios").AxiosResponse<PaginatedResponse<Instrument>, any>>; export declare const getInstrumentByUuid: (uuid: string) => Promise<import("axios").AxiosResponse<Instrument, any>>; export declare const getInstrumentSnapshots: (instrumentUuid: string) => Promise<import("axios").AxiosResponse<InstrumentSnapshot[], any>>; export declare const getInstrumentSnapshotsFiltered: (instrumentUuid: string, params?: { start_date?: string; end_date?: string; min_price?: number; max_price?: number; }) => Promise<import("axios").AxiosResponse<InstrumentSnapshot[], any>>; export declare const getBatchInstrumentSnapshots: (requests: Array<{ instrumentUuid: string; start_date?: string; end_date?: string; min_price?: number; max_price?: number; }>) => Promise<Array<{ instrumentUuid: string; data?: InstrumentSnapshot[]; error?: string; }>>; export declare const searchInstruments: (searchTerm: string, params?: Omit<InstrumentsQueryParams, "search">) => Promise<import("axios").AxiosResponse<PaginatedResponse<Instrument>, any>>; export declare const getInstrumentsByExchange: (exchangeUuid: string, params?: Omit<InstrumentsQueryParams, "exchange_uuid">) => Promise<import("axios").AxiosResponse<PaginatedResponse<Instrument>, any>>; export declare const getETFs: (params?: Omit<InstrumentsQueryParams, "is_etf">) => Promise<import("axios").AxiosResponse<PaginatedResponse<Instrument>, any>>; export declare const getFunds: (params?: Omit<InstrumentsQueryParams, "is_fund">) => Promise<import("axios").AxiosResponse<PaginatedResponse<Instrument>, any>>; //# sourceMappingURL=instruments.d.ts.map