Post
Topic
Board Exchanges
Re: [Exchange] GRAVIEX Exchange: low fees, fast withdrawals, high security
by
mazertwo
on 06/05/2018, 10:56:33 UTC
How to get market with python 3?

    access_key = 'xxxx'
    secret_key = 'yyyy'
    ctx = ssl.create_default_context()
    ctx.check_hostname = False
    ctx.verify_mode = ssl.CERT_NONE
    epoch_time = str(int(time.time())) + '000'
    request = 'access_key=' + access_key + '&tonce=' + epoch_time
    message = 'GET|/api/v2/markets|' + request
    signature = hmac.new(b'secret_key',b'message',hashlib.sha256).hexdigest()
    query = 'https://graviex.net/api/v2/markets?' + request + '&signature=' + signature
    graviex = urllib.request.urlopen(query, context=ctx).read()
    print(graviex)

Not work:
401. Unauthorized