You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.1 KiB

import {
Account,
AssetClass,
AssetSubClass,
Currency,
DataSource,
SymbolProfile
} from '@prisma/client';
4 years ago
import { OrderType } from '../../models/order-type';
export const MarketState = {
closed: 'closed',
delayed: 'delayed',
open: 'open'
};
4 years ago
export interface IOrder {
account: Account;
4 years ago
currency: Currency;
date: string;
fee: number;
id?: string;
isDraft: boolean;
4 years ago
quantity: number;
symbol: string;
symbolProfile: SymbolProfile;
4 years ago
type: OrderType;
unitPrice: number;
}
export interface IDataProviderHistoricalResponse {
marketPrice: number;
performance?: number;
}
export interface IDataProviderResponse {
assetClass?: AssetClass;
assetSubClass?: AssetSubClass;
countries?: { code: string; weight: number }[];
4 years ago
currency: Currency;
dataSource: DataSource;
4 years ago
exchange?: string;
marketChange?: number;
marketChangePercent?: number;
marketPrice: number;
marketState: MarketState;
name?: string;
4 years ago
url?: string;
}
export interface IDataGatheringItem {
dataSource: DataSource;
date?: Date;
symbol: string;
}
export type MarketState = typeof MarketState[keyof typeof MarketState];