# Quote Multiple Output Mints

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}/quote-multiple-output-mints

Returns quotes for a single input mint against up to 32 candidate output mints in one call. Useful for pricing a basket or comparing outputs without issuing N separate requests. Each quote in the response carries only `inAmount` and `outAmount`; use `/order` for the full quote surface (route plan, fees, transaction) on a single mint pair.


Reference: https://www.alchemy.com/docs/chains/solana/solana-trader-api/quote-multiple-output-mints

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup). |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo/quote-multiple-output-mints \
  --header 'Content-Type: application/json' \
  --data '{
  "inputMint": "So11111111111111111111111111111111111111112",
  "amount": "1000000000",
  "outputMints": [
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
  ],
  "swapMode": "ExactIn"
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    inputMint: 'So11111111111111111111111111111111111111112',
    amount: '1000000000',
    outputMints: [
      'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
      'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'
    ],
    swapMode: 'ExactIn'
  })
};

fetch('https://solana-mainnet.g.alchemy.com/v2/docs-demo/quote-multiple-output-mints', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://solana-mainnet.g.alchemy.com/v2/docs-demo/quote-multiple-output-mints"

payload = {
    "inputMint": "So11111111111111111111111111111111111111112",
    "amount": "1000000000",
    "outputMints": ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"],
    "swapMode": "ExactIn"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://solana-mainnet.g.alchemy.com/v2/docs-demo/quote-multiple-output-mints"

	payload := strings.NewReader("{\n  \"inputMint\": \"So11111111111111111111111111111111111111112\",\n  \"amount\": \"1000000000\",\n  \"outputMints\": [\n    \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n    \"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB\"\n  ],\n  \"swapMode\": \"ExactIn\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://solana-mainnet.g.alchemy.com/v2/docs-demo/quote-multiple-output-mints")
  .header("Content-Type", "application/json")
  .body("{\n  \"inputMint\": \"So11111111111111111111111111111111111111112\",\n  \"amount\": \"1000000000\",\n  \"outputMints\": [\n    \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n    \"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB\"\n  ],\n  \"swapMode\": \"ExactIn\"\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://solana-mainnet.g.alchemy.com/v2/docs-demo/quote-multiple-output-mints");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"inputMint\": \"So11111111111111111111111111111111111111112\",\n  \"amount\": \"1000000000\",\n  \"outputMints\": [\n    \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n    \"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB\"\n  ],\n  \"swapMode\": \"ExactIn\"\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /{apiKey}/quote-multiple-output-mints
method: POST
operation:
  summary: Quote Multiple Output Mints
  description: |
    Returns quotes for a single input mint against up to 32 candidate output mints in one call. Useful for pricing a basket or comparing outputs without issuing N separate requests. Each quote in the response carries only `inAmount` and `outAmount`; use `/order` for the full quote surface (route plan, fees, transaction) on a single mint pair.
  x-compute-units: 100
  x-rate-limit-cus: 100
  operationId: quote-multiple-output-mints
  parameters:
    - name: apiKey
      in: path
      required: true
      schema:
        type: string
        default: docs-demo
      description: For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup).
  requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          properties:
            inputMint:
              type: string
              description: Mint address of the input token.
              example: So11111111111111111111111111111111111111112
            amount:
              type: string
              description: |
                Amount to price, in base units of the input mint (or the desired output amount when `swapMode` is `ExactOut`). Must be a JSON string; a JSON number returns `400`.
              example: '1000000000'
            outputMints:
              type: array
              description: |
                Mint addresses of the candidate output tokens (1-32). Entries must be unique and none may equal `inputMint`.
              minItems: 1
              maxItems: 32
              items:
                type: string
              example:
                - EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                - Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
            swapMode:
              type: string
              enum:
                - ExactIn
                - ExactOut
              default: ExactIn
              description: |
                Swap mode applied to every quote in the batch. On `ExactOut`, `amount` is the desired output for each mint independently.
          required:
            - inputMint
            - amount
            - outputMints
  responses:
    '200':
      description: |
        An object keyed by output mint (in request order) with the priced amounts for each, plus a shared `contextSlot`.
      content:
        application/json:
          schema:
            type: object
            description: |
              Priced amounts for each requested output mint, plus a shared context slot. The response deliberately omits route plans, fees, transactions, and per-mint errors — use `/order` for the full quote surface on a single mint pair.
            properties:
              quotes:
                type: object
                description: |
                  Object keyed by output mint (in request order). Each value carries the priced amounts only.
                additionalProperties:
                  type: object
                  properties:
                    inAmount:
                      type: string
                      description: Input amount in base units of the input mint.
                    outAmount:
                      type: string
                      description: Priced output amount in base units of the output mint.
                  required:
                    - inAmount
                    - outAmount
              contextSlot:
                type: integer
                description: |
                  Oldest slot any quote in `quotes` reported. Omitted when none of the quotes carried a slot.
            required:
              - quotes
          example:
            quotes:
              EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:
                inAmount: '1000000000'
                outAmount: '234506710'
              Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB:
                inAmount: '1000000000'
                outAmount: '234481933'
            contextSlot: 300000000
```
