mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 23:16:53 +00:00
Add Bitstamp dynamic currency updater
This commit is contained in:
@@ -46,6 +46,7 @@ const (
|
||||
bitstampAPIXrpWithdrawal = "xrp_withdrawal"
|
||||
bitstampAPIXrpDeposit = "xrp_address"
|
||||
bitstampAPIReturnType = "string"
|
||||
bitstampAPITradingPairsInfo = "trading-pairs-info"
|
||||
)
|
||||
|
||||
// Bitstamp is the overarching type across the bitstamp package
|
||||
@@ -188,6 +189,14 @@ func (b *Bitstamp) GetOrderbook(currency string) (Orderbook, error) {
|
||||
return orderbook, nil
|
||||
}
|
||||
|
||||
// GetTradingPairs returns a list of trading pairs which Bitstamp
|
||||
// currently supports
|
||||
func (b *Bitstamp) GetTradingPairs() ([]TradingPair, error) {
|
||||
var result []TradingPair
|
||||
path := fmt.Sprintf("%s/v%s/%s", bitstampAPIURL, bitstampAPIVersion, bitstampAPITradingPairsInfo)
|
||||
return result, common.SendHTTPGetRequest(path, true, b.Verbose, &result)
|
||||
}
|
||||
|
||||
// GetTransactions returns transaction information
|
||||
// value paramater ["time"] = "minute", "hour", "day" will collate your
|
||||
// response into time intervals. Implementation of value in test code.
|
||||
|
||||
Reference in New Issue
Block a user