import 'package:dartz/dartz.dart';
import '../../core/error/failures.dart';
import '../entities/trade_order.dart';
import '../entities/kline.dart';

abstract class TradingRepository {
  Future<Either<Failure, String>> getCurrentPrice();

  Future<Either<Failure, List<Kline>>> getKlineData(String period);

  Future<Either<Failure, TradeOrder>> buyShares({
    required String accountSequence,
    required String amount,
  });

  Future<Either<Failure, TradeOrder>> sellShares({
    required String accountSequence,
    required String amount,
  });

  Future<Either<Failure, List<TradeOrder>>> getOrders(
    String accountSequence, {
    int page = 1,
    int limit = 20,
  });

  Future<Either<Failure, void>> transfer({
    required String accountSequence,
    required String amount,
    required String direction,
  });
}
