add bot trade event

This commit is contained in:
William
2025-01-03 17:01:07 +08:00
parent 862651034e
commit bec7305f0e
6 changed files with 28 additions and 7 deletions
+5 -1
View File
@@ -25,6 +25,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
DexEvent::NewTrade(trade_info) => {
println!("Received new trade event: {:?}", trade_info);
},
DexEvent::NewBotTrade(trade_info) => {
println!("Received new bot trade event: {:?}", trade_info);
},
DexEvent::Error(err) => {
println!("Received error: {}", err);
}
@@ -35,7 +38,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let subscription = tokens_subscription(
ws_url,
commitment,
callback
callback,
None
).await.unwrap();
// Wait for a while to receive events