Skip to content

Instantly share code, notes, and snippets.

@ugik
Created August 26, 2021 01:27
Show Gist options
  • Save ugik/6c51f0185197377a07d4cf562a3c0159 to your computer and use it in GitHub Desktop.
Save ugik/6c51f0185197377a07d4cf562a3c0159 to your computer and use it in GitHub Desktop.
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