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.
 
 

22 lines
504 B

package trade
import "github.com/govalues/decimal"
// ITradeStrategy 下单策略
// 根据购买信号和账户信息生成下单参数
// TradeStrategy 下单买入策略接口(控制滑点, 仓位管理)
type ITradeStrategy interface {
// 下单, 币种,方向,杠杆
Trade(arg ...string)
// 市场价格更新
Update(ctx ITradeStrategyContext, account ITradeAccount)
}
type ITradeStrategyContext interface {
// 最新价格
LastPrice() decimal.Decimal
}
type TradeStrategyParam struct {
}