mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
add add command for submit limit order and market order
This commit is contained in:
parent
837100d67e
commit
bbf2478234
|
@ -99,7 +99,14 @@ function submitOrder()
|
||||||
send_auth_request "POST" "/api/v2/orders" params
|
send_auth_request "POST" "/api/v2/orders" params
|
||||||
}
|
}
|
||||||
|
|
||||||
function tradesMy()
|
function myOrders()
|
||||||
|
{
|
||||||
|
local -n params=$1
|
||||||
|
send_auth_request "GET" "/api/v2/orders" params
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function myTrades()
|
||||||
{
|
{
|
||||||
local -n params=$1
|
local -n params=$1
|
||||||
send_auth_request "GET" "/api/v2/trades/my" params
|
send_auth_request "GET" "/api/v2/trades/my" params
|
||||||
|
@ -107,16 +114,23 @@ function tradesMy()
|
||||||
|
|
||||||
|
|
||||||
# me | jq '.accounts[] | select(.currency == "usdt")'
|
# me | jq '.accounts[] | select(.currency == "usdt")'
|
||||||
me
|
# me | jq '.accounts[] | select(.currency == "btc")'
|
||||||
|
# me | jq '.accounts[] | select(.currency == "eth")'
|
||||||
declare -A my_trade_params=()
|
# me
|
||||||
my_trade_params[market]="maxusdt"
|
|
||||||
tradesMy my_trade_params
|
|
||||||
|
|
||||||
# declare -A order_params=()
|
# declare -A order_params=()
|
||||||
# order_params[market]="ethusdt"
|
# order_params[market]="maxusdt"
|
||||||
# order_params[side]="buy"
|
# order_params[side]="buy"
|
||||||
# order_params[volume]="0.001"
|
# order_params[volume]="100"
|
||||||
# order_params[price]=""
|
# order_params[price]="0.124"
|
||||||
# order_params[ord_type]="limit"
|
# order_params[ord_type]="limit"
|
||||||
# submitOrder order_params
|
# submitOrder order_params
|
||||||
|
|
||||||
|
# declare -A my_trades_params=()
|
||||||
|
# my_trades_params[market]="ethusdt"
|
||||||
|
# myTrades my_trades_params
|
||||||
|
|
||||||
|
# declare -A my_orders_params=()
|
||||||
|
# my_orders_params[market]="ethusdt"
|
||||||
|
# myOrders my_orders_params
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user