Created
August 26, 2021 01:27
-
-
Save ugik/6c51f0185197377a07d4cf562a3c0159 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buyingQty, sellingQty = getBuyingDataETH(side='SELL') | |
# SHORT SELL order | |
headers={"Authorization":CMclient.bearerToken, 'Content-Type': 'application/x-www-form-urlencoded'} | |
payload = {'orderType':'limit', 'buyingCurrency':'USD', 'sellingCurrency':'ETH', | |
'buyingQty':buyingQty, 'sellingQty':sellingQty, 'margin':'true', 'userData':'foo'} | |
response = requests.request("POST", f'{COINMETRO}/exchange/orders/create', headers=headers, data=payload) | |
responseJson = json.loads(response._content) | |
orderID = responseJson['orderID'] | |
print(responseJson) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment