diff options
Diffstat (limited to 'gosrc/requests.go')
-rw-r--r-- | gosrc/requests.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gosrc/requests.go b/gosrc/requests.go new file mode 100644 index 0000000..4e94533 --- /dev/null +++ b/gosrc/requests.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "log" +) + +func sign_request(body string, key string) { + fmt.Println("signing request : ", body) + + out2, err := RunStrings("/usr/bin/echo", "-n", body, "|", "/usr/bin/openssl", "dgst", "-sha256", "-hmac", key) + if err != nil { + log.Fatal("hwhat") + } + + fmt.Println(out2) + // here +} + +func make_body(order string, ticker string, price string) { + ret := "GET /sapi/v1/capital/config/getall" + sign_request(ret, "heheheheh") +} |