Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| const search = constructSearchString<{ degenMode?: boolean }>({ | ||
| degenMode, | ||
| }); | ||
| const fetchURL = `${postOrderUrl}/${search}` as const; |
There was a problem hiding this comment.
Trailing slash changes POST URL for all orders
High Severity
The URL template `${postOrderUrl}/${search}` introduces a spurious / between the path and the query string. When degenMode is not provided (the common case), constructSearchString returns "", so the URL becomes …/delta/orders/ instead of the previous …/delta/orders. When degenMode is provided, it becomes …/delta/orders/?degenMode=true instead of …/delta/orders?degenMode=true. This is a regression for every postDeltaOrder call. The existing test expects the URL without a trailing slash. The sibling getDeltaOrders uses ${baseUrl}${search} (no extra /) for the same endpoint.
There was a problem hiding this comment.
Sometimes we do /search, sometimes without /. We should decide on one way
| const search = constructSearchString<{ degenMode?: boolean }>({ | ||
| degenMode, | ||
| }); | ||
| const fetchURL = `${postOrderUrl}/${search}` as const; |
There was a problem hiding this comment.
Sometimes we do /search, sometimes without /. We should decide on one way
| /** @description SELL or BUY, default is SELL */ | ||
| side?: SwapSideUnion; | ||
| /** @description In %. It's a way to bypass the API price impact check (default = 15%) */ | ||
| maxImpact?: number; |
There was a problem hiding this comment.
Could you also add maxUSDImpact. It's present in other price endpoints


Accepts
degenModeparam for:Note
Medium Risk
Adds new query options that change how requests are formed (including URL construction for delta pricing and delta order posting), which could break API calls or alter routing if the query string formatting is incorrect.
Overview
Adds support for a new
degenModeflag across the SDK so it can be passed through to/transactions(build tx options),/prices(rate queries),/delta/prices(delta price queries), and/delta/orders(order submission/posting).Also extends delta pricing inputs with
maxImpact/maxUSDImpact, adjusts delta price URL construction to append the query string without an extra path separator, and bumps the package version to9.3.5-dev.1.Written by Cursor Bugbot for commit f732de0. This will update automatically on new commits. Configure here.