mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2026-02-10 03:36:13 +01:00
optimized trade
This commit is contained in:
@@ -1,48 +1,12 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsDecimal, IsNotEmpty, IsString } from 'class-validator';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
export class TradeDto {
|
||||
@ApiProperty({
|
||||
type: String,
|
||||
description: 'UUID of the user that hold tokens before trade',
|
||||
example: '121212-DSDZ1-21212DJDZ-31313',
|
||||
})
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
id_giver: string;
|
||||
|
||||
@ApiProperty({
|
||||
type: String,
|
||||
description: 'UUID of the user that will receive tokens after trade',
|
||||
example: '121212-DSDZ1-21212DJDZ-31313',
|
||||
})
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
id_receiver: string;
|
||||
|
||||
@ApiProperty({
|
||||
type: String,
|
||||
description: 'UUID of the crypto traded',
|
||||
example: '121212-DSDZ1-21212DJDZ-31313',
|
||||
})
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
id_crypto: string;
|
||||
|
||||
@ApiProperty({
|
||||
type: Number,
|
||||
description: 'Amount of tokens traded ',
|
||||
example: 2,
|
||||
})
|
||||
@IsNotEmpty()
|
||||
@IsDecimal()
|
||||
amount_traded: number;
|
||||
|
||||
@ApiProperty({
|
||||
type: String,
|
||||
description: 'Offer UUID ',
|
||||
example: '121212-DSDZ1-21212DJDZ-31313',
|
||||
})
|
||||
@IsNotEmpty()
|
||||
@IsDecimal()
|
||||
@IsString()
|
||||
id_offer: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user