21 lines
690 B
Java
21 lines
690 B
Java
package ru.lionarius.api.command;
|
|
|
|
import ru.lionarius.api.currency.CurrencyPair;
|
|
import ru.lionarius.api.order.OrderType;
|
|
|
|
import java.util.UUID;
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
|
public record PlaceOrderCommand(UUID clientId, CurrencyPair pair, OrderType type, double price, double quantity,
|
|
CompletableFuture<UUID> result) implements Command<UUID> {
|
|
|
|
public PlaceOrderCommand(UUID clientId, CurrencyPair pair, OrderType type, double price, double quantity) {
|
|
this(clientId, pair, type, price, quantity, new CompletableFuture<>());
|
|
}
|
|
|
|
@Override
|
|
public CompletableFuture<UUID> result() {
|
|
return result;
|
|
}
|
|
}
|