Skip to content

Commit c23d9e4

Browse files
committed
fix(buy, extend): clarify -p is max rate and we use min(price,
market_price)
1 parent c114c34 commit c23d9e4

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/lib/buy/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ export function _registerBuy(program: Command) {
5151
"Duration of reservation (rounded up to the nearest hour)",
5252
parseDuration,
5353
)
54-
.option("-p, --price <price>", "Price in dollars per GPU hour")
54+
.option(
55+
"-p, --price <price>",
56+
"Sets the maximize price per gpu/hr you're willing to pay. If the market rate is lower, then you'll pay the market rate",
57+
)
5558
.option(
5659
"-s, --start <start>",
5760
"Start time (date, relative time like '+1d', or 'NOW')",
@@ -560,7 +563,8 @@ function BuyOrder(props: BuyOrderProps) {
560563
)
561564
}`}
562565
/>
563-
{order.execution_price &&
566+
{order.execution_price && Number(order.price) > 0 &&
567+
Number(order.execution_price) > 0 &&
564568
Number(order.execution_price) < Number(order.price) && (
565569
<Row
566570
headWidth={16}

src/lib/extend/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ function _registerExtend(program: Command) {
3131
"Extension duration (rounded up to the nearest hour)",
3232
parseDuration,
3333
)
34-
.option("-p, --price <price>", "Price in dollars per GPU hour")
34+
.option(
35+
"-p, --price <price>",
36+
"Sets the maximize price per gpu/hr you're willing to pay. If the market rate is lower, then you'll pay the market rate",
37+
)
3538
.option("-y, --yes", "Automatically confirm the extension")
3639
.option(
3740
"-q, --quote",

0 commit comments

Comments
 (0)