Added structs for Ticker information for various exchanges.

This commit is contained in:
Adrian Gallagher
2014-11-10 20:03:37 +11:00
parent 0e37811cd0
commit 9327a31ba5
8 changed files with 135 additions and 30 deletions

View File

@@ -12,6 +12,7 @@ import (
"time"
"encoding/json"
"io/ioutil"
"log"
"fmt"
)
@@ -204,7 +205,7 @@ func (i *ItBit) SendAuthenticatedHTTPRequest(method string, path string, params
}
PayloadJson, err := json.Marshal(request)
fmt.Printf("Request JSON: %s\n", PayloadJson)
log.Printf("Request JSON: %s\n", PayloadJson)
if err != nil {
return errors.New("SendAuthenticatedHTTPRequest: Unable to JSON request")
@@ -229,7 +230,7 @@ func (i *ItBit) SendAuthenticatedHTTPRequest(method string, path string, params
}
contents, _ := ioutil.ReadAll(resp.Body)
fmt.Printf("Recieved raw: %s\n", string(contents))
log.Printf("Recieved raw: %s\n", string(contents))
resp.Body.Close()
return nil
}