Skip to content

Commit eebc072

Browse files
author
T. Ismael Verdugo
committed
feat: adds stop price arg to replace order methods
1 parent 0c96e3e commit eebc072

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ export class Client {
825825
* @param {string} params.newClientOrderId clientOrderId for the new order.
826826
* @param {string} params.quantity Order quantity.
827827
* @param {string} [params.price] Required if order type is limit, stopLimit, or takeProfitLimit. Order price.
828+
* @param {string} [params.stopPrice] Required if order type is stopLimit, stopMarket, takeProfitLimit, or takeProfitMarket. Order price
828829
* @param {boolean} [params.strictValidate] Optional. Price and quantity will be checked for incrementation within the symbol’s tick size and quantity step. See the symbol's tickSize and quantityIncrement.
829830
*
830831
* @returns the new spot order
@@ -835,6 +836,7 @@ export class Client {
835836
newClientOrderId: string;
836837
quantity: string;
837838
price?: string;
839+
stop_price?: string;
838840
strictValidate?: boolean;
839841
}
840842
): Promise<Order> {

lib/websocket/tradingClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export class TradingClient extends AuthClient {
177177
* @param {string} params.newClientOrderId the new client order id for the modified order. must be unique within the trading day
178178
* @param {string} params.quantity new order quantity
179179
* @param {string} params.price new order price
180+
* @param {string} [params.stopPrice] Required if order type is stopLimit, stopMarket, takeProfitLimit, or takeProfitMarket. Order price
180181
* @param {boolean} [params.strictValidate] price and quantity will be checked for the incrementation with tick size and quantity step. See symbol's tickSize and quantityIncrement
181182
* @return A promise that resolves with a report of the modified order
182183
*/
@@ -185,6 +186,7 @@ export class TradingClient extends AuthClient {
185186
newClientOrderId: string;
186187
quantity: string;
187188
price: string;
189+
stop_price?: string;
188190
strictValidate?: Boolean;
189191
}): Promise<Report> {
190192
const report = await this.makeRequest<Report>({

0 commit comments

Comments
 (0)