From 1e3e570edb0cf12ff94d72d94cc66b65d042cd57 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 12 May 2021 01:21:21 +0800 Subject: [PATCH] add ExchangeWithdrawalService interface --- pkg/types/exchange.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/types/exchange.go b/pkg/types/exchange.go index db80845d6..4287f1da2 100644 --- a/pkg/types/exchange.go +++ b/pkg/types/exchange.go @@ -7,6 +7,8 @@ import ( "fmt" "strings" "time" + + "github.com/c9s/bbgo/pkg/fixedpoint" ) const DateFormat = "2006-01-02" @@ -100,6 +102,10 @@ type ExchangeTransferService interface { QueryWithdrawHistory(ctx context.Context, asset string, since, until time.Time) (allWithdraws []Withdraw, err error) } +type ExchangeWithdrawalService interface { + Withdrawal(ctx context.Context, asset string, amount fixedpoint.Value, address string) error +} + type ExchangeRewardService interface { QueryRewards(ctx context.Context, startTime time.Time) ([]Reward, error) }