subscribe to trades by trader on TON

Streams DEX trades on TON as they happen: block time, shard, buy amount, buy currency name, buy smart contract address, buy buyer address, buy workchain and 7 more fields.

By Divyasshree · saved 24 October 2024 · run 1 time · Bitquery API v2

What it returns

The subscription

subscription {
  Ton(network: ton) {
    DEXTrades( where: {any: [{Trade: {Buy: {Buyer: {Address: {is: "BRABWqVGzYz49BUmY9136OHo2nWj8ONmcwxJaqy91laj00e4"}}}}},
      {Trade: {Sell: {Seller: {Address: {is: "BRABWqVGzYz49BUmY9136OHo2nWj8ONmcwxJaqy91laj00e4"}}}}}]}) {
      Block {
        Time
        Shard
      }
      Trade {
        Buy {
          Amount
          Currency {
            Name
            SmartContract {
              Address
            }
          }
          Buyer {
            Address
            Workchain
          }
        }
        Dex {
          ProtocolName
          SmartContract {
            Address
          }
        }
        Sell {
          Amount
          Currency {
            Name
          }
          Seller {
            Address
            Workchain
          }
        }
      }
      Transaction {
        Hash
      }
    }
  }
}

Similar queries