meteora-sdk

Crates.iometeora-sdk
lib.rsmeteora-sdk
version0.7.0
created_at2025-10-12 04:40:59.443556+00
updated_at2025-12-21 20:00:26.836133+00
descriptionmeteora sdk
homepage
repositoryhttps://github.com/0xhappyboy/meteora-sdk
max_upload_size
id1878884
size297,534
happy₿oy (0xhappyboy)

documentation

README

Meteora SDK

A Meteora SDK for interacting with the Meteora DEX protocol on Solana. It provides complete functionality including price lookup, liquidity pool management, and more.

License

简体中文 | English

Depend

cargo add meteora-sdk

Example

Retrieves information about the dynamic bond curve pool at a specified address.

#[cfg(test)]
mod tests {
    use std::sync::Arc;

    use super::*;
    use crate::Meteora;
    use solana_network_sdk::Solana;

    #[tokio::test]
    async fn test_dbc_pool() {
        let sol = Solana::new(solana_network_sdk::types::Mode::MAIN).unwrap();
        let meteora = Meteora::new(Arc::new(sol));
        let pool_data = meteora
            .get_liquidity_pool_dbc("FDT74DRFm6d2zig9ZT1ABT3NJMPooWXs1tCMvNzvd2jV")
            .await
            .unwrap();
        println!("Pool Data: {:?}", pool_data);
    }
}

Retrieve information about the DLMM liquidity pool at the specified address.


#[cfg(test)]
mod tests {
    use super::*;
    use crate::Meteora;
    use solana_network_sdk::Solana;
    use std::sync::Arc;

    #[tokio::test]
    async fn test_dlmm_pool_parsing() {
        let sol = Solana::new(solana_network_sdk::types::Mode::MAIN).unwrap();
        let meteora = Meteora::new(Arc::new(sol));
        let pool_data = meteora
            .get_liquidity_pool_dlmm("BjxkogRUDnb72MSBTfsyuq54yntqxyVKozK9WywMszvZ")
            .await
            .unwrap();
        println!("DLMM Pool Data: {:?}", pool_data);
    }
}

Retrieve information about the DYN liquidity pool at the specified address.

#[cfg(test)]
mod tests {
    use std::sync::Arc;

    use solana_network_sdk::Solana;

    use crate::Meteora;

    use super::*;
    #[tokio::test]
    async fn test_damm_pool_parsing() {
        let sol = Solana::new(solana_network_sdk::types::Mode::MAIN).unwrap();
        let meteora = Meteora::new(Arc::new(sol));
        let pool_data = meteora
            .get_liquidity_pool_dyn("DqAfrGV2GBxpGRsq6Xk1z9ojRncqgLeeVPaKg5bCc24Z")
            .await
            .unwrap();
        println!("Pool Data: {:?}", pool_data);
    }
}

Retrieve information about the DYNv2 liquidity pool at the specified address.

#[cfg(test)]
mod tests {
    use std::sync::Arc;

    use super::*;
    use crate::Meteora;
    use solana_network_sdk::Solana;

    #[tokio::test]
    async fn test_dammv2_pool_parsing() {
        let sol = Solana::new(solana_network_sdk::types::Mode::MAIN).unwrap();
        let meteora = Meteora::new(Arc::new(sol));
        let pool_data = meteora
            .get_liquidity_pool_dynv2("5gB4NPgFB3MHFHSeKN4sbaY6t9MB8ikCe9HyiKYid4Td")
            .await
            .unwrap();
        println!("Pool Data: {:?}", pool_data);
    }
}
Commit count: 0

cargo fmt