Skip to content

Commit e1e79d9

Browse files
committedFeb 2, 2022
Update
1 parent 0a16dd6 commit e1e79d9

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed
 

‎rest/api_linear.go

+18-1
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,27 @@ func (b *ByBit) LinearGetOrders(symbol string, orderStatus string, limit int, pa
5757
}
5858

5959
// LinearGetActiveOrders Query real-time active order information. If only order_id or order_link_id are passed, a single order will be returned; otherwise, returns up to 500 unfilled orders.
60-
func (b *ByBit) LinearGetActiveOrders(symbol string, orderId string, orderLinkId string) (query string, resp []byte, result OrderArrayResponse, err error) {
60+
func (b *ByBit) LinearGetActiveOrders(symbol string) (query string, resp []byte, result OrderArrayResponse, err error) {
6161
var cResult OrderArrayResponse
6262
params := map[string]interface{}{}
6363
params["symbol"] = symbol
64+
query, resp, err = b.SignedRequest(http.MethodGet, "private/linear/order/search", params, &cResult)
65+
if err != nil {
66+
return
67+
}
68+
if cResult.RetCode != 0 {
69+
err = fmt.Errorf("%v body: [%v]", cResult.RetMsg, string(resp))
70+
return
71+
}
72+
result = cResult
73+
return
74+
}
75+
76+
// LinearGetActiveOrder Query real-time active order information. If only order_id or order_link_id are passed, a single order will be returned; otherwise, returns up to 500 unfilled orders.
77+
func (b *ByBit) LinearGetActiveOrder(symbol string, orderId string, orderLinkId string) (query string, resp []byte, result OrderResponse, err error) {
78+
var cResult OrderResponse
79+
params := map[string]interface{}{}
80+
params["symbol"] = symbol
6481
if orderId != "" {
6582
params["order_id"] = orderId
6683
}

0 commit comments

Comments
 (0)
Please sign in to comment.