Orderbook Endpoints
getOrder
Gets a specific order by id.
Method: query
isSigned: false
Parameters
Name | Type | Description | Optional |
---|---|---|---|
orderId | Text | The specific order you wish to get | No |
Response
Returns: ?ImmutableOrder
where ImmutableOrder is defined as:
public type ImmutableOrder = {
id : OrderID;
eventId : EventID;
user : Principal;
createdAt : Time.Time;
marketId : MarketID;
side : OrderSide;
premium : Premium;
initialContracts : Nat; // in E8S so 100_000_000 = 1 contract
currentContracts : Nat; // in E8S so 100_000_000 = 1 contract
status : OrderStatus;
};
public type OrderID = Text;
public type EventID = Nat;
public type MarketID = Nat;
public type OrderSide = {
#buy;
#sell;
};
public type Premium = Nat;
public type OrderStatus = {
#open;
#cancelled;
#filled;
};