1
0
mirror of https://github.com/payden/libwsclient synced 2026-03-02 04:09:18 +00:00

feat : add strategy

This commit is contained in:
deniyuda348
2025-05-16 15:09:24 +09:00
parent d416fcb62c
commit 17c1e2d5e0
81 changed files with 7848 additions and 2858 deletions

View File

@@ -0,0 +1,9 @@
use crate::models::market::Market;
use crate::models::order::Order;
use solana_sdk::pubkey::Pubkey;
pub struct CopyTradeOpportunity {
pub trader: Pubkey,
pub market: Market,
pub trade: Order,
}

View File

@@ -0,0 +1,7 @@
use solana_sdk::pubkey::Pubkey;
pub struct CopyTradeTarget {
pub trader_account: Pubkey,
pub target_token: Pubkey,
pub trade_amount: f64,
}

View File

@@ -0,0 +1,9 @@
use solana_sdk::pubkey::Pubkey;
use std::collections::HashMap;
pub struct MarketConditions {
pub liquidity: f64,
pub volume: f64,
pub volatility: f64,
pub account_balances: HashMap<Pubkey, f64>,
}

View File

@@ -0,0 +1,6 @@
use solana_sdk::transaction::Transaction;
pub struct MevOpportunity {
pub transactions: Vec<(Transaction, f64)>,
pub min_profit: f64,
}

3
models/mod.rs Normal file
View File

@@ -0,0 +1,3 @@
pub mod market_conditions;
pub mod mev_opportunity;
pub mod transaction_log;

View File

@@ -0,0 +1,7 @@
use crate::models::market::Market;
pub struct SnipingOpportunity {
pub market: Market,
pub price: f64,
pub liquidity: f64,
}

View File

@@ -0,0 +1,6 @@
use crate::models::market_conditions::MarketConditions;
pub struct TransactionLog {
pub signature: String,
pub market_conditions: MarketConditions,
}