Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DEX endpoints #3

Merged
merged 2 commits into from
Oct 29, 2024
Merged

Update DEX endpoints #3

merged 2 commits into from
Oct 29, 2024

Conversation

martinkersner
Copy link
Member

Updates

This PR merges Candle and Trade structs under new name Dex. chains, exchanges, pools and intervals functions for DEX-related structs have been moved under Dex as well.

How to use?

let dex: datamaxi::dex::Dex = datamaxi::api::Datamaxi::new(api_key);

// Chains
dex.chains();

// Exchanges
dex.exchanges();

// Pools
let pools_options = datamaxi::dex::PoolsOptions::new();
dex.pools(pools_options);

// Intervals
dex.intervals()

// DEX Trade example
let trade_options = datamaxi::dex::TradeOptions::new().limit(5);
dex.trade(
    "bsc_mainnet",
    "pancakeswap",
    "0xb24cd29e32FaCDDf9e73831d5cD1FFcd1e535423",
    trade_options,
);

// DEX Candle example
let params = datamaxi::dex::CandleOptions::new();
dex.candle(
    "bsc_mainnet",
    "pancakeswap",
    "0xb24cd29e32FaCDDf9e73831d5cD1FFcd1e535423",
    params,
);

@martinkersner martinkersner linked an issue Oct 28, 2024 that may be closed by this pull request
Copy link
Collaborator

@hayotbisonai hayotbisonai left a comment

Choose a reason for hiding this comment

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

LGTM!

@martinkersner martinkersner merged commit 5c66d0f into main Oct 29, 2024
4 checks passed
@martinkersner martinkersner deleted the i-2/feat/update-dex-endpoints branch October 29, 2024 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update DEX endpoints
2 participants