From 1758ce649422255bd2faf482c02be71ce0783865 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 1 Apr 2022 22:58:13 +0200 Subject: signing requests --- gosrc/requests.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gosrc/requests.go (limited to 'gosrc/requests.go') 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") +} -- cgit v1.2.3