ZaifAPIのtradeAPIをシェルスクリプトで叩く
#!/bin/bash
# http://techbureau-api-document.readthedocs.io/ja/latest/trade/
NONCE=$(date "+%s")
KEY=__YOUR_KEY__
SECRET=__YOUR_SECRET__
METHOD=get_info
PARAMS="nonce=$NONCE&method=$METHOD"
SIGN=$(echo -n $PARAMS | openssl dgst -hmac $SECRET -sha512 | sed 's/^.* //')
curl https://api.zaif.jp/tapi -H "Key: $KEY" -H "Sign: $SIGN" -d $PARAMS