Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async getOrderbookAsync(
request: OrderbookRequest,
requestOpts?: RequestOpts & PagedRequestOpts,
): Promise {
assert.doesConformToSchema('request', request, schemas.orderBookRequestSchema);
if (requestOpts !== undefined) {
assert.doesConformToSchema('requestOpts', requestOpts, schemas.pagedRequestOptsSchema);
assert.doesConformToSchema('requestOpts', requestOpts, schemas.requestOptsSchema);
}
const httpRequestOpts = {
params: _.defaults({}, request, requestOpts),
};
const responseJson = await this._requestAsync('/orderbook', HttpRequestType.Get, httpRequestOpts);
const orderbook = relayerResponseJsonParsers.parseOrderbookResponseJson(responseJson);
return orderbook;
}
/**