|
|
@ -9,6 +9,7 @@ using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading; |
|
|
|
using Yitter.IdGenerator; |
|
|
@ -129,12 +130,15 @@ namespace Binance.TradeRobot.Business |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 获取账户余额
|
|
|
|
|
|
|
|
step = "获取账户余额"; |
|
|
|
var apiClient = GetBaseAPIClient(robot.ExchangeId, robot.ExchangeAPIKey.AccountId, robot.ExchangeAPIKey.APIKey, robot.ExchangeAPIKey.SecretKey); |
|
|
|
//逐仓杠杆账户余额
|
|
|
|
var balance = apiClient.GetIsolatedMarginAccountAssets().FirstOrDefault(m => m.Symbol == robot.Symbol)?.QuoteFree ?? 0M; |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 计算下单数量
|
|
|
|
var previewTradeAmount = d21Robot.D21Policy.Position; //预估交易额
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
} |
|
|
|