meteora-sdk 0.6.8

meteora sdk
Documentation

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);
    }
}