// GetActiveOrders returns the list of active orders of the client in a given market.
// Retunrs an OrderList struct, where all the orders are in the Data field, in a slice of Order.
// OrderLists supports Next() and Previous() to get the corresponding pages.
// OrderLists also supports Close() and Refresh(), to close or refresh all the orders of the list.
//
// List of accepted Arguments:
//   - required: Market (string)
//   - optional: Page (int), Limit (int)
// https://developers.cryptomkt.com/#ordenes-activas
GetActiveOrders returns the list of active orders of the client in a given market.
Retunrs an OrderList struct, where all the orders are in the Data field, in a slice of Order.
OrderLists supports Next() and Previous() to get the corresponding pages.
OrderLists also supports Close() and Refresh(), to close or refresh all the orders of the list.


// GetActiveOrders returns the list of active orders of the client in a given market . // Retunrs an OrderList struct where all the orders are in the Data field in a slice of Order . // OrderLists supports Next () and Previous () to get the corresponding pages . // OrderLists also supports Close () and Refresh () to close or refresh all the orders of the list . // // List of accepted Arguments : // - required : Market ( string ) // - optional : Page ( int ) Limit ( int ) // https : // developers . cryptomkt . com / #ordenes - activas
func (client *Client) GetActiveOrders(arguments ...args.Argument) (*OrderList, error) {
	required := []string{"market"}
	req, err := makeReq(required, arguments...)
	if err != nil {
		return nil, fmt.Errorf("Error in GetActiveOrders: %s", err)
	}
	resp, err := client.get("orders/active", req)
	if err != nil {
		return nil, fmt.Errorf("error making the request: %s", err)
	}
	var oListResp OrderListResp
	json.Unmarshal(resp, &oListResp)
	if oListResp.Status == "error" {
		return nil, fmt.Errorf("error from the server side: %s", oListResp.Message)
	}
	orderList := OrderList{
		pagination: oListResp.Pagination,
		client:     client,
		Data:       oListResp.Data,
		caller:     "active_orders",
		market:     req.GetArguments()["market"],
	}
	orderList.setClientInOrders()
	return &orderList, nil
}
func ( client * Client ) GetActiveOrders ( arguments ... args . Argument ) ( * OrderList , error ) { required := [ ] string { " " } req , err := makeReq ( required , arguments ... ) if err != nil { return nil , fmt . Errorf ( " " , err ) } resp , err := client . get ( " " , req ) if err != nil { return nil , fmt . Errorf ( " " , err ) } var oListResp OrderListResp json . Unmarshal ( resp , & oListResp ) if oListResp . Status == " " { return nil , fmt . Errorf ( " " , oListResp . Message ) } orderList := OrderList { pagination : oListResp . Pagination , client : client , Data : oListResp . Data , caller : " " , market : req . GetArguments ( ) [ " " ] , } orderList . setClientInOrders ( ) return & orderList , nil }
GetActiveOrders returns the list of active orders of the client in a given market.
GetActiveOrders returns the list of active orders of the client in a given market .