codex/broker-operations-ui #18
@ -2,6 +2,7 @@ import { ApiProperty } from '@nestjs/swagger';
|
|||||||
import { BrokerAccountResponseDto } from './broker-account-response.dto';
|
import { BrokerAccountResponseDto } from './broker-account-response.dto';
|
||||||
import { BrokerOperationSyncResponseDto } from './broker-operation-sync-query.dto';
|
import { BrokerOperationSyncResponseDto } from './broker-operation-sync-query.dto';
|
||||||
import { BrokerOperationsPageResponseDto } from './broker-operation-response.dto';
|
import { BrokerOperationsPageResponseDto } from './broker-operation-response.dto';
|
||||||
|
import { BrokerPositionsPageResponseDto } from './broker-positions-page-response.dto';
|
||||||
import { BrokerPortfolioResponseDto } from './broker-portfolio-response.dto';
|
import { BrokerPortfolioResponseDto } from './broker-portfolio-response.dto';
|
||||||
|
|
||||||
export class BrokerResponseMetaDto {
|
export class BrokerResponseMetaDto {
|
||||||
@ -36,6 +37,14 @@ export class BrokerOperationsEnvelopeDto {
|
|||||||
meta!: BrokerResponseMetaDto;
|
meta!: BrokerResponseMetaDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class BrokerPositionsEnvelopeDto {
|
||||||
|
@ApiProperty({ type: BrokerPositionsPageResponseDto })
|
||||||
|
data!: BrokerPositionsPageResponseDto;
|
||||||
|
|
||||||
|
@ApiProperty({ type: BrokerResponseMetaDto })
|
||||||
|
meta!: BrokerResponseMetaDto;
|
||||||
|
}
|
||||||
|
|
||||||
export class BrokerOperationSyncEnvelopeDto {
|
export class BrokerOperationSyncEnvelopeDto {
|
||||||
@ApiProperty({ type: BrokerOperationSyncResponseDto })
|
@ApiProperty({ type: BrokerOperationSyncResponseDto })
|
||||||
data!: BrokerOperationSyncResponseDto;
|
data!: BrokerOperationSyncResponseDto;
|
||||||
|
|||||||
@ -28,6 +28,9 @@ export class BrokerOperationResponseDto {
|
|||||||
@ApiProperty({ nullable: true })
|
@ApiProperty({ nullable: true })
|
||||||
description!: string | null;
|
description!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
name!: string | null;
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
@ApiProperty({ nullable: true })
|
||||||
state!: string | null;
|
state!: string | null;
|
||||||
|
|
||||||
|
|||||||
@ -2,50 +2,6 @@ import { ApiProperty } from '@nestjs/swagger';
|
|||||||
import { BrokerAccountResponseDto } from './broker-account-response.dto';
|
import { BrokerAccountResponseDto } from './broker-account-response.dto';
|
||||||
import { BrokerMoneyDto } from './broker-money.dto';
|
import { BrokerMoneyDto } from './broker-money.dto';
|
||||||
|
|
||||||
export class BrokerPositionResponseDto {
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
figi!: string | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
instrumentUid!: string | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
positionUid!: string | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
ticker!: string | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
classCode!: string | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
instrumentType!: string | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
name!: string | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
quantity!: number | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
blockedLots!: number | null;
|
|
||||||
|
|
||||||
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
|
||||||
currentPrice!: BrokerMoneyDto | null;
|
|
||||||
|
|
||||||
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
|
||||||
currentValue!: BrokerMoneyDto | null;
|
|
||||||
|
|
||||||
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
|
||||||
averagePositionPrice!: BrokerMoneyDto | null;
|
|
||||||
|
|
||||||
@ApiProperty({ nullable: true })
|
|
||||||
expectedYieldPercent!: number | null;
|
|
||||||
|
|
||||||
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
|
||||||
dailyYield!: BrokerMoneyDto | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class BrokerPortfolioTotalsDto {
|
export class BrokerPortfolioTotalsDto {
|
||||||
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
||||||
shares!: BrokerMoneyDto | null;
|
shares!: BrokerMoneyDto | null;
|
||||||
@ -102,9 +58,6 @@ export class BrokerPortfolioResponseDto {
|
|||||||
@ApiProperty({ type: [BrokerMoneyDto] })
|
@ApiProperty({ type: [BrokerMoneyDto] })
|
||||||
blockedCash!: BrokerMoneyDto[];
|
blockedCash!: BrokerMoneyDto[];
|
||||||
|
|
||||||
@ApiProperty({ type: [BrokerPositionResponseDto] })
|
|
||||||
positions!: BrokerPositionResponseDto[];
|
|
||||||
|
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
asOf!: string;
|
asOf!: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,46 @@
|
|||||||
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
import { BrokerMoneyDto } from './broker-money.dto';
|
||||||
|
|
||||||
|
export class BrokerPositionResponseDto {
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
figi!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
instrumentUid!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
positionUid!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
ticker!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
classCode!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
instrumentType!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
name!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
quantity!: number | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
blockedLots!: number | null;
|
||||||
|
|
||||||
|
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
||||||
|
currentPrice!: BrokerMoneyDto | null;
|
||||||
|
|
||||||
|
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
||||||
|
currentValue!: BrokerMoneyDto | null;
|
||||||
|
|
||||||
|
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
||||||
|
averagePositionPrice!: BrokerMoneyDto | null;
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
expectedYieldPercent!: number | null;
|
||||||
|
|
||||||
|
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
||||||
|
dailyYield!: BrokerMoneyDto | null;
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
|
import { BrokerPositionResponseDto } from './broker-position-response.dto';
|
||||||
|
|
||||||
|
export class BrokerPositionsPageResponseDto {
|
||||||
|
@ApiProperty()
|
||||||
|
accountId!: string;
|
||||||
|
|
||||||
|
@ApiProperty({ type: [BrokerPositionResponseDto] })
|
||||||
|
items!: BrokerPositionResponseDto[];
|
||||||
|
|
||||||
|
@ApiProperty({ nullable: true })
|
||||||
|
nextCursor!: string | null;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
hasNext!: boolean;
|
||||||
|
|
||||||
|
@ApiProperty()
|
||||||
|
asOf!: string;
|
||||||
|
}
|
||||||
@ -51,7 +51,14 @@ export type BrokerPortfolio = {
|
|||||||
};
|
};
|
||||||
cash: BrokerMoney[];
|
cash: BrokerMoney[];
|
||||||
blockedCash: BrokerMoney[];
|
blockedCash: BrokerMoney[];
|
||||||
positions: BrokerPosition[];
|
asOf: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BrokerPositionsPage = {
|
||||||
|
accountId: string;
|
||||||
|
items: BrokerPosition[];
|
||||||
|
nextCursor: string | null;
|
||||||
|
hasNext: boolean;
|
||||||
asOf: string;
|
asOf: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -66,6 +73,7 @@ export type BrokerOperation = {
|
|||||||
type: string;
|
type: string;
|
||||||
category: BrokerOperationCategory;
|
category: BrokerOperationCategory;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
|
name: string | null;
|
||||||
state: string | null;
|
state: string | null;
|
||||||
instrumentUid: string | null;
|
instrumentUid: string | null;
|
||||||
figi: string | null;
|
figi: string | null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user