Browse Source

添加账户接口修改

master
shanji 3 years ago
parent
commit
bdbb731694
  1. 2
      Binance.TradeRobot.API/Controllers/UserController.cs
  2. 5
      Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml
  3. 41
      Binance.TradeRobot.Model/Db/Exchange/ExchangeAPIKey.cs
  4. 1
      Binance.TradeRobot.Model/Db/Exchange/ExchangeAccount.cs
  5. 4
      Binance.TradeRobot.Model/Db/User/UserAccountFundChangeRecord.cs
  6. 3
      Binance.TradeRobot.Model/Dto/Request/Exchange/AddExchangeAccountRequest.cs
  7. 6
      Binance.TradeRobot.Model/Dto/Response/Exchange/ExchangeAPIKeyResponse.cs

2
Binance.TradeRobot.API/Controllers/UserController.cs

@ -40,7 +40,7 @@ namespace Binance.TradeRobot.API.Controllers
/// <summary>
/// 获取用户资金变更记录
/// </summary>
[HttpGet]
[HttpPost]
public UserAccountChangeRecordListResponse GetUserAccountFundChangeRecordList([FromBody] QueryUserAccountRequest queryUserAccountRequest)
{
return userBusiness.GetUserAccountFundChangeRecordList(queryUserAccountRequest);

5
Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml

@ -394,6 +394,11 @@
用户投资收益
</summary>
</member>
<member name="P:Binance.TradeRobot.Model.Dto.AddExchangeAccountRequest.Id">
<summary>
交易所UID
</summary>
</member>
<member name="P:Binance.TradeRobot.Model.Dto.AddExchangeAccountRequest.TradePolicy">
<summary>
交易策略

41
Binance.TradeRobot.Model/Db/Exchange/ExchangeAPIKey.cs

@ -4,27 +4,38 @@ using System;
namespace Binance.TradeRobot.Model.Db
{
[Table(Name = "exchangeapikey", DisableSyncStructure = true)]
public partial class ExchangeAPIKey
{
public partial class ExchangeAPIKey
{
[Column(DbType = "bigint", IsPrimary = true)]
public long Id { get; set; }
public ExchangeAPIKey()
{
CreateTime = DateTime.Now;
}
[Column(DbType = "bigint")]
public long AccountId { get; set; }
[Column(DbType = "bigint", IsPrimary = true)]
public long Id { get; set; }
[Column(StringLength = 100, IsNullable = false)]
public string APIKey { get; set; }
/// <summary>
/// ½»Ò×ËùÕ˺ÅUID
/// </summary>
[Column(DbType = "bigint")]
public long AccountId { get; set; }
[Column(DbType = "datetime")]
public DateTime CreateTime { get; set; }
[Column(StringLength = 100, IsNullable = false)]
public string APIKey { get; set; }
[Column(DbType = "bigint")]
public long? RobotId { get; set; }
[Column(DbType = "datetime")]
public DateTime CreateTime { get; set; }
[Column(StringLength = 100, IsNullable = false)]
public string SecretKey { get; set; }
/// <summary>
/// ¹ØÁª»úÆ÷ÈËId
/// </summary>
[Column(DbType = "bigint")]
public long? RobotId { get; set; }
}
[Column(StringLength = 100, IsNullable = false)]
public string SecretKey { get; set; }
}
}

1
Binance.TradeRobot.Model/Db/Exchange/ExchangeAccount.cs

@ -8,6 +8,7 @@ namespace Binance.TradeRobot.Model.Db
[Table(Name = "exchangeaccount", DisableSyncStructure = true)]
public partial class ExchangeAccount
{
public ExchangeAccount() { CreateTime = DateTime.Now; }
[Column(DbType = "bigint", IsPrimary = true)]
public long Id { get; set; }

4
Binance.TradeRobot.Model/Db/User/UserAccountFundChangeRecord.cs

@ -8,6 +8,10 @@ namespace Binance.TradeRobot.Model.Db
[Table(Name = "useraccountfundchangerecord", DisableSyncStructure = true)]
public partial class UserAccountFundChangeRecord
{
public UserAccountFundChangeRecord()
{
CreateTime = DateTime.Now;
}
[Column(DbType = "bigint", IsPrimary = true)]
public long Id { get; set; }

3
Binance.TradeRobot.Model/Dto/Request/Exchange/AddExchangeAccountRequest.cs

@ -4,6 +4,9 @@ namespace Binance.TradeRobot.Model.Dto
{
public class AddExchangeAccountRequest
{
/// <summary>
/// 交易所UID
/// </summary>
public long Id { get; set; }
public string LoginName { get; set; }

6
Binance.TradeRobot.Model/Dto/Response/Exchange/ExchangeAPIKeyResponse.cs

@ -2,8 +2,14 @@
{
public class ExchangeAPIKeyResponse : Db.ExchangeAPIKey
{
/// <summary>
/// 逐仓杠杆USDT
/// </summary>
public decimal SpotMarginUSDT { get; set; }
/// <summary>
/// 机器人交易对
/// </summary>
public string RobotSymbol { get; set; }
}
}

Loading…
Cancel
Save