Expose GetFeeByType exchange wrapper

This commit is contained in:
Adrian Gallagher
2019-03-27 16:13:05 +11:00
parent fbc9b0aa97
commit b048539f4c
3 changed files with 11 additions and 5 deletions

View File

@@ -233,3 +233,8 @@ func (b *Bitflyer) GetActiveOrders(getOrdersRequest *exchange.GetOrdersRequest)
func (b *Bitflyer) GetOrderHistory(getOrdersRequest *exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) {
return nil, common.ErrNotYetImplemented
}
// GetFeeByType returns an estimate of fee based on the type of transaction
func (b *Bitflyer) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error) {
return b.GetFee(feeBuilder)
}

View File

@@ -309,11 +309,10 @@ type IBotExchange interface {
SupportsAutoPairUpdates() bool
GetLastPairsUpdateTime() int64
SupportsRESTTickerBatchUpdates() bool
GetFeeByType(feeBuilder *FeeBuilder) (float64, error)
GetWithdrawPermissions() uint32
FormatWithdrawPermissions() string
SupportsWithdrawPermissions(permissions uint32) bool
GetFundingHistory() ([]FundHistory, error)
SubmitOrder(p currency.Pair, side OrderSide, orderType OrderType, amount, price float64, clientID string) (SubmitOrderResponse, error)
ModifyOrder(action *ModifyOrder) (string, error)
@@ -321,14 +320,11 @@ type IBotExchange interface {
CancelAllOrders(orders *OrderCancellation) (CancelAllOrdersResponse, error)
GetOrderInfo(orderID string) (OrderDetail, error)
GetDepositAddress(cryptocurrency currency.Code, accountID string) (string, error)
GetOrderHistory(getOrdersRequest *GetOrdersRequest) ([]OrderDetail, error)
GetActiveOrders(getOrdersRequest *GetOrdersRequest) ([]OrderDetail, error)
WithdrawCryptocurrencyFunds(withdrawRequest *WithdrawRequest) (string, error)
WithdrawFiatFunds(withdrawRequest *WithdrawRequest) (string, error)
WithdrawFiatFundsToInternationalBank(withdrawRequest *WithdrawRequest) (string, error)
GetWebsocket() (*Websocket, error)
}

View File

@@ -180,4 +180,9 @@ func ({{.Variable}} *{{.CapitalName}}) GetOrderHistory(getOrdersRequest *exchang
return nil, common.ErrNotYetImplemented
}
// GetFeeByType returns an estimate of fee based on the type of transaction
func ({{.Variable}} *{{.CapitalName}}) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error) {
return 0, common.ErrNotYetImplemented
}
{{end}}