key="YOUR_API_KEY" secret="YOUR_API_SECRET" host="https://api.gateio.ws" prefix="/api/v4" method="POST" url="/withdrawals" query_param="" body_param='{"withdraw_order_id":"order_123456","currency":"USDT","address":"1HkxtBAMrA3tP5ENnYY2CZortjZvFDH5Cs","amount":"222.61","memo":"","chain":"TRX"}' timestamp=$(date +%s) body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}') sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp" sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}') full_url="$host$prefix$url" curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \ -H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"