币安量化交易
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.

71 lines
2.2 KiB

using Binance.TradeRobot.Model.Base;
using SDKAdapter.Model;
using System;
using System.Collections.Generic;
namespace SDKAdapter.APIClient
{
public class BaseAPIClient
{
public static BaseAPIClient Create(Enums.Exchange exchange, long uid, string apiKey, string secret)
{
if (exchange == Enums.Exchange.Binance)
return new BinanceAPIClient(uid, apiKey, secret);
return null;
}
protected long AccountId { get; private set; }
protected string ApiKey { get; private set; }
protected string Secret { get; private set; }
public BaseAPIClient(long uid, string apiKey, string secret)
{
this.AccountId = uid;
this.ApiKey = apiKey;
this.Secret = secret;
}
/// <summary>
/// 获取逐仓杠杆账户资产
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public virtual IList<IsolatedMarginAccountAsset> GetIsolatedMarginAccountAssets()
{
throw new NotImplementedException();
}
/// <summary>
/// 查询最大借币额度(USDT)
/// </summary>
/// <param name="symbol"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public virtual decimal QueryMaxLoanAmount(string symbol)
{
throw new NotImplementedException();
}
/// <summary>
/// 逐仓杠杆账户借币
/// </summary>
/// <param name="symbol"></param>
/// <param name="loanAmount"></param>
/// <returns>借币结果对象</returns>
public virtual IsolatedMarginLoanResponse IsolatedMarginLoan(string symbol, decimal loanAmount)
{
throw new NotImplementedException();
}
/// <summary>
/// 逐仓杠杆账户还币
/// </summary>
/// <param name="symbol"></param>
/// <param name="repayAmount"></param>
/// <returns>还币利息</returns>
public virtual decimal IsolatedMarginRepayLoan(string symbol, decimal repayAmount)
{
throw new NotImplementedException();
}
}
}