Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,18 @@ For more details, check out the [Compute Units](/docs/reference/compute-units#wh
| getValidityProofV2 | 1200 | 500 |
{/* cu:auto end */}

# Solana: Trader API

[Solana Trader API](/docs/chains/solana/solana-trader-api) endpoints return swap quotes and, on request, an assembled Solana transaction. Alchemy currently routes Trader API requests through Metis.

{/* cu:auto product="solana-trader" */}
| Method | CU | Throughput CU |
| --------------------------- | --- | ------------- |
| build | 100 | 100 |
| order | 100 | 100 |
| quote-multiple-output-mints | 100 | 100 |
{/* cu:auto end */}

# Solana: Jito Bundles and Transactions

[Jito bundles](/docs/chains/solana/solana-jito-bundles-and-transactions) are groups of up to 5 signed transactions that execute sequentially and atomically in a single slot on Solana Mainnet. A tip to one of the Jito tip accounts is required for inclusion. These methods are available on paid Alchemy plans only.
Expand Down
1 change: 1 addition & 0 deletions content/api-reference/solana/solana-api-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ The following Alchemy APIs are also supported on Solana:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Solana Trader API](/docs/chains/solana/solana-trader-api) — REST endpoints for pricing and building Solana token swaps.
47 changes: 47 additions & 0 deletions content/api-reference/solana/solana-trader-api-overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Solana Trader API
description: Alchemy's REST endpoints for pricing and building Solana token swaps.
subtitle: Alchemy's REST endpoints for pricing and building Solana token swaps.
---

## Background

The Solana Trader API returns swap quotes and, on request, an assembled
transaction that a taker can sign and broadcast. Use it to price a swap ahead
of time, present a route to a user, or hand a signable transaction to a
wallet. Requests use the same Alchemy API key as your other Solana calls.

Alchemy routes Trader API requests through [Metis](https://station.jup.ag/blog/jupiter-swap-v2-metis), the routing engine that powers Jupiter's Swap V2 `/order` endpoint. If you have already integrated Jupiter's contract, the response shape here will feel familiar. Two differences worth calling out:

* Alchemy carries auth in the URL path (see [Endpoint](#endpoint)), not in an `x-api-key` header.
* `/quote-multiple-output-mints` is an Alchemy-specific endpoint that returns quotes for one input mint against up to 32 candidate output mints in a single request.

The API exposes three endpoints:

* `GET /order` returns a swap quote. Pass a `taker` to also receive an unsigned base64 transaction; omit `taker` for a quote-only response.
* `GET /build` returns raw swap instructions for composing into your own transaction (multi-leg flows, program deposits, cleanup steps).
* `POST /quote-multiple-output-mints` returns quotes for a single input against up to 32 output mints in one call.

## Endpoint

Solana Trader API is available on **Solana Mainnet** through the standard Alchemy Solana endpoint. Devnet is not supported.

```text
https://solana-mainnet.g.alchemy.com/v2/{apiKey}
```

Use your Solana Mainnet API key from the [Alchemy Dashboard](https://dashboard.alchemy.com/apps). The `docs-demo` key powers the Try It widget on the method pages below.

## Methods

| Method | Function | CU cost | Throughput CUs (how many CUs this will count for towards your CUs per second capacity) |
| --- | --- | --- | --- |
| [GET /order](/docs/chains/solana/solana-trader-api/solana-trader-api/get-swap-order) | Get a swap quote. Include a `taker` to also receive an unsigned base64 transaction; omit `taker` for quote fields only. | 100 | 100 |
| [GET /build](/docs/chains/solana/solana-trader-api/solana-trader-api/build-swap-instructions) | Return raw swap instructions for composing into your own transaction. | 100 | 100 |
| [POST /quote-multiple-output-mints](/docs/chains/solana/solana-trader-api/solana-trader-api/quote-multiple-output-mints) | Quote a single input mint against up to 32 candidate output mints in one call. | 100 | 100 |
Comment on lines +39 to +41

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the OpenAPI tag segment in method links

Update all three links to match the routes generated by the current content indexer. Because each operation's first tag is Solana Trader API Endpoints, buildOperationPath inserts solana-trader-api-endpoints between the API slug and operation ID; without an include-tags configuration that removes the tag, the listed /solana-trader-api/<operation> targets are not indexed and will return 404, while the generated pages live under /solana-trader-api/solana-trader-api-endpoints/<operation>.

Useful? React with 👍 / 👎.


## Related

* [`sendTransaction`](/docs/chains/solana/solana-api-endpoints/send-transaction) — submit the signed transaction returned by `/order` to the cluster.
* [Solana Jito Bundles and Transactions](/docs/chains/solana/solana-jito-bundles-and-transactions) — pair a signed swap with a Jito tip for atomic, low-latency inclusion.
* [Solana API Overview](/docs/solana/solana-api-overview) — the full Solana JSON-RPC surface.
7 changes: 7 additions & 0 deletions content/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ navigation:
- api: Solana Photon API
api-name: solana-photon
flattened: true
- section: Solana Trader API
path: >-
api-reference/solana/solana-trader-api-overview.mdx
contents:
- api: Solana Trader API
api-name: solana-trader
flattened: true
- section: Solana Jito Bundles and Transactions
path: >-
api-reference/solana/solana-jito-bundles-overview.mdx
Expand Down
Loading
Loading