blob: 4e94533e1f0648daac4a28ff29392c4bdbd22cdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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")
}
|