okxv2 parser

This commit is contained in:
thloyi
2026-01-07 15:39:32 +08:00
parent 2504636fb0
commit 156fd9b0bf
4 changed files with 387 additions and 13 deletions

View File

@@ -50,6 +50,11 @@ func main() {
"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
},
},
"okxdexroutev2": {
AccountRequired: []string{
"proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u",
},
},
// TODO: axiom, gmgn, etc.
})
if err != nil {
@@ -84,12 +89,11 @@ func main() {
case txBatch := <-txCh:
//jsonData, _ := json.MarshalIndent(txBatch, "", " ")
for _, tx := range txBatch {
if tx.Label == "flas" {
if tx.Label == "okxdexroutev2" {
if tx.Event == "buy" {
fmt.Println("===============", tx.TxHash, tx.Program, tx.Event, tx.Token0Address, "token:", tx.Token0Amount, "sol:", tx.Token1Amount)
fmt.Println("===============", tx.TxHash, tx.Event, tx.Token0Address, "token:", tx.Token0Amount, "sol:", tx.Token1Amount)
} else if tx.Event == "sell" {
fmt.Println("===============", tx.TxHash, tx.Program, tx.Event, tx.Token0Address, "token:", tx.Token0Amount)
fmt.Println("===============", tx.TxHash, tx.Event, tx.Token0Address, "token:", tx.Token0Amount)
}
}
}