As title.
Here’s a sample:
$ ./bi GET allOrders symbol=XRPDOWNUSDT | tail -n 1 | jq '.' | grep -C12 MARKET
--
},
{
"symbol": "XRPDOWNUSDT",
"orderId": 126268443,
"orderListId": -1,
"clientOrderId": "and_9c511cb9a39945f2b6ae00ad41689acd",
"price": "0.00000000",
"origQty": "390043.43000000",
"executedQty": "390043.43000000",
"cummulativeQuoteQty": "6199.99990455",
"status": "FILLED",
"timeInForce": "GTC",
"type": "MARKET",
"side": "BUY",
"stopPrice": "0.00000000",
"icebergQty": "0.00000000",
"time": 1621516337077,
"updateTime": 1621516337077,
"isWorking": true,
"origQuoteOrderQty": "6200.00000000"
},
{
"symbol": "XRPDOWNUSDT",
"orderId": 126270115,
"orderListId": -1,
--
},
{
"symbol": "XRPDOWNUSDT",
"orderId": 130553768,
"orderListId": -1,
"clientOrderId": "and_1e4295d2e9aa49a69739c289df714002",
"price": "0.00000000",
"origQty": "357598.50000000",
"executedQty": "357598.50000000",
"cummulativeQuoteQty": "6799.99995521",
"status": "FILLED",
"timeInForce": "GTC",
"type": "MARKET",
"side": "BUY",
"stopPrice": "0.00000000",
"icebergQty": "0.00000000",
"time": 1621604685980,
"updateTime": 1621604685980,
"isWorking": true,
"origQuoteOrderQty": "6800.00000000"
},
{
"symbol": "XRPDOWNUSDT",
"orderId": 130557032,
"orderListId": -1,
--
},
{
"symbol": "XRPDOWNUSDT",
"orderId": 133018781,
"orderListId": -1,
"clientOrderId": "and_bec5961147704b8cac4dd1e85179d8e8",
"price": "0.00000000",
"origQty": "340406.87000000",
"executedQty": "340406.87000000",
"cummulativeQuoteQty": "8799.99974535",
"status": "FILLED",
"timeInForce": "GTC",
"type": "MARKET",
"side": "BUY",
"stopPrice": "0.00000000",
"icebergQty": "0.00000000",
"time": 1621673143063,
"updateTime": 1621673143063,
"isWorking": true,
"origQuoteOrderQty": "8800.00000000"
},
{
"symbol": "XRPDOWNUSDT",
"orderId": 133019648,
"orderListId": -1,
--
},
{
"symbol": "XRPDOWNUSDT",
"orderId": 133126983,
"orderListId": -1,
"clientOrderId": "and_6382cc7fc8f847f7b9481cc8b38eca4a",
"price": "0.00000000",
"origQty": "456512.40000000",
"executedQty": "456512.40000000",
"cummulativeQuoteQty": "11999.99983893",
"status": "FILLED",
"timeInForce": "GTC",
"type": "MARKET",
"side": "BUY",
"stopPrice": "0.00000000",
"icebergQty": "0.00000000",
"time": 1621677749496,
"updateTime": 1621677749496,
"isWorking": true,
"origQuoteOrderQty": "12000.00000000"
},
{
"symbol": "XRPDOWNUSDT",
"orderId": 133127954,
"orderListId": -1,
where ./bi is a zsh script to do the signature etc:
#!/usr/bin/zsh
METH=$1
API=$2
STAMP=`curl -s 'https://api.binance.com/api/v3/time' | jq '.serverTime'`
QS="$3×tamp=$STAMP"
PUB=`cat ../binance.ling.pub`
KEY=`cat ../binance.ling.key`
SIG=`echo -n $QS | openssl dgst -sha256 -hmac $KEY | cut -d ' ' -f 2`
URL="https://api.binance.com/api/v3/$API?$QS&signature=$SIG"
echo $URL
curl -X $METH -H "X-MBX-APIKEY: $PUB" $URL