Skip to main content
Subscriptions use wss://graphql.mobula.io/graphql with the graphql-transport-ws protocol. wss://graphql.mobula.io/graphql/subscriptions is also supported for backwards compatibility.

Returns

fastTrade
TradeSubscriptionPayload!
A live trade payload. See TradeSubscriptionPayload.

Arguments

input
TradeSubscriptionInput!
required

Modes

  • Default mode subscribes to pair/pool addresses.
  • assetMode: true subscribes to token contract addresses or Solana token mints.
  • traderMode: true subscribes to wallet addresses.
  • assetMode and traderMode cannot be enabled together.

Example - token mode

subscription {
  fastTrade(
    input: {
      assetMode: true
      items: [{ address: "So11111111111111111111111111111111111111112", blockchain: "solana" }]
    }
  ) {
    id
    stable_id
    token
    pair
    date
    token_price
    token_amount
    token_amount_vs
    token_amount_raw
    token_amount_raw_vs
    token_amount_usd
    type
    operation
    blockchain
    hash
    sender
  }
}

Example response

{
  "data": {
    "fastTrade": {
      "id": null,
      "stable_id": "solana:solana:5J7z...L8m:9wFF...pool:0",
      "token": "So11111111111111111111111111111111111111112",
      "pair": "9wFF...pool",
      "date": 1783410123456,
      "token_price": 153.42,
      "token_amount": 1.25,
      "token_amount_vs": 191.775,
      "token_amount_raw": "1250000000",
      "token_amount_raw_vs": "191775000",
      "token_amount_usd": 191.775,
      "type": "buy",
      "operation": "regular",
      "blockchain": "solana",
      "hash": "5J7z...L8m",
      "sender": "AgmL...N51"
    }
  }
}

Matching REST trades

Use id when it is present. When id is null, use stable_id to match a streamed trade deterministically. stable_id is built from the chain id, transaction hash, pool address, and swap index, so it disambiguates multi-swap transactions where hash alone is not enough. Use token_amount_raw and token_amount_raw_vs for exact on-chain quantities. They avoid lossy amount reconstruction from token_amount_usd / token_price.