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

@@ -3,6 +3,8 @@ package main
import (
"net/http"
"fmt"
"strings"
"encoding/json"
"io/ioutil"
"errors"
)
@@ -35,3 +37,13 @@ func SendHTTPRequest(url string, jsonDecode bool, result interface{}) (err error
}
return
}
func JsonDecode(data string, result interface{}) (err error) {
r := json.NewDecoder(strings.NewReader(data))
err = r.Decode(result)
if err != nil {
return err
}
return
}