| 
						
						
							
								
							
						
						
					 | 
					@ -23,7 +23,7 @@ import { cloneDeep, isEmpty } from 'lodash'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import * as roundTo from 'round-to'; | 
					 | 
					 | 
					import * as roundTo from 'round-to'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { UserWithSettings } from '../app/interfaces/user-with-settings'; | 
					 | 
					 | 
					import { UserWithSettings } from '../app/interfaces/user-with-settings'; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					import { OrderWithPlatform } from '../app/order/interfaces/order-with-platform.type'; | 
					 | 
					 | 
					import { OrderWithAccount } from '../app/order/interfaces/order-with-account.type'; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					import { DateRange } from '../app/portfolio/interfaces/date-range.type'; | 
					 | 
					 | 
					import { DateRange } from '../app/portfolio/interfaces/date-range.type'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { PortfolioPerformance } from '../app/portfolio/interfaces/portfolio-performance.interface'; | 
					 | 
					 | 
					import { PortfolioPerformance } from '../app/portfolio/interfaces/portfolio-performance.interface'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { PortfolioPosition } from '../app/portfolio/interfaces/portfolio-position.interface'; | 
					 | 
					 | 
					import { PortfolioPosition } from '../app/portfolio/interfaces/portfolio-position.interface'; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -34,14 +34,14 @@ import { IOrder } from '../services/interfaces/interfaces'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { RulesService } from '../services/rules.service'; | 
					 | 
					 | 
					import { RulesService } from '../services/rules.service'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { PortfolioInterface } from './interfaces/portfolio.interface'; | 
					 | 
					 | 
					import { PortfolioInterface } from './interfaces/portfolio.interface'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { Order } from './order'; | 
					 | 
					 | 
					import { Order } from './order'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import { AccountClusterRiskCurrentInvestment } from './rules/account-cluster-risk/current-investment'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import { AccountClusterRiskInitialInvestment } from './rules/account-cluster-risk/initial-investment'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import { AccountClusterRiskSingleAccount } from './rules/account-cluster-risk/single-account'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { CurrencyClusterRiskBaseCurrencyCurrentInvestment } from './rules/currency-cluster-risk/base-currency-current-investment'; | 
					 | 
					 | 
					import { CurrencyClusterRiskBaseCurrencyCurrentInvestment } from './rules/currency-cluster-risk/base-currency-current-investment'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { CurrencyClusterRiskBaseCurrencyInitialInvestment } from './rules/currency-cluster-risk/base-currency-initial-investment'; | 
					 | 
					 | 
					import { CurrencyClusterRiskBaseCurrencyInitialInvestment } from './rules/currency-cluster-risk/base-currency-initial-investment'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { CurrencyClusterRiskCurrentInvestment } from './rules/currency-cluster-risk/current-investment'; | 
					 | 
					 | 
					import { CurrencyClusterRiskCurrentInvestment } from './rules/currency-cluster-risk/current-investment'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { CurrencyClusterRiskInitialInvestment } from './rules/currency-cluster-risk/initial-investment'; | 
					 | 
					 | 
					import { CurrencyClusterRiskInitialInvestment } from './rules/currency-cluster-risk/initial-investment'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { FeeRatioInitialInvestment } from './rules/fees/fee-ratio-initial-investment'; | 
					 | 
					 | 
					import { FeeRatioInitialInvestment } from './rules/fees/fee-ratio-initial-investment'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { PlatformClusterRiskCurrentInvestment } from './rules/platform-cluster-risk/current-investment'; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { PlatformClusterRiskInitialInvestment } from './rules/platform-cluster-risk/initial-investment'; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { PlatformClusterRiskSinglePlatform } from './rules/platform-cluster-risk/single-platform'; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					export class Portfolio implements PortfolioInterface { | 
					 | 
					 | 
					export class Portfolio implements PortfolioInterface { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  private orders: Order[] = []; | 
					 | 
					 | 
					  private orders: Order[] = []; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -119,11 +119,11 @@ export class Portfolio implements PortfolioInterface { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  }): Portfolio { | 
					 | 
					 | 
					  }): Portfolio { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    orders.forEach( | 
					 | 
					 | 
					    orders.forEach( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      ({ | 
					 | 
					 | 
					      ({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        account, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        currency, | 
					 | 
					 | 
					        currency, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        fee, | 
					 | 
					 | 
					        fee, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        date, | 
					 | 
					 | 
					        date, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        id, | 
					 | 
					 | 
					        id, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        platform, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        quantity, | 
					 | 
					 | 
					        quantity, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        symbol, | 
					 | 
					 | 
					        symbol, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        type, | 
					 | 
					 | 
					        type, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -131,11 +131,11 @@ export class Portfolio implements PortfolioInterface { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      }) => { | 
					 | 
					 | 
					      }) => { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        this.orders.push( | 
					 | 
					 | 
					        this.orders.push( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          new Order({ | 
					 | 
					 | 
					          new Order({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            account, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            currency, | 
					 | 
					 | 
					            currency, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            fee, | 
					 | 
					 | 
					            fee, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            date, | 
					 | 
					 | 
					            date, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            id, | 
					 | 
					 | 
					            id, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            platform, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            quantity, | 
					 | 
					 | 
					            quantity, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            symbol, | 
					 | 
					 | 
					            symbol, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            type, | 
					 | 
					 | 
					            type, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -202,7 +202,7 @@ export class Portfolio implements PortfolioInterface { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    const data = await this.dataProviderService.get(symbols); | 
					 | 
					 | 
					    const data = await this.dataProviderService.get(symbols); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    symbols.forEach((symbol) => { | 
					 | 
					 | 
					    symbols.forEach((symbol) => { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      const platforms: PortfolioPosition['platforms'] = {}; | 
					 | 
					 | 
					      const accounts: PortfolioPosition['accounts'] = {}; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					      const [portfolioItem] = portfolioItems; | 
					 | 
					 | 
					      const [portfolioItem] = portfolioItems; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      const ordersBySymbol = this.getOrders().filter((order) => { | 
					 | 
					 | 
					      const ordersBySymbol = this.getOrders().filter((order) => { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -227,15 +227,15 @@ export class Portfolio implements PortfolioInterface { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          originalValueOfSymbol *= -1; | 
					 | 
					 | 
					          originalValueOfSymbol *= -1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if (platforms[orderOfSymbol.getPlatform()?.name || 'Other']?.current) { | 
					 | 
					 | 
					        if (accounts[orderOfSymbol.getAccount()?.name || 'Other']?.current) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					          platforms[ | 
					 | 
					 | 
					          accounts[ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            orderOfSymbol.getPlatform()?.name || 'Other' | 
					 | 
					 | 
					            orderOfSymbol.getAccount()?.name || 'Other' | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					          ].current += currentValueOfSymbol; | 
					 | 
					 | 
					          ].current += currentValueOfSymbol; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					          platforms[ | 
					 | 
					 | 
					          accounts[ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            orderOfSymbol.getPlatform()?.name || 'Other' | 
					 | 
					 | 
					            orderOfSymbol.getAccount()?.name || 'Other' | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					          ].original += originalValueOfSymbol; | 
					 | 
					 | 
					          ].original += originalValueOfSymbol; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } else { | 
					 | 
					 | 
					        } else { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					          platforms[orderOfSymbol.getPlatform()?.name || 'Other'] = { | 
					 | 
					 | 
					          accounts[orderOfSymbol.getAccount()?.name || 'Other'] = { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            current: currentValueOfSymbol, | 
					 | 
					 | 
					            current: currentValueOfSymbol, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            original: originalValueOfSymbol | 
					 | 
					 | 
					            original: originalValueOfSymbol | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          }; | 
					 | 
					 | 
					          }; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -276,7 +276,7 @@ export class Portfolio implements PortfolioInterface { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      details[symbol] = { | 
					 | 
					 | 
					      details[symbol] = { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ...data[symbol], | 
					 | 
					 | 
					        ...data[symbol], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        platforms, | 
					 | 
					 | 
					        accounts, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        symbol, | 
					 | 
					 | 
					        symbol, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        grossPerformance: roundTo( | 
					 | 
					 | 
					        grossPerformance: roundTo( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          portfolioItemsNow.positions[symbol].quantity * (now - before), | 
					 | 
					 | 
					          portfolioItemsNow.positions[symbol].quantity * (now - before), | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -396,32 +396,32 @@ export class Portfolio implements PortfolioInterface { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    return { | 
					 | 
					 | 
					    return { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      rules: { | 
					 | 
					 | 
					      rules: { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        currencyClusterRisk: await this.rulesService.evaluate( | 
					 | 
					 | 
					        accountClusterRisk: await this.rulesService.evaluate( | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					          this, | 
					 | 
					 | 
					          this, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          [ | 
					 | 
					 | 
					          [ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            new CurrencyClusterRiskBaseCurrencyInitialInvestment( | 
					 | 
					 | 
					            new AccountClusterRiskCurrentInvestment( | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					              this.exchangeRateDataService | 
					 | 
					 | 
					              this.exchangeRateDataService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ), | 
					 | 
					 | 
					            ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            new CurrencyClusterRiskBaseCurrencyCurrentInvestment( | 
					 | 
					 | 
					            new AccountClusterRiskInitialInvestment( | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					              this.exchangeRateDataService | 
					 | 
					 | 
					              this.exchangeRateDataService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ), | 
					 | 
					 | 
					            ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            new CurrencyClusterRiskInitialInvestment( | 
					 | 
					 | 
					            new AccountClusterRiskSingleAccount(this.exchangeRateDataService) | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					              this.exchangeRateDataService | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ), | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            new CurrencyClusterRiskCurrentInvestment( | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					              this.exchangeRateDataService | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ) | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					          ], | 
					 | 
					 | 
					          ], | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          { baseCurrency: this.user.Settings.currency } | 
					 | 
					 | 
					          { baseCurrency: this.user.Settings.currency } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ), | 
					 | 
					 | 
					        ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        platformClusterRisk: await this.rulesService.evaluate( | 
					 | 
					 | 
					        currencyClusterRisk: await this.rulesService.evaluate( | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					          this, | 
					 | 
					 | 
					          this, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          [ | 
					 | 
					 | 
					          [ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            new PlatformClusterRiskSinglePlatform(this.exchangeRateDataService), | 
					 | 
					 | 
					            new CurrencyClusterRiskBaseCurrencyInitialInvestment( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            new PlatformClusterRiskInitialInvestment( | 
					 | 
					 | 
					              this.exchangeRateDataService | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            new CurrencyClusterRiskBaseCurrencyCurrentInvestment( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					              this.exchangeRateDataService | 
					 | 
					 | 
					              this.exchangeRateDataService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ), | 
					 | 
					 | 
					            ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            new PlatformClusterRiskCurrentInvestment( | 
					 | 
					 | 
					            new CurrencyClusterRiskInitialInvestment( | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					              this.exchangeRateDataService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            new CurrencyClusterRiskCurrentInvestment( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					              this.exchangeRateDataService | 
					 | 
					 | 
					              this.exchangeRateDataService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ) | 
					 | 
					 | 
					            ) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          ], | 
					 | 
					 | 
					          ], | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -522,17 +522,17 @@ export class Portfolio implements PortfolioInterface { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    return isFinite(value) ? value : null; | 
					 | 
					 | 
					    return isFinite(value) ? value : null; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					  public async setOrders(aOrders: OrderWithPlatform[]) { | 
					 | 
					 | 
					  public async setOrders(aOrders: OrderWithAccount[]) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    this.orders = []; | 
					 | 
					 | 
					    this.orders = []; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    // Map data
 | 
					 | 
					 | 
					    // Map data
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    aOrders.forEach((order) => { | 
					 | 
					 | 
					    aOrders.forEach((order) => { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      this.orders.push( | 
					 | 
					 | 
					      this.orders.push( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        new Order({ | 
					 | 
					 | 
					        new Order({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          account: order.Account, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          currency: <any>order.currency, | 
					 | 
					 | 
					          currency: <any>order.currency, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          date: order.date.toISOString(), | 
					 | 
					 | 
					          date: order.date.toISOString(), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          fee: order.fee, | 
					 | 
					 | 
					          fee: order.fee, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          platform: order.Platform, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          quantity: order.quantity, | 
					 | 
					 | 
					          quantity: order.quantity, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          symbol: order.symbol, | 
					 | 
					 | 
					          symbol: order.symbol, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          type: <any>order.type, | 
					 | 
					 | 
					          type: <any>order.type, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |