Created
August 30, 2022 06:15
-
-
Save sfat/e8d06cb5f9d7a1e4c4b141fd5a2f01d2 to your computer and use it in GitHub Desktop.
Revisions
-
sfat created this gist
Aug 30, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/usr/bin/env bash timestamp=$(python3 -c 'import time; print(int(time.time() * 1000))') api_key="API_KEY" # change me secret_key="SECRET_KEY" # change me query="symbol=$1&side=$2&type=MARKET&quantity=$3&recvWindow=10000×tamp=$timestamp" echo "$query" signature=$(echo -n "$query" | openssl dgst -sha256 -hmac $secret_key) #echo -n "$query" echo "$signature" echo "https://testnet.binance.vision/api/v3/order?$query&signature=$signature" curl -vvv -H "X-MBX-APIKEY: $api_key" -X POST "https://testnet.binance.vision/api/v3/order?$query&signature=$signature"