Skip to content

Commit

Permalink
feat: add getOrderCompetitionStatus method to orderbook api
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Jul 29, 2024
1 parent 0935033 commit 8a673b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/order-book/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
Address,
AppDataHash,
AppDataObject,
CompetitionOrderStatus,
NativePriceResponse,
Order,
OrderCancellations,
Expand Down Expand Up @@ -227,6 +228,13 @@ export class OrderBookApi {
})
}

/**
* Get the order status while open
*/
getOrderCompetitionStatus(orderUid: UID, contextOverride: PartialApiContext = {}): Promise<CompetitionOrderStatus> {
return this.fetch({ path: `/api/v1/orders/${orderUid}/status`, method: 'GET' }, contextOverride)
}

/**
* Attempt to get an order by its unique identifier, `orderUid`, from multiple environments.
*
Expand Down

0 comments on commit 8a673b3

Please sign in to comment.