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!
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!