Skip to content

Commit

Permalink
feat(auth1): add cancelOrder method
Browse files Browse the repository at this point in the history
  • Loading branch information
vansergen committed Nov 29, 2019
1 parent 417c480 commit eb594cc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/auth1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export type OrderParams = Symb & {
price: string;
side: "buy" | "sell";
type: OrderType;
exchange: "bitfinex";
exchange?: "bitfinex";
is_hidden?: boolean;
is_postonly?: boolean;
use_all_available?: 0 | 1;
Expand Down Expand Up @@ -308,6 +308,13 @@ export class AuthenticatedClient1 extends PublicClient1 {
return this.post({ body: { orders }, uri: "/v1/order/new/multi" });
}

/**
* Cancel an order.
*/
cancelOrder(body: { order_id: number }): Promise<OrderResponse> {
return this.post({ body, uri: "/v1/order/cancel" });
}

get nonce(): string {
return Date.now().toString();
}
Expand Down

0 comments on commit eb594cc

Please sign in to comment.