How to capture multiple token transfers within a single transaction?

Hi, I have a paid subscription.

My program collects transaction data from your API using code similar to that below; it is intended to capture multiple transactions in a timeframe with txFrom and to address data for each transaction. Recently I have noticed that my query is producing unexpected results, because some transaction hashes are transferring multiple tokens and this code only captures the first token transfer in the list. In example, go to Binance Transaction Hash (Txhash) Details | BscScan

The code below records the txFrom as 0xf2f9b8ec0a8203a2cba497ffde4e75435f2db588 and the to as 0x7a62f3686bc633dd950d7c2c3ca3f2568f169b57.
According to BSCscan, there are 6 tokens transfers listed within this transaction, whereas my code is only recording one of them.

How can I alter the code below in such a way that it records the from and to address, as well as token address and quantity, of each of these token transfers? Please bear in mind that I do not know how many tokens might be transferred in any txhash; this example shows 6, or it could be just 1, or any other quantity.

My current query:

{
      ethereum(network: bsc) {
        dexTrades(options: {limit: 10000, offset: 0, desc: "block.height"},
          time: { since: "2022-08-07T16:58:09z" , till: "2022-08-07T16:58:11z" }
          ) {
          tradeIndex
          transaction {
           hash
           txFrom {
            address
          }
           to {
            address
          }
          }
          block {
            height
            timestamp{
                  time(format: "%Y-%m-%d %H:%M:%S")
                }
          }
          buyAmount
          buyAmountInUsd: buyAmount(in: USD)
          buyCurrency {
            symbol
            address
          }
          sellAmount
            sellAmountInUsd: sellAmount(in: USD)
          sellCurrency {
            symbol
            address
          }
          sellAmountInUsd: sellAmount(in: USD)
          tradeAmount(in: USD)
    
        }
      }
    }

Thank you

Token transfers and Dex trades are two different things.

For example the txhash you mentioned actually have 2 trades and 10 transfers

The query you mentioned above shows 2 trades (search for tx hash in the result, and you will see two trades)… now if you want all transfers for tx hash. then use transfer API like this trasnfers for tx hash

OK, your example does provide the information I want, however is there a way to retrieve that for every txHash within a timeframe on BSC, similar to how my code grabs all txHash within a timeframe?

So I would provide a time since:, till: and get back a list similar to:
{
hash: ___
time:____
transfers:[
{
sender:
address:____
receiver:
address:____
amount:___
amount_usd:____
currency:
symbol:____
address:____
},{
(next transfer, if exists)
}
]
},{
hash:____
etc

I hope this is clear. I’m trying to grab all of the txHash and token transfers within a timeframe.

Thank you.

Please try this Transfers in time range