codex/broker-operations-ui #18
@ -2,6 +2,7 @@ import { ApiProperty } from '@nestjs/swagger';
|
||||
import { BrokerAccountResponseDto } from './broker-account-response.dto';
|
||||
import { BrokerOperationSyncResponseDto } from './broker-operation-sync-query.dto';
|
||||
import { BrokerOperationsPageResponseDto } from './broker-operation-response.dto';
|
||||
import { BrokerPositionsPageResponseDto } from './broker-positions-page-response.dto';
|
||||
import { BrokerPortfolioResponseDto } from './broker-portfolio-response.dto';
|
||||
|
||||
export class BrokerResponseMetaDto {
|
||||
@ -36,6 +37,14 @@ export class BrokerOperationsEnvelopeDto {
|
||||
meta!: BrokerResponseMetaDto;
|
||||
}
|
||||
|
||||
export class BrokerPositionsEnvelopeDto {
|
||||
@ApiProperty({ type: BrokerPositionsPageResponseDto })
|
||||
data!: BrokerPositionsPageResponseDto;
|
||||
|
||||
@ApiProperty({ type: BrokerResponseMetaDto })
|
||||
meta!: BrokerResponseMetaDto;
|
||||
}
|
||||
|
||||
export class BrokerOperationSyncEnvelopeDto {
|
||||
@ApiProperty({ type: BrokerOperationSyncResponseDto })
|
||||
data!: BrokerOperationSyncResponseDto;
|
||||
|
||||
@ -28,6 +28,9 @@ export class BrokerOperationResponseDto {
|
||||
@ApiProperty({ nullable: true })
|
||||
description!: string | null;
|
||||
|
||||
@ApiProperty({ nullable: true })
|
||||
name!: string | null;
|
||||
|
||||
@ApiProperty({ nullable: true })
|
||||
state!: string | null;
|
||||
|
||||
|
||||
@ -2,50 +2,6 @@ import { ApiProperty } from '@nestjs/swagger';
|
||||
import { BrokerAccountResponseDto } from './broker-account-response.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 {
|
||||
@ApiProperty({ type: BrokerMoneyDto, nullable: true })
|
||||
shares!: BrokerMoneyDto | null;
|
||||
@ -102,9 +58,6 @@ export class BrokerPortfolioResponseDto {
|
||||
@ApiProperty({ type: [BrokerMoneyDto] })
|
||||
blockedCash!: BrokerMoneyDto[];
|
||||
|
||||
@ApiProperty({ type: [BrokerPositionResponseDto] })
|
||||
positions!: BrokerPositionResponseDto[];
|
||||
|
||||
@ApiProperty()
|
||||
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[];
|
||||
blockedCash: BrokerMoney[];
|
||||
positions: BrokerPosition[];
|
||||
asOf: string;
|
||||
};
|
||||
|
||||
export type BrokerPositionsPage = {
|
||||
accountId: string;
|
||||
items: BrokerPosition[];
|
||||
nextCursor: string | null;
|
||||
hasNext: boolean;
|
||||
asOf: string;
|
||||
};
|
||||
|
||||
@ -66,6 +73,7 @@ export type BrokerOperation = {
|
||||
type: string;
|
||||
category: BrokerOperationCategory;
|
||||
description: string | null;
|
||||
name: string | null;
|
||||
state: string | null;
|
||||
instrumentUid: string | null;
|
||||
figi: string | null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user