Skip to content

Commit f488776

Browse files
authored
Migrate to HTTP2 standard (lowercase headers)
1 parent 99f5111 commit f488776

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

python_bitvavo_api/bitvavo.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ def publicRequest(self, url):
186186
now = int(time.time() * 1000)
187187
sig = createSignature(now, 'GET', url.replace(self.base, ''), {}, self.APISECRET)
188188
headers = {
189-
'Bitvavo-Access-Key': self.APIKEY,
190-
'Bitvavo-Access-Signature': sig,
191-
'Bitvavo-Access-Timestamp': str(now),
192-
'Bitvavo-Access-Window': str(self.ACCESSWINDOW)
189+
'bitvavo-access-key': self.APIKEY,
190+
'bitvavo-access-signature': sig,
191+
'bitvavo-access-timestamp': str(now),
192+
'bitvavo-access-window': str(self.ACCESSWINDOW)
193193
}
194194
r = requests.get(url, headers = headers)
195195
else:
@@ -205,10 +205,10 @@ def privateRequest(self, endpoint, postfix, body = {}, method = 'GET'):
205205
sig = createSignature(now, method, (endpoint + postfix), body, self.APISECRET)
206206
url = self.base + endpoint + postfix
207207
headers = {
208-
'Bitvavo-Access-Key': self.APIKEY,
209-
'Bitvavo-Access-Signature': sig,
210-
'Bitvavo-Access-Timestamp': str(now),
211-
'Bitvavo-Access-Window': str(self.ACCESSWINDOW),
208+
'bitvavo-access-key': self.APIKEY,
209+
'bitvavo-access-signature': sig,
210+
'bitvavo-access-timestamp': str(now),
211+
'bitvavo-access-window': str(self.ACCESSWINDOW),
212212
}
213213
debugToConsole("REQUEST: " + url)
214214
if(method == 'GET'):
@@ -745,4 +745,4 @@ def subscriptionBook(self, market, callback):
745745
self.doSend(self.ws, json.dumps({ 'action': 'subscribe', 'channels': [{ 'name': 'book', 'markets': [market] }] }))
746746

747747
self.localBook[market] = {}
748-
self.doSend(self.ws, json.dumps({ 'action': 'getBook', 'market': market }))
748+
self.doSend(self.ws, json.dumps({ 'action': 'getBook', 'market': market }))

0 commit comments

Comments
 (0)