Skip to main content

/markets REST API Endpoint

Add new markets to the Jupiter markets cache used by Metis - Jupiter V6 Swap API. This route can be leveraged to add new tokens/markets that is not in the current Jupiter markets cache. This is a custom route only available to Metis - Jupiter V6 Swap API.

Updated on
Sep 20, 2024

/markets REST API Endpoint

Please note that this method is only available for Paid subscribers of Metis - Jupiter V6 Swap API.
Solana Web3.js 2.0 includes the ability to customize RPC methods and transports, allowing you to seamlessly integrate QuickNode Marketplace add-ons into your applications. For more information on how to use QuickNode Marketplace add-ons with Solana Web3.js 2.0, check out these guides: How to Use QuickNode Add-ons using Solana Web3.js 2.0 (Part 1) and How to Use QuickNode Add-ons using Solana Web3.js 2.0 (Part 2)

Important: Always use the parameter useQNMarketCache=true when working with new markets.

To use this method an example pool address can be found by using the /new-pools endpoint, or by going to Gecko Terminal → new pools (solana) → pool address.

When you add new markets that aren't available in the standard Jupiter market cache, you'll need to pass the useQNMarketCache=true parameter to the URL you're making subsequent /quote, /swap, or /swap-instructions requests with.

The steps below are an example for when adding new markets, receiving a quote, and swapping the newly added market.

  • Use the POST /markets API endpoint to add a new market.
  • Use the GET /quote API endpoint and include useQNMarketCache=true parameter. i.e /quote?useQNMarketCache=true
  • Use either POST /swap or POST /swap-instructions and include useQNMarketCache=true parameter when fetching a swap for the quote you just requested. i.e /swap?useQNMarketCache=true

Body Parameters

poolAddress
string
REQUIRED
The poolAddress for a given token pair

Returns

data
string
The encoded data related to the market.
executable
boolean
A boolean field indicating whether the program is executable or not
lamports
integer
The number of lamports allocated to the account
owner
string
The public key of the account owner
rentEpoch
integer
The epoch at which the rent for this account was last updated
pubkey
string
The public key of the account
params
object
The params object which contains the following fields:
serumBids
string
Public key of the account holding serum bids for this market
serumAsks
string
Public key of the account holding serum asks for this market
serumEventQueue
string
Public key of the account representing the serum event queue for this market
serumCoinVaultAccount
string
Public key of the account representing the serum coin vault for this market
serumPcVaultAccount
string
Public key of the account representing the serum PC (Programmable Coind) vault for this market
serumVaultSigner
string
Public key of the account representing the serum vault signer for this market
status
string
Status of the response
Request
1
curl --location 'https://docs-demo.solana-mainnet.quiknode.pro/markets' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"poolAddress": "5y2QYKY8gQCcmG6jy4fc7wFg8L5SW7bkyvMH3jUTqBdy"
5
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free