UNPKG

@cygnus-wealth/asset-valuator

Version:

Asset valuation library for retrieving and converting cryptocurrency prices

23 lines (22 loc) 661 B
import { AssetPrice } from '../types.js'; interface AssetValueModel { assetSymbol: string; currency: string; value: number; timestamp: Date; } interface AssetPairModel { baseAsset: string; quoteAsset: string; price: number; volume24h?: number; changePercent24h?: number; lastUpdated: Date; } export declare class DataModelConverter { static toAssetValueModel(assetPrice: AssetPrice): AssetValueModel; static toAssetPairModel(assetPrice: AssetPrice): AssetPairModel; static fromAssetValueModel(model: AssetValueModel): AssetPrice; static fromAssetPairModel(model: AssetPairModel): AssetPrice; } export {};