Python Forum
Python Rest API Public/Secret Keys Authentication Nonce
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Rest API Public/Secret Keys Authentication Nonce
#2
How can I buy say Bitcoin from Bittrex.com using Python and their API? Bittrex's API documentation: https://bittrex.github.io/api/v1-1

The public requests are easy for me to understand. I can do them. I'm using the requests package. For example:

bittrex_exchange = requests.get('https://api.bittrex.com/api/v1.1/public/getmarketsummaries').json()

And later in other places I can use that to get other things, for example:

(bittrex_exchange['result'][0]['MarketName'])

gives me some particular piece of information I need.

But the private requests require authentication using my public key, secret key, and a nonce. I know how to generate a nonce:

noncea = int(round(time.time()-1571111111)*10)

I just put the letter a at the end to avoid mixing up any references in case the word nonce is used anywhere else in my code.

I also know how to encrypt my secret key (or at least I think I know how and am doing this correctly):

bittrex_encrypted_secret_key = hashlib.sha512(str(bittrex_secret_key).encode("utf-8")).hexdigest()

But I have no idea where to put/use my public key, encrypted secret key, and nonce!

If anyone can explain this to me I would greatly appreciate it!
Reply


Messages In This Thread
How to buy Bitcoin on an exchange using their API and Python? - by dn237 - Oct-31-2019, 02:07 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  saml2 idp sso authentication tiagome 1 2,251 Apr-08-2022, 02:38 PM
Last Post: snippsat
  How to Host a REST API that executes a PYTHON script on the WEB SERVER rahul4data 4 3,670 Jan-25-2019, 02:54 PM
Last Post: DeaD_EyE
  Python Flask REST API vndywarhol 1 3,094 Sep-28-2018, 12:43 PM
Last Post: thomasp
  Python HTTPs client code with mutual SSL authentication ashish0265 0 4,007 Jul-28-2018, 07:39 PM
Last Post: ashish0265
  Download all secret links from a map design website fyec 0 2,962 Jul-24-2018, 09:08 PM
Last Post: fyec
  How to send keys at beginning of textbox using python Prince_Bhatia 2 3,177 May-21-2018, 08:15 AM
Last Post: Prince_Bhatia
  how to place Flask code on a public web server rarevesselt 6 7,107 Oct-04-2017, 07:32 AM
Last Post: rarevesselt
  California Public Salary Files Larz60+ 3 4,309 Mar-27-2017, 05:10 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020