diff --git a/jupiter/client.gen.go b/jupiter/client.gen.go index 743429b..8753a94 100644 --- a/jupiter/client.gen.go +++ b/jupiter/client.gen.go @@ -22,6 +22,16 @@ const ( SwapModeExactOut SwapMode = "ExactOut" ) +// Defines values for SwapRequestComputeUnitPriceMicroLamports1. +const ( + SwapRequestComputeUnitPriceMicroLamports1Auto SwapRequestComputeUnitPriceMicroLamports1 = "auto" +) + +// Defines values for SwapRequestPrioritizationFeeLamports1. +const ( + SwapRequestPrioritizationFeeLamports1Auto SwapRequestPrioritizationFeeLamports1 = "auto" +) + // Defines values for SwapModeParameter. const ( SwapModeParameterExactIn SwapModeParameter = "ExactIn" @@ -99,7 +109,7 @@ type SwapInfo struct { // SwapInstructionsResponse defines model for SwapInstructionsResponse. type SwapInstructionsResponse struct { - // AddressLookupTableAddresses The lookup table addresses to compress the swaps + // AddressLookupTableAddresses The lookup table addresses that you can use if you are using versioned transaction. AddressLookupTableAddresses []string `json:"addressLookupTableAddresses"` CleanupInstruction *Instruction `json:"cleanupInstruction,omitempty"` @@ -121,7 +131,7 @@ type SwapRequest struct { AsLegacyTransaction *bool `json:"asLegacyTransaction,omitempty"` // ComputeUnitPriceMicroLamports The compute unit price to prioritize the transaction, the additional fee will be `computeUnitLimit (1400000) * computeUnitPriceMicroLamports`. If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL. - ComputeUnitPriceMicroLamports *string `json:"computeUnitPriceMicroLamports,omitempty"` + ComputeUnitPriceMicroLamports *SwapRequest_ComputeUnitPriceMicroLamports `json:"computeUnitPriceMicroLamports,omitempty"` // DestinationTokenAccount Public key of the token account that will be used to receive the token out of the swap. If not provided, the user's ATA will be used. If provided, we assume that the token account is already initialized. DestinationTokenAccount *string `json:"destinationTokenAccount,omitempty"` @@ -129,15 +139,12 @@ type SwapRequest struct { // DynamicComputeUnitLimit When enabled, it will do a swap simulation to get the compute unit used and set it in ComputeBudget's compute unit limit. This will increase latency slightly since there will be one extra RPC call to simulate this. Default is `false`. DynamicComputeUnitLimit *bool `json:"dynamicComputeUnitLimit,omitempty"` - // FeeAccount Fee token account for the output token, it is derived using the seeds = ["referral_ata", referral_account, mint] and the `REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3` referral contract (only pass in if you set a `platformFeeBps` in `/quote` and make sure that the feeAccount has been created). + // FeeAccount Fee token account, same as the output token for ExactIn and as the input token for ExactOut, it is derived using the seeds = ["referral_ata", referral_account, mint] and the `REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3` referral contract (only pass in if you set a feeBps and make sure that the feeAccount has been created). FeeAccount *string `json:"feeAccount,omitempty"` // PrioritizationFeeLamports Prioritization fee lamports paid for the transaction in addition to the signatures fee. Mutually exclusive with compute_unit_price_micro_lamports. If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL. - PrioritizationFeeLamports *string `json:"prioritizationFeeLamports,omitempty"` - QuoteResponse QuoteResponse `json:"quoteResponse"` - - // RestrictIntermediateTokens Restrict intermediate tokens to a top token set that has stable liquidity. This will help to ease potential high slippage error rate when swapping with minimal impact on pricing. - RestrictIntermediateTokens *bool `json:"restrictIntermediateTokens,omitempty"` + PrioritizationFeeLamports *SwapRequest_PrioritizationFeeLamports `json:"prioritizationFeeLamports,omitempty"` + QuoteResponse QuoteResponse `json:"quoteResponse"` // SkipUserAccountsRpcCalls When enabled, it will not do any rpc calls check on user's accounts. Enable it only when you already setup all the accounts needed for the trasaction, like wrapping or unwrapping sol, destination account is already created. SkipUserAccountsRpcCalls *bool `json:"skipUserAccountsRpcCalls,omitempty"` @@ -155,6 +162,28 @@ type SwapRequest struct { WrapAndUnwrapSol *bool `json:"wrapAndUnwrapSol,omitempty"` } +// SwapRequestComputeUnitPriceMicroLamports0 defines model for . +type SwapRequestComputeUnitPriceMicroLamports0 = int + +// SwapRequestComputeUnitPriceMicroLamports1 defines model for SwapRequest.ComputeUnitPriceMicroLamports.1. +type SwapRequestComputeUnitPriceMicroLamports1 string + +// SwapRequest_ComputeUnitPriceMicroLamports The compute unit price to prioritize the transaction, the additional fee will be `computeUnitLimit (1400000) * computeUnitPriceMicroLamports`. If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL. +type SwapRequest_ComputeUnitPriceMicroLamports struct { + union json.RawMessage +} + +// SwapRequestPrioritizationFeeLamports0 defines model for . +type SwapRequestPrioritizationFeeLamports0 = int + +// SwapRequestPrioritizationFeeLamports1 defines model for SwapRequest.PrioritizationFeeLamports.1. +type SwapRequestPrioritizationFeeLamports1 string + +// SwapRequest_PrioritizationFeeLamports Prioritization fee lamports paid for the transaction in addition to the signatures fee. Mutually exclusive with compute_unit_price_micro_lamports. If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL. +type SwapRequest_PrioritizationFeeLamports struct { + union json.RawMessage +} + // SwapResponse defines model for SwapResponse. type SwapResponse struct { LastValidBlockHeight float32 `json:"lastValidBlockHeight"` @@ -189,6 +218,9 @@ type OutputMintParameter = string // PlatformFeeBpsParameter defines model for PlatformFeeBpsParameter. type PlatformFeeBpsParameter = int +// RestrictIntermediateTokensParameter defines model for RestrictIntermediateTokensParameter. +type RestrictIntermediateTokensParameter = bool + // SlippageParameter defines model for SlippageParameter. type SlippageParameter = int @@ -224,6 +256,9 @@ type GetQuoteParams struct { // ExcludeDexes Default is that all DEXes are included. You can pass in the DEXes that you want to exclude and separate them by `,`. You can check out the full list [here](https://quote-api.jup.ag/v6/program-id-to-label). ExcludeDexes *ExcludeDexesParameter `form:"excludeDexes,omitempty" json:"excludeDexes,omitempty"` + // RestrictIntermediateTokens Restrict intermediate tokens to a top token set that has stable liquidity. This will help to ease potential high slippage error rate when swapping with minimal impact on pricing. + RestrictIntermediateTokens *RestrictIntermediateTokensParameter `form:"restrictIntermediateTokens,omitempty" json:"restrictIntermediateTokens,omitempty"` + // OnlyDirectRoutes Default is false. Direct Routes limits Jupiter routing to single hop routes only. OnlyDirectRoutes *OnlyDirectRoutesParameter `form:"onlyDirectRoutes,omitempty" json:"onlyDirectRoutes,omitempty"` @@ -246,6 +281,130 @@ type PostSwapJSONRequestBody = SwapRequest // PostSwapInstructionsJSONRequestBody defines body for PostSwapInstructions for application/json ContentType. type PostSwapInstructionsJSONRequestBody = SwapRequest +// AsSwapRequestComputeUnitPriceMicroLamports0 returns the union data inside the SwapRequest_ComputeUnitPriceMicroLamports as a SwapRequestComputeUnitPriceMicroLamports0 +func (t SwapRequest_ComputeUnitPriceMicroLamports) AsSwapRequestComputeUnitPriceMicroLamports0() (SwapRequestComputeUnitPriceMicroLamports0, error) { + var body SwapRequestComputeUnitPriceMicroLamports0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromSwapRequestComputeUnitPriceMicroLamports0 overwrites any union data inside the SwapRequest_ComputeUnitPriceMicroLamports as the provided SwapRequestComputeUnitPriceMicroLamports0 +func (t *SwapRequest_ComputeUnitPriceMicroLamports) FromSwapRequestComputeUnitPriceMicroLamports0(v SwapRequestComputeUnitPriceMicroLamports0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeSwapRequestComputeUnitPriceMicroLamports0 performs a merge with any union data inside the SwapRequest_ComputeUnitPriceMicroLamports, using the provided SwapRequestComputeUnitPriceMicroLamports0 +func (t *SwapRequest_ComputeUnitPriceMicroLamports) MergeSwapRequestComputeUnitPriceMicroLamports0(v SwapRequestComputeUnitPriceMicroLamports0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +// AsSwapRequestComputeUnitPriceMicroLamports1 returns the union data inside the SwapRequest_ComputeUnitPriceMicroLamports as a SwapRequestComputeUnitPriceMicroLamports1 +func (t SwapRequest_ComputeUnitPriceMicroLamports) AsSwapRequestComputeUnitPriceMicroLamports1() (SwapRequestComputeUnitPriceMicroLamports1, error) { + var body SwapRequestComputeUnitPriceMicroLamports1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromSwapRequestComputeUnitPriceMicroLamports1 overwrites any union data inside the SwapRequest_ComputeUnitPriceMicroLamports as the provided SwapRequestComputeUnitPriceMicroLamports1 +func (t *SwapRequest_ComputeUnitPriceMicroLamports) FromSwapRequestComputeUnitPriceMicroLamports1(v SwapRequestComputeUnitPriceMicroLamports1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeSwapRequestComputeUnitPriceMicroLamports1 performs a merge with any union data inside the SwapRequest_ComputeUnitPriceMicroLamports, using the provided SwapRequestComputeUnitPriceMicroLamports1 +func (t *SwapRequest_ComputeUnitPriceMicroLamports) MergeSwapRequestComputeUnitPriceMicroLamports1(v SwapRequestComputeUnitPriceMicroLamports1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +func (t SwapRequest_ComputeUnitPriceMicroLamports) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *SwapRequest_ComputeUnitPriceMicroLamports) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsSwapRequestPrioritizationFeeLamports0 returns the union data inside the SwapRequest_PrioritizationFeeLamports as a SwapRequestPrioritizationFeeLamports0 +func (t SwapRequest_PrioritizationFeeLamports) AsSwapRequestPrioritizationFeeLamports0() (SwapRequestPrioritizationFeeLamports0, error) { + var body SwapRequestPrioritizationFeeLamports0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromSwapRequestPrioritizationFeeLamports0 overwrites any union data inside the SwapRequest_PrioritizationFeeLamports as the provided SwapRequestPrioritizationFeeLamports0 +func (t *SwapRequest_PrioritizationFeeLamports) FromSwapRequestPrioritizationFeeLamports0(v SwapRequestPrioritizationFeeLamports0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeSwapRequestPrioritizationFeeLamports0 performs a merge with any union data inside the SwapRequest_PrioritizationFeeLamports, using the provided SwapRequestPrioritizationFeeLamports0 +func (t *SwapRequest_PrioritizationFeeLamports) MergeSwapRequestPrioritizationFeeLamports0(v SwapRequestPrioritizationFeeLamports0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +// AsSwapRequestPrioritizationFeeLamports1 returns the union data inside the SwapRequest_PrioritizationFeeLamports as a SwapRequestPrioritizationFeeLamports1 +func (t SwapRequest_PrioritizationFeeLamports) AsSwapRequestPrioritizationFeeLamports1() (SwapRequestPrioritizationFeeLamports1, error) { + var body SwapRequestPrioritizationFeeLamports1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromSwapRequestPrioritizationFeeLamports1 overwrites any union data inside the SwapRequest_PrioritizationFeeLamports as the provided SwapRequestPrioritizationFeeLamports1 +func (t *SwapRequest_PrioritizationFeeLamports) FromSwapRequestPrioritizationFeeLamports1(v SwapRequestPrioritizationFeeLamports1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeSwapRequestPrioritizationFeeLamports1 performs a merge with any union data inside the SwapRequest_PrioritizationFeeLamports, using the provided SwapRequestPrioritizationFeeLamports1 +func (t *SwapRequest_PrioritizationFeeLamports) MergeSwapRequestPrioritizationFeeLamports1(v SwapRequestPrioritizationFeeLamports1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +func (t SwapRequest_PrioritizationFeeLamports) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *SwapRequest_PrioritizationFeeLamports) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + // RequestEditorFn is the function signature for the RequestEditor callback function type RequestEditorFn func(ctx context.Context, req *http.Request) error @@ -337,6 +496,9 @@ type ClientInterface interface { PostSwapInstructionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostSwapInstructions(ctx context.Context, body PostSwapInstructionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTokens request + GetTokens(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) GetIndexedRouteMap(ctx context.Context, params *GetIndexedRouteMapParams, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -423,6 +585,18 @@ func (c *Client) PostSwapInstructions(ctx context.Context, body PostSwapInstruct return c.Client.Do(req) } +func (c *Client) GetTokens(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTokensRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // NewGetIndexedRouteMapRequest generates requests for GetIndexedRouteMap func NewGetIndexedRouteMapRequest(server string, params *GetIndexedRouteMapParams) (*http.Request, error) { var err error @@ -621,6 +795,22 @@ func NewGetQuoteRequest(server string, params *GetQuoteParams) (*http.Request, e } + if params.RestrictIntermediateTokens != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "restrictIntermediateTokens", runtime.ParamLocationQuery, *params.RestrictIntermediateTokens); 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) + } + } + } + + } + if params.OnlyDirectRoutes != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "onlyDirectRoutes", runtime.ParamLocationQuery, *params.OnlyDirectRoutes); err != nil { @@ -776,6 +966,33 @@ func NewPostSwapInstructionsRequestWithBody(server string, contentType string, b return req, nil } +// NewGetTokensRequest generates requests for GetTokens +func NewGetTokensRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/tokens") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { for _, r := range c.RequestEditors { if err := r(ctx, req); err != nil { @@ -837,6 +1054,9 @@ type ClientWithResponsesInterface interface { PostSwapInstructionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSwapInstructionsResponse, error) PostSwapInstructionsWithResponse(ctx context.Context, body PostSwapInstructionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSwapInstructionsResponse, error) + + // GetTokensWithResponse request + GetTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTokensResponse, error) } type GetIndexedRouteMapResponse struct { @@ -949,6 +1169,28 @@ func (r PostSwapInstructionsResponse) StatusCode() int { return 0 } +type GetTokensResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]string +} + +// Status returns HTTPResponse.Status +func (r GetTokensResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTokensResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + // GetIndexedRouteMapWithResponse request returning *GetIndexedRouteMapResponse func (c *ClientWithResponses) GetIndexedRouteMapWithResponse(ctx context.Context, params *GetIndexedRouteMapParams, reqEditors ...RequestEditorFn) (*GetIndexedRouteMapResponse, error) { rsp, err := c.GetIndexedRouteMap(ctx, params, reqEditors...) @@ -1010,6 +1252,15 @@ func (c *ClientWithResponses) PostSwapInstructionsWithResponse(ctx context.Conte return ParsePostSwapInstructionsResponse(rsp) } +// GetTokensWithResponse request returning *GetTokensResponse +func (c *ClientWithResponses) GetTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTokensResponse, error) { + rsp, err := c.GetTokens(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTokensResponse(rsp) +} + // ParseGetIndexedRouteMapResponse parses an HTTP response from a GetIndexedRouteMapWithResponse call func ParseGetIndexedRouteMapResponse(rsp *http.Response) (*GetIndexedRouteMapResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -1139,3 +1390,29 @@ func ParsePostSwapInstructionsResponse(rsp *http.Response) (*PostSwapInstruction return response, nil } + +// ParseGetTokensResponse parses an HTTP response from a GetTokensWithResponse call +func ParseGetTokensResponse(rsp *http.Response) (*GetTokensResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTokensResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []string + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} diff --git a/jupiter/openapi/jupiter-swagger.yaml b/jupiter/openapi/jupiter-swagger.yaml index 5fc6dbf..bd2d8e8 100644 --- a/jupiter/openapi/jupiter-swagger.yaml +++ b/jupiter/openapi/jupiter-swagger.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.3 +openapi: '3.0.2' info: title: Jupiter API v6 version: 6.0.0 @@ -6,7 +6,7 @@ info: The core of [jup.ag](https://jup.ag). Easily get a quote and swap through Jupiter API. ### Rate Limit - The rate limit is 150 requests / 60 seconds. If you need a higher rate limit, feel free to contact us on [#developer-support](https://discord.com/channels/897540204506775583/910250162402779146) on Discord. + We update our rate limit from time to time depending on the load of our servers. We recommend running your own instance of the API if you want to have high rate limit, here to learn how to run the [self-hosted API](https://station.jup.ag/docs/apis/self-hosted). ### API Wrapper - Typescript [@jup-ag/api](https://github.com/jup-ag/jupiter-quote-api-node) @@ -31,6 +31,7 @@ paths: - $ref: '#/components/parameters/SwapModeParameter' - $ref: '#/components/parameters/DexesParameter' - $ref: '#/components/parameters/ExcludeDexesParameter' + - $ref: '#/components/parameters/RestrictIntermediateTokensParameter' - $ref: '#/components/parameters/OnlyDirectRoutesParameter' - $ref: '#/components/parameters/AsLegacyTransactionParameter' - $ref: '#/components/parameters/PlatformFeeBpsParameter' @@ -45,7 +46,7 @@ paths: /swap: post: summary: POST /swap - description: Returns a transaction for the QuoteResponse of `/quote`. + description: Returns a transaction that you can use from the quote you get from `/quote`. requestBody: required: true content: @@ -62,7 +63,7 @@ paths: /swap-instructions: post: summary: POST /swap-instructions - description: Returns instructions for the QuoteResponse of `/quote`. + description: Returns instructions that you can use from the quote you get from `/quote`. requestBody: required: true content: @@ -79,7 +80,7 @@ paths: /program-id-to-label: get: summary: GET /program-id-to-label - description: Returns a mapping from program id to pogram label. This is used to help map errors from transaction by identifying the erring program id. The labels can be used in the `excludeDexes` or `dexes` parameter when calling `/quote`. + description: Returns a hash, which key is the program id and value is the label. This is used to help map error from transaction by identifying the fault program id. With that, we can use the `excludeDexes` or `dexes` parameter. responses: '200': description: Default response @@ -92,7 +93,8 @@ paths: /indexed-route-map: get: summary: GET /indexed-route-map - description: Returns a mapping of token mint to valid output token mints, token mints are indexed to reduce the file size + description: DEPRECATED, please use /tokens for tradable mints. Returns a hash map, input mint as key and an array of valid output mint as values, token mints are indexed to reduce the file size + deprecated: true parameters: - $ref: '#/components/parameters/OnlyDirectRoutesParameter' responses: @@ -102,6 +104,23 @@ paths: application/json: schema: $ref: '#/components/schemas/IndexedRouteMapResponse' + /tokens: + get: + summary: GET /tokens + description: Returns a list of all the tradable mints + responses: + '200': + description: Default response + content: + application/json: + schema: + type: array + items: + type: string + example: + - 'So11111111111111111111111111111111111111112' + - 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' + - 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' components: schemas: @@ -250,21 +269,24 @@ components: type: boolean default: true feeAccount: - description: Fee token account for the output token, it is derived using the seeds = ["referral_ata", referral_account, mint] and the `REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3` referral contract (only pass in if you set a `platformFeeBps` in `/quote` and make sure that the feeAccount has been created). + description: Fee token account, same as the output token for ExactIn and as the input token for ExactOut, it is derived using the seeds = ["referral_ata", referral_account, mint] and the `REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3` referral contract (only pass in if you set a feeBps and make sure that the feeAccount has been created). type: string computeUnitPriceMicroLamports: description: The compute unit price to prioritize the transaction, the additional fee will be `computeUnitLimit (1400000) * computeUnitPriceMicroLamports`. If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL. - type: string + anyOf: + - type: integer + - type: string + enum: ['auto'] prioritizationFeeLamports: description: Prioritization fee lamports paid for the transaction in addition to the signatures fee. Mutually exclusive with compute_unit_price_micro_lamports. If `auto` is used, Jupiter will automatically set a priority fee and it will be capped at 5,000,000 lamports / 0.005 SOL. - type: string + anyOf: + - type: integer + - type: string + enum: ['auto'] asLegacyTransaction: description: Default is false. Request a legacy transaction rather than the default versioned transaction, needs to be paired with a quote using asLegacyTransaction otherwise the transaction might be too large. type: boolean default: false - restrictIntermediateTokens: - description: Restrict intermediate tokens to a top token set that has stable liquidity. This will help to ease potential high slippage error rate when swapping with minimal impact on pricing. - type: boolean useTokenLedger: description: Default is false. This is useful when the instruction before the swap has a transfer that increases the input token amount. Then, the swap will just use the difference between the token ledger token amount and post token amount. type: boolean @@ -317,7 +339,7 @@ components: description: Unwrap the SOL if `wrapAndUnwrapSol = true`. $ref: '#/components/schemas/Instruction' addressLookupTableAddresses: - description: The lookup table addresses to compress the swaps + description: The lookup table addresses that you can use if you are using versioned transaction. type: array items: type: string @@ -406,6 +428,12 @@ components: type: array items: type: string + RestrictIntermediateTokensParameter: + name: restrictIntermediateTokens + description: Restrict intermediate tokens to a top token set that has stable liquidity. This will help to ease potential high slippage error rate when swapping with minimal impact on pricing. + in: query + schema: + type: boolean OnlyDirectRoutesParameter: name: onlyDirectRoutes description: Default is false. Direct Routes limits Jupiter routing to single hop routes only. @@ -429,4 +457,4 @@ components: description: If you want to charge the user a fee, you can specify the fee in BPS. Fee % is taken out of the output token. in: query schema: - type: integer \ No newline at end of file + type: integer