diff --git a/jupiter/client.gen.go b/jupiter/client.gen.go index e93309f..2f77437 100644 --- a/jupiter/client.gen.go +++ b/jupiter/client.gen.go @@ -237,6 +237,9 @@ type OutputMintParameter = string // PlatformFeeBpsParameter defines model for PlatformFeeBpsParameter. type PlatformFeeBpsParameter = int +// PreferLiquidDexes defines model for PreferLiquidDexes. +type PreferLiquidDexes = bool + // RestrictIntermediateTokensParameter defines model for RestrictIntermediateTokensParameter. type RestrictIntermediateTokensParameter = bool @@ -304,6 +307,9 @@ type GetQuoteParams struct { // MinimizeSlippage Default is false. Miminize slippage attempts to find routes with lower slippage. MinimizeSlippage *MinimizeSlippage `form:"minimizeSlippage,omitempty" json:"minimizeSlippage,omitempty"` + + // PreferLiquidDexes Default is false. Enabling it would only consider markets with high liquidity to reduce slippage. + PreferLiquidDexes *PreferLiquidDexes `form:"preferLiquidDexes,omitempty" json:"preferLiquidDexes,omitempty"` } // GetQuoteParamsSwapMode defines parameters for GetQuote. @@ -989,6 +995,22 @@ func NewGetQuoteRequest(server string, params *GetQuoteParams) (*http.Request, e } + if params.PreferLiquidDexes != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "preferLiquidDexes", runtime.ParamLocationQuery, *params.PreferLiquidDexes); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } diff --git a/jupiter/openapi/jupiter-swagger.yaml b/jupiter/openapi/jupiter-swagger.yaml index e98b8ad..83f4345 100644 --- a/jupiter/openapi/jupiter-swagger.yaml +++ b/jupiter/openapi/jupiter-swagger.yaml @@ -41,6 +41,7 @@ paths: - $ref: '#/components/parameters/PlatformFeeBpsParameter' - $ref: '#/components/parameters/MaxAccountsParameter' - $ref: '#/components/parameters/MinimizeSlippage' + - $ref: '#/components/parameters/PreferLiquidDexes' responses: '200': description: Successful response @@ -499,3 +500,9 @@ components: in: query schema: type: boolean + PreferLiquidDexes: + name: preferLiquidDexes + description: Default is false. Enabling it would only consider markets with high liquidity to reduce slippage. + in: query + schema: + type: boolean