mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
add timestamp to trades layout
This commit is contained in:
parent
be79c098d4
commit
fe25e38c93
|
@ -61,6 +61,16 @@ case "$command" in
|
|||
myOrders orders_params | jq -r '.[] | "\(.id) \(.market) \(.side) \(.price) \t \(.volume) \(.state)"'
|
||||
;;
|
||||
|
||||
cancel)
|
||||
if [[ $# < 1 ]] ; then
|
||||
echo "$0 cancel [oid]"
|
||||
exit
|
||||
fi
|
||||
|
||||
order_id=$1
|
||||
cancelOrder $order_id
|
||||
;;
|
||||
|
||||
trades)
|
||||
if [[ $# < 1 ]] ; then
|
||||
echo "$0 trades [market]"
|
||||
|
@ -70,6 +80,6 @@ case "$command" in
|
|||
market=$1
|
||||
declare -A trades_params=()
|
||||
trades_params[market]=$market
|
||||
myTrades trades_params | jq -r '.[] | "\(.id) \(.market) \(.side) \(.price) \t \(.volume) fee = \(.fee) \(.fee_currency)"'
|
||||
myTrades trades_params | jq -r '.[] | "\(.id) \(.market) \(.side) \(.price) \t \(.volume) \t fee = \( .fee | tonumber * 1000 | floor / 1000 ) \(.fee_currency)\t\( .created_at | strflocaltime("%Y-%m-%dT%H:%M:%S %Z") )"'
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -99,6 +99,13 @@ function submitOrder()
|
|||
send_auth_request "POST" "/api/v2/orders" params
|
||||
}
|
||||
|
||||
function cancelOrder()
|
||||
{
|
||||
declare -A params=()
|
||||
params[id]=$1
|
||||
send_auth_request "POST" "/api/v2/order/delete" params
|
||||
}
|
||||
|
||||
function myOrders()
|
||||
{
|
||||
local -n params=$1
|
||||
|
|
Loading…
Reference in New Issue
Block a user