Bithumb replace deprecated API to new one

This commit is contained in:
Adrian Gallagher
2018-07-12 12:50:46 +10:00
parent 4f8e74f6dc
commit b062fd2907
3 changed files with 13 additions and 12 deletions

View File

@@ -24,9 +24,9 @@ const (
// Public API
requestsPerSecondPublicAPI = 20
publicTicker = "/public/ticker/"
publicOrderBook = "/public/orderbook/"
publicRecentTransaction = "/public/recent_transactions/"
publicTicker = "/public/ticker/"
publicOrderBook = "/public/orderbook/"
publicTransactionHistory = "/public/transaction_history/"
// Private API
requestsPerSecondPrivateAPI = 10
@@ -198,12 +198,12 @@ func (b *Bithumb) GetOrderBook(symbol string) (Orderbook, error) {
return response, nil
}
// GetRecentTransactions returns recent transactions
// GetTransactionHistory returns recent transactions
//
// symbol e.g. "btc"
func (b *Bithumb) GetRecentTransactions(symbol string) (RecentTransactions, error) {
response := RecentTransactions{}
path := fmt.Sprintf("%s%s%s", apiURL, publicRecentTransaction, common.StringToUpper(symbol))
func (b *Bithumb) GetTransactionHistory(symbol string) (TransactionHistory, error) {
response := TransactionHistory{}
path := fmt.Sprintf("%s%s%s", apiURL, publicTransactionHistory, common.StringToUpper(symbol))
err := b.SendHTTPRequest(path, &response)
if err != nil {