Do you want a straightforward strategy to fetch information from Raydium? If that’s the case, you’ll need to discover Moralis’ Raydium Solana API, which provides you the instruments it is advisable get all the things from decoded swap information to token costs with minimal code. That is the last word software for anybody seeking to combine Raydium token information into Web3 purposes!
Are you keen to leap straight into the code? Take a look at the script under, exhibiting you the way straightforward it’s to fetch open, excessive, low, shut, and quantity (OHLCV) information of any token on Raydium and different DEXs:
import fetch from “node-fetch”;
const choices = {
technique: “GET”,
headers: {
settle for: “utility/json”,
“X-API-Key”: “YOUR_API_KEY”,
},
};
fetch(
“https://solana-gateway.moralis.io/token/mainnet/pairs/FdjBRWXzieV1Qtn8FLDWWk2HK1HSQWYduo8y4F1e8GWu/ohlcv?timeframe=1h&forex=usd&fromDate=2024-11-25&toDate=2024-11-26&restrict=10”,
choices
)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
Earlier than working the script above, add your Moralis API key and configure the parameters by, for instance, including a pair deal with from Raydium. Then, while you execute the code, you’ll obtain the token’s OHLCV information for the desired time interval. Right here’s what it’d appear like:
{
cursor: ‘//…’,
web page: 1,
pairAddress: ‘FdjBRWXzieV1Qtn8FLDWWk2HK1HSQWYduo8y4F1e8GWu’,
tokenAddress: ‘9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump’,
timeframe: ‘1h’,
forex: ‘usd’,
consequence: [
{
timestamp: ‘2024-11-26T00:00:00.000Z’,
open: 0.305299,
high: 0.327636255,
low: 0.304529734,
close: 0.326479103,
volume: 37241.772831329,
trades: 34
},
//…
]
}
That’s it; fetching OHLCV information from Raydium doesn’t should be more difficult than this when working with Moralis for Builders. If you happen to instantly need to begin utilizing the API, click on the button under and join a free account right this moment!
Overview
Raydium is a number one DEX on Solana, persistently dealing with tons of of hundreds of thousands in every day buying and selling quantity. As such, when you’re constructing on Solana – whether or not it’s a portfolio tracker, DEX tracker, analytics software, or different related platforms – chances are high your customers care about the place the motion is. That’s why having a straightforward strategy to fetch information from Raydium isn’t simply helpful – it’s important.
However what’s the easiest way to fetch token information from Raydium? Enter Moralis’ Raydium Solana API, streamlining the method of fetching and integrating information instantly from the DEX!
With the Raydium Solana API, you will get detailed swap information, costs, OHLCV information, pairs, and far more with solely single strains of code, permitting you to construct Web3 initiatives each sooner and smarter.
Need to study extra about how this works? Be a part of us in right this moment’s information as we introduce the Raydium Solana API and stroll you thru a complete tutorial on the way it works in observe. Let’s dive straight in.
What’s a Raydium API?
The best strategy to clarify a Raydium API is to interrupt it down phrase by phrase. As such, let’s begin with a short introduction to Raydium!
Raydium is a decentralized trade (DEX) constructed on the Solana blockchain community. Extra particularly, it’s an automatic market maker (AMM) platform the place customers can swap, commerce, and supply liquidity to earn yield on their cryptocurrency property.
An API – brief for utility programming interface – is a group of guidelines, strategies, and protocols that permit totally different software program to speak with one another. It defines how requests and responses are to be structured, enabling seamless integration between two programs.
In brief, a Raydium API is an interface that permits you to effortlessly fetch and combine information about tokens which might be being traded on the Raydium DEX. It may be used to fetch token costs, swaps, and different important information wanted when constructing highly effective decentralized purposes (dapps).
So, what’s the greatest Raydium API? For the reply to this query, be a part of us within the following part as we introduce Moralis’ Raydium Solana API!
Raydium Solana API
Moralis is a number one crypto information supplier, providing a world-class developer expertise by offering quite a lot of Web3 APIs and next-generation RPC nodes. Expertise the trade’s most complete responses, full cross-chain help, and enterprise-grade safety, permitting you to construct dapps sooner and extra effectively.

The Raydium Solana API is the last word software for integrating token information from the Raydium DEX into any crypto-based challenge. Right here’s what you will get utilizing this premier interface:
Token Swaps: Get all swap-related transactions – together with purchase, promote, add liquidity, and take away liquidity – for a pair or token deal with.
Token Pairs: Fetch all supported pairs of a particular token by its deal with.
Token Pair Stats: Question analytics for a token pair by deal with, together with complete purchase quantity, promote quantity, and far more.
Actual-Time Costs: Get the token value – denominated in each USD and the chain’s native forex – based mostly on any given contract deal with.
OHLCV Knowledge: Fetch the open, excessive, low, shut, and quantity information for a token by pair deal with.
…and far more!
All in all, the Raydium Solana API is a one-stop store for token information on the Raydium trade, permitting you to fetch all the things from swaps to OHLCV information with single API calls. Please take a look at the Raydium API documentation to study extra about all supported endpoints and DEXs.
Full Tutorial: Find out how to Get Token Swaps From Raydium with Moralis API
With an outline of the Raydium Solana API, let’s take a better take a look at how this software works in observe. Extra particularly, we’ll present you get token swaps from the Raydium DEX in three easy steps:
Get an API Key
Write Your Script
Run the Code
However earlier than we are able to kickstart this tutorial, it is advisable deal with a few conditions!
Conditions
If you happen to haven’t already, be certain to put in the next earlier than continuing:
Step 1: Get an API Key
To kick issues off, create an account with Moralis by clicking the ”Begin for Free” button on the prime proper:

After you have an account at hand, you’ll discover your Moralis API key below the ”Dwelling” tab within the admin panel:

Copy your key for now, as you’ll want it within the subsequent step to name the Raydium Solana API.
Step 2: Write Your Script
Open your most well-liked built-in growth atmosphere (IDE), create a brand new folder, launch a terminal, and arrange a brand new Node.js challenge with this command:
npm init
Subsequent, set up the required dependencies:
npm set up node-fetch –save
npm set up moralis @moralisweb3/common-evm-utils
From right here, open your ”bundle.json” file and add ”kind”: ”module” to the listing:

Subsequent, create an ”index.js” file and add the next code, which is used to fetch the swaps of a token based mostly on a pair deal with:
import fetch from “node-fetch”;
const choices = {
technique: “GET”,
headers: {
settle for: “utility/json”,
“X-API-Key”: “YOUR_API_KEY”,
},
};
fetch(
“https://solana-gateway.moralis.io/token/mainnet/pairs/FdjBRWXzieV1Qtn8FLDWWk2HK1HSQWYduo8y4F1e8GWu/swaps”,
choices
)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
Right here, it is advisable make a number of minor adjustments to the code. To start out, exchange YOUR_API_KEY with the important thing you fetched throughout step one. Subsequent, change the pair deal with to suit your preferences:

Along with the parameters above, you may as well make much more particular queries. Listed here are a few of the different parameters you may embody:
fromDate: The beginning date.
toDate: The ending date.
order: The order of the outcomes, both descending or ascending.
transactionTypes: The transaction sorts to be fetched. Both purchase, promote, addLiquidity, or removeLiquidity.
Step 3: Run the Code
When you’re comfortable together with your request, all that continues to be is to run the code. To take action, execute the next terminal command within the challenge’s root folder:
node index.js
In return, you’ll get a listing of transactions. Right here’s an instance of what it’d appear like:
{
“cursor”: “//…”,
“web page”: 1,
“pageSize”: 100,
“exchangeLogo”: “https://entities-logos.s3.amazonaws.com/raydium.png”,
“exchangeName”: “Raydium CLMM”,
“exchangeAddress”: “CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK”,
“pairAddress”: “FdjBRWXzieV1Qtn8FLDWWk2HK1HSQWYduo8y4F1e8GWu”,
“pairLabel”: “Fartcoin /SOL”,
“baseToken”: {
“deal with”: “9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump”,
“identify”: “Fartcoin “,
“image”: “Fartcoin “,
“brand”: “https://ipfs.io/ipfs/QmQr3Fz4h1etNsF7oLGMRHiCzhB5y9a7GjyodnF7zLHK1g”,
“decimals”: “6”
},
“quoteToken”: {
“deal with”: “So11111111111111111111111111111111111111112”,
“identify”: “Wrapped SOL”,
“image”: “SOL”,
“brand”: null,
“decimals”: “9”
},
“consequence”: [
{
“transactionHash”: “GDna2AQJaLcQdnEHAvJHDNcTaCQ9GntmgzYuTbYRKgVEnpYTWhT8doFUUwWgJ7XLLXTNV7qUzo4nosT8LUTke78”,
“transactionType”: “buy”,
“transactionIndex”: 3,
“subCategory”: “accumulation”,
“blockTimestamp”: “2025-03-21T12:19:30.000Z”,
“blockNumber”: 328215525,
“walletAddress”: “MfDuWeqSHEqTFVYZ7LoexgAK9dxk7cy4DFJWjWMGVWa”,
“baseTokenAmount”: “390.709256000”,
“quoteTokenAmount”: “1.102431678”,
“baseTokenPriceUsd”: 0.3534886,
“quoteTokenPriceUsd”: 126.487716798,
“baseQuotePrice”: “0.002794647646020197”,
“totalValueUsd”: 138.111268046
},
//…
]
}
Along with the listing of transactions, every occasion is enriched with extra precious information. Listed here are some fascinating examples:
transactionType: Reveals the kind of transaction (purchase or promote)
subCategory: Shows the transaction sub-category. Can, as an illustration, be accumulation, partialSell, newPosition, and many others.
walletAddress: The pockets deal with concerned within the transaction.
totalValueUsd: The whole worth of the swap denominated in USD.
… and far more!
That’s it; it doesn’t should be more difficult than this to fetch swap information for a token when working with Moralis. And due to the richness of the response, you solely want a single API name to, as an illustration, construct an in depth, real-time transaction desk just like the one under:
To study extra about this endpoint, take a look at the official get swaps by pair deal with docs web page.
Why is Moralis’ Raydium API the High Alternative?
Now that you’ve familiarized your self with the Raydium API, you is perhaps asking your self: ”What makes Moralis the best choice?” To reply this query, let’s discover a few of the major advantages of utilizing the API:
End result-Oriented API Responses: The Solana Raydium API and different instruments provided by Moralis are designed with the end result in thoughts, providing you with extra information with fewer calls. As an example, get all swaps of a token – enriched with costs, transaction sorts, class tags, and extra – all with one single request.
Intuitive Developer Expertise: Fetch token costs, swaps, pairs, and far more from Raydium with single API calls. Integrating and analyzing information from the Raydium DEX has by no means been simpler.
Enterprise-Grade Safety & Reliability: Moralis for Builders is SOC 2 Kind 2 licensed, highlighting our dedication to sustaining enterprise-grade reliability and safety throughout all options and instruments.

To summarize, Moralis provides the trade’s most complete, easy-to-use, and dependable Raydium Solana API, providing you with all the things it is advisable combine information instantly from the DEX!
Use Instances for the Raydium Solana API
The Raydium Solana API has many outstanding use instances. Listed here are three examples you’ll possible discover fascinating when you’re constructing within the house:
Actual-Time Transaction Tables: Because of the Raydium Solana API’s wealthy responses, you may construct a real-time transaction desk with only one single endpoint. Right here’s an instance of what it may appear like:

Token Analytics Overview: With the assistance of the token analytics info supplied by the Raydium Solana API, you can provide your customers seamless perception into complete transactions, buys, sells, quantity, and far more. Construct one thing that appears like this with out breaking a sweat:

Value Charts: With seamless entry to OHLCV information, you may construct complete value charts for any Raydium token that options each real-time and historic insights. Take a look at an instance under:

Transaction tables, token analytics, and value charts are solely three outstanding use instances for the Raydium Solana API, and you’ll construct many extra options with this premier interface!
Exploring Different Instruments & Options Past the Raydium API
Along with the Raydium API, Moralis provides a broad set of different top-tier Solana-compatible APIs. Let’s discover three outstanding examples under:
Pockets API: Get any pockets’s full historical past, holdings, profitability, and extra with minimal code. It is a premier interface for anybody seeking to construct portfolio trackers, tax instruments, and different related platforms that depend on wallet-related information.
NFT API: Fetch NFT balances and wealthy metadata for any token throughout the Solana community and different EVM chains. Use this top-tier interface to streamline dependable NFT information integration into your web sites, purposes, and different crypto-related initiatives.
Value API: Question real-time DEX costs, buying and selling information, and OHLCV insights for any token. With the Value API, you may combine value information into your initiatives with single strains of code, permitting you to construct highly effective options like buying and selling charts, transaction tables, and far more with ease.
Take a look at the Solana API web page to study extra in regards to the interfaces above and different instruments provided by Moralis!
Abstract: Moralis Raydium API – Find out how to Get Knowledge From Raydium in 2025
Raydium is a number one DEX on the Solana blockchain, making it a precious market to trace for anybody seeking to construct trade terminals, analytics platforms, and different related initiatives. However what’s the easiest way to trace tokens on the Raydium DEX? Enter Moralis’ Raydium Solana API!

The Raydium Solana API is a top-tier API for anybody seeking to get token information from Raydium. Right here’s a few of the info you may fetch utilizing this premier interface:
Token Swaps: Fetch all swap-related transactions for a pair or token deal with.
OHLCV information: Get the OHLCV information of any token by pair deal with.
Token Pairs: Get all supported pairs of a token.
Token Pair Stats: Fetch analytics for a token, together with complete purchase quantity, promote quantity, and many others.
Actual-Time Costs: Get any token’s value denominated in each the chain’s native forex and USD.
…and far more!
With the Raydium Solana API, you may construct world-class options like real-time transaction tables, interactive value charts, and far more with minimal effort. So, if you wish to begin constructing smarter and extra effectively, join a free Moralis account right this moment!
If you happen to favored this tutorial, be happy to take a look at different content material right here on the weblog. For instance, discover our Pump Enjoyable API article or dive into the very best SimpleHash API various.







