@@ -583,10 +583,10 @@ func (bitvavo Bitvavo) sendPublic(endpoint string) []byte {
583583 millis := time .Now ().UnixNano () / 1000000
584584 timeString := strconv .FormatInt (millis , 10 )
585585 sig := bitvavo .createSignature (timeString , "GET" , strings .Replace (endpoint , bitvavo .RestUrl , "" , 1 ), map [string ]string {}, bitvavo .ApiSecret )
586- req .Header .Set ("Bitvavo-Access-Key " , bitvavo .ApiKey )
587- req .Header .Set ("Bitvavo-Access-Signature " , sig )
588- req .Header .Set ("Bitvavo-Access-Timestamp " , timeString )
589- req .Header .Set ("Bitvavo-Access-Window " , strconv .Itoa (bitvavo .AccessWindow ))
586+ req .Header .Set ("bitvavo-access-key " , bitvavo .ApiKey )
587+ req .Header .Set ("bitvavo-access-signature " , sig )
588+ req .Header .Set ("bitvavo-access-timestamp " , timeString )
589+ req .Header .Set ("bitvavo-access-window " , strconv .Itoa (bitvavo .AccessWindow ))
590590 }
591591 req .Header .Set ("Content-Type" , "application/json" )
592592 resp , err := client .Do (req )
@@ -622,11 +622,11 @@ func (bitvavo Bitvavo) sendPrivate(endpoint string, postfix string, body map[str
622622 byteBody = nil
623623 }
624624 req , err := http .NewRequest (method , url , bytes .NewBuffer (byteBody ))
625- req .Header .Set ("Bitvavo-Access-Key " , bitvavo .ApiKey )
626- req .Header .Set ("Bitvavo-Access-Signature " , sig )
627- req .Header .Set ("Bitvavo-Access-Timestamp " , timeString )
628- req .Header .Set ("Bitvavo-Access-Window " , strconv .Itoa (bitvavo .AccessWindow ))
629- req .Header .Set ("Content-Type " , "application/json" )
625+ req .Header .Set ("bitvavo-access-key " , bitvavo .ApiKey )
626+ req .Header .Set ("bitvavo-access-signature " , sig )
627+ req .Header .Set ("bitvavo-access-timestamp " , timeString )
628+ req .Header .Set ("bitvavo-access-window " , strconv .Itoa (bitvavo .AccessWindow ))
629+ req .Header .Set ("content-type " , "application/json" )
630630 resp , err := client .Do (req )
631631 if err != nil {
632632 errorToConsole ("We caught an error " + err .Error ())
@@ -650,10 +650,10 @@ func checkLimit() {
650650
651651func updateRateLimit (response http.Header ) {
652652 for key , value := range response {
653- if key == "Bitvavo-Ratelimit-Remaining " {
653+ if key == "bitvavo-ratelimit-remaining " {
654654 rateLimitRemaining , _ = strconv .Atoi (value [0 ])
655655 }
656- if key == "Bitvavo-Ratelimit-Resetat " {
656+ if key == "bitvavo-ratelimit-resetat " {
657657 rateLimitReset , _ = strconv .Atoi (value [0 ])
658658 now := int (time .Nanosecond * time .Duration (time .Now ().UnixNano ()) / time .Millisecond )
659659 var timeToWait = rateLimitReset - now
0 commit comments