Skip to content

Commit 51b8abe

Browse files
committed
fix order price
1 parent 9ca123d commit 51b8abe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/orders.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,16 @@ const main = () => {
114114
})
115115

116116
test('[ORDERS] orderTest - STOP_LOSS order', async t => {
117+
const currentPrice = await getCurrentPrice()
118+
// Stop 5% below market
119+
const stopPrice = Math.floor(currentPrice * 0.95)
120+
117121
const result = await client.orderTest({
118122
symbol: 'BTCUSDT',
119123
side: 'SELL',
120124
type: 'STOP_LOSS',
121125
quantity: 0.001,
122-
stopPrice: 25000,
126+
stopPrice,
123127
recvWindow: 60000,
124128
})
125129

0 commit comments

Comments
 (0)