Skip to content

Commit

Permalink
[TD-1719] Collection bids list (#2268)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdymalla authored Oct 2, 2024
1 parent 886905c commit 632d4c4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/orderbook/src/orderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import {
ListBidsParams,
ListBidsResult,
ListingResult,
ListCollectionBidsParams,
ListCollectionBidsResult,
ListListingsParams,
ListListingsResult,
ListTradesParams,
Expand Down Expand Up @@ -209,6 +211,22 @@ export class Orderbook {
};
}

/**
* List collection bids. This method is used to get a list of collection bids filtered
* by conditions specified in the params object.
* @param {ListCollectionBidsParams} listOrderParams - Filtering, ordering and page parameters.
* @return {ListCollectionBidsResult} The paged collection bids.
*/
async listCollectionBids(
listOrderParams: ListCollectionBidsParams,
): Promise<ListCollectionBidsResult> {
const apiCollectionBids = await this.apiClient.listCollectionBids(listOrderParams);
return {
page: mapFromOpenApiPage(apiCollectionBids.page),
result: apiCollectionBids.result.map(mapCollectionBidFromOpenApiOrder),
};
}

/**
* List trades. This method is used to get a list of trades filtered by conditions specified
* in the params object
Expand Down

0 comments on commit 632d4c4

Please sign in to comment.