Skip to content

Instantly share code, notes, and snippets.

@Anderson-Juhasc
Created October 4, 2015 12:46
Show Gist options
  • Save Anderson-Juhasc/5792cd3d1b2af36340e0 to your computer and use it in GitHub Desktop.
Save Anderson-Juhasc/5792cd3d1b2af36340e0 to your computer and use it in GitHub Desktop.
Bitex.prototype.requestOrderList = function(opt_requestId, opt_page, opt_limit, opt_filter){
var self = this
, reqId = opt_requestId || parseInt( 1e7 * Math.random() , 10 )
, page = opt_page || 0
, limit = opt_limit || 10
, msg = {
'MsgType': 'U4',
'OrdersReqID': reqId,
'Page': page,
'PageSize': limit,
'Filter': ["has_leaves_qty eq 1"]
};
if (typeof opt_filter !== 'undefined') {
msg['Filter'] = opt_filter;
}
self.ws.send(JSON.stringify(msg));
return reqId;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment