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 accountId, string apiKey, string secret)
{
if (exchange == Enums.Exchange.Binance)
return new BinanceAPIClient(accountId, 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 accountId, string apiKey, string secret)
{
this.AccountId = accountId;
this.ApiKey = apiKey;
this.Secret = secret;
}
///
/// 获取逐仓杠杆账户资产
///
///
///
public virtual IList GetIsolatedMarginAccountAssets()
{
throw new NotImplementedException();
}
///
/// 查询最大借币额度(USDT)
///
///
///
///
public virtual decimal QueryMaxLoanAmount(string symbol)
{
throw new NotImplementedException();
}
///
/// 逐仓杠杆账户借币
///
///
///
/// 借币结果对象
public virtual IsolatedMarginLoanResponse IsolatedMarginLoan(string symbol, decimal loanAmount)
{
throw new NotImplementedException();
}
///
/// 逐仓杠杆账户还币
///
///
///
/// 还币利息
public virtual decimal IsolatedMarginRepay(string symbol, decimal repayAmount)
{
throw new NotImplementedException();
}
///
/// 逐仓杠杆下单接口
///
/// 交易对
/// 交易方向
/// 订单类型
/// 基础币数量,卖单必传
/// 报价币金额,市价买单必传
/// 下单价格,市价不传
/// 止损价格,与STOP_LOSS,STOP_LOSS_LIMIT一起使用
/// 客户端订单Id
/// 交易所订单Id
///
public virtual long IsolatedMarginPlaceOrder(string symbol,
Enums.TradeDirection tradeDirection,
Enums.OrderType orderType,
decimal? quantity = null,
decimal? quoteAmount = null,
decimal? price = null,
decimal? stopPrice = null,
string newClientOrderId = "")
{
throw new NotImplementedException();
}
///
/// 取消逐仓杠杆订单
///
///
///
///
///
public virtual void CancelIsolateMarginOrder(string symbol, long orderId, string clientOrderId)
{
throw new NotImplementedException();
}
}
}