You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
187 lines
5.4 KiB
187 lines
5.4 KiB
using Binance.TradeRobot.Model.Base;
|
|
using FreeSql.DataAnnotations;
|
|
using System;
|
|
|
|
namespace Binance.TradeRobot.Model.Db
|
|
{
|
|
|
|
[Table(Name = "robot", DisableSyncStructure = true)]
|
|
public partial class Robot
|
|
{
|
|
|
|
[Column(DbType = "bigint", IsPrimary = true)]
|
|
public long Id { get; set; }
|
|
|
|
[Column(DbType = "datetime")]
|
|
public DateTime CreateTime { get; set; }
|
|
|
|
[Column(MapType = typeof(int), DbType = "int")]
|
|
public Enums.TradePolicy TradePolicy { get; set; }
|
|
|
|
/// <summary>
|
|
/// 运行时长(s)
|
|
/// </summary>
|
|
[Column(DbType = "bigint")]
|
|
public long RunningTime { get; set; } = 0;
|
|
|
|
[Column(MapType = typeof(int), DbType = "int")]
|
|
public Enums.RobotState State { get; set; }
|
|
|
|
[Column(StringLength = 50, IsNullable = false)]
|
|
public string Symbol { get; set; }
|
|
|
|
[Column(MapType = typeof(int), DbType = "int")]
|
|
public Enums.BusinessType BusinessType { get; set; }
|
|
|
|
[Column(MapType = typeof(int), DbType = "int")]
|
|
public Enums.Exchange ExchangeId { get; set; }
|
|
|
|
#region Symbol Extension
|
|
/// <summary>
|
|
/// 卖币精度
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public long SymbolId { get; set; }
|
|
|
|
[Column(IsIgnore = true)]
|
|
public int SymbolSaleQuantityAccuracy { get; set; }
|
|
#endregion
|
|
|
|
#region RobotAccount Extension
|
|
|
|
[Column(IsIgnore = true)]
|
|
public long RobotAccountId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 平仓次数
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public long ClosePositionCount { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 现货/杠杆持仓金额
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal SoptCurrentcyAmount { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 现货/杠杆持仓数量
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal SpotCurrencyQuantity { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 总收益
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal TotalProfit { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 盈利次数
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public long WinCount { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 总借币金额
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal LoanAmount { get; set; } = 0.0M;
|
|
#endregion
|
|
|
|
#region ExchangeAPIKey Extension
|
|
[Column(IsIgnore = true)]
|
|
public long ExchangeAccountId { get; set; }
|
|
[Column(IsIgnore = true)]
|
|
public string ExchangeAPIKey { get; set; }
|
|
[Column(IsIgnore = true)]
|
|
public string ExchangeSecretKey { get; set; }
|
|
#endregion
|
|
|
|
#region D21Policy Extension
|
|
[Column(IsIgnore = true)]
|
|
public long D21PolicyId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 执行模式
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public Enums.ExecutionMode D21ExecutionMode { get; set; } = Enums.ExecutionMode.Both;
|
|
|
|
/// <summary>
|
|
/// 是否开启增购
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public bool D21IsEnabledIncreasePurchase { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 是否开启错误信号补救
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public bool D21IsEnableRemedyForErrorCrossSignal { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 最大追高比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21MaxFollowPurchaseRatio { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 最大系统借币比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21MaxSystemLoanRatio { get; set; } = 0.00M;
|
|
|
|
/// <summary>
|
|
/// 最大交易所借币比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21MaxExchangeLoanRatio { get; set; } = 0.00M;
|
|
|
|
/// <summary>
|
|
/// 信号周期
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public Enums.SignalPeriod D21PeriodicSignal { get; set; }
|
|
|
|
/// <summary>
|
|
/// 仓位
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21Position { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 资产配置
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21Assets { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 一级止损-成交价亏损比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21Level1PriceStopLossRatio { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 一级止损-仓位止损比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21Level1PositionStopLossRatio { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 二级止损-成交价亏损比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21Level2PriceStopLossRatio { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 二级止损-仓位止损比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21Level2PositionStopLossRatio { get; set; } = 0.0M;
|
|
|
|
[Column(IsIgnore = true)]
|
|
public DateTime D21CreateTime { get; set; }
|
|
#endregion
|
|
}
|
|
}
|
|
|