Skip to content

Commit

Permalink
Add getTransactions orderBy
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomer Vilensky committed Feb 17, 2020
1 parent c3303a8 commit 26c1d13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/fireblocks-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export class FireblocksSDK {
* @param filter.after Only gets transactions created after a given timestamp (in milliseconds)
* @param filter.status Only gets transactions with the spcified status
* @param filter.limit Limit the amount of returned results. If not specified, a limit of 200 results will be used
* @param filter.orderBy Determines the order of the results
*/
public async getTransactions(filter: TransactionFilter): Promise<TransactionResponse[]> {
return await this.apiClient.issueGetRequest(`/v1/transactions?${queryString.stringify(filter)}`);
Expand Down
6 changes: 6 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,15 @@ export interface TransactionFilter {
before?: number;
after?: number;
status?: TransactionStatus;
orderBy?: TransactionOrder;
limit?: number;
}

export enum TransactionOrder {
CREATED_AT = "createdAt",
LAST_UPDATED = "lastUpdated"
}

export enum TransactionStatus {
SUBMITTED = "SUBMITTED",
PENDING_SIGNATURE= "PENDING_SIGNATURE",
Expand Down

0 comments on commit 26c1d13

Please sign in to comment.