> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Token transfers

> Every transfer of one SPL or Token-2022 token, between any wallets. Room: `transfer:{mint}`. `balances` lists the token's balance changes in the transaction. Not available for SOL: use a wallet room or `transfer:So11111111111111111111111111111111111111112:{wallet}`. Append `:enriched` for token metadata, USD values and wallet identities. Events are provisional at processed commitment.

## WebSocket example

```javascript theme={null}
const mint = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"; // USDC
const room = `transfer:${mint}`; // or `${...}:enriched` for token metadata, USD values and wallet identities
const ws = new WebSocket("wss://datastream.solanatracker.io/YOUR_API_KEY");

ws.addEventListener("open", () => {
  ws.send(JSON.stringify({ type: "join", room }));
});

ws.addEventListener("message", (event) => {
  const msg = JSON.parse(event.data);
  if (msg.type === "ping") return ws.send(JSON.stringify({ type: "pong" }));
  if (msg.type !== "message") return;

  const { signature, transfers, balances } = msg.data;
  for (const t of transfers) {
    console.log(signature, t.direction ?? "", t.uiAmount, t.mint, t.from.owner, "->", t.to.owner);
  }
});
```

One message is sent per transaction. Amounts are raw integer strings with an exact `uiAmount`. A transfer that is a leg of a swap already streamed in the trade rooms is not sent again; what remains of a swap (platform fees, tips, payouts) arrives with `swapTx: true`. See the [transfers guide](https://docs.solanatracker.io/guides/transfers.md) for history plus live updates.

## SDK Example

```typescript theme={null}
import { Datastream } from '@solana-tracker/data-api';

const dataStream = new Datastream({
  wsUrl: 'wss://datastream.solanatracker.io/YOUR_API_KEY',
});

dataStream.on('error', console.error);
await dataStream.connect();

const sub = dataStream.subscribe.transfers.token('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', { enriched: true }).on((data) => {
  console.log(data);
});

// sub.unsubscribe();
```


## AsyncAPI

````yaml datastream/transfers.json transferMint
id: transferMint
title: Transfer mint
description: >-
  Every transfer of one SPL or Token-2022 token, between any wallets. Room:
  `transfer:{mint}`. `balances` lists the token's balance changes in the
  transaction. Not available for SOL: use a wallet room or
  `transfer:So11111111111111111111111111111111111111112:{wallet}`. Append
  `:enriched` for token metadata, USD values and wallet identities. Events are
  provisional at processed commitment.
servers:
  - id: production
    protocol: wss
    host: datastream.solanatracker.io
    bindings: []
    variables:
      - id: apiKey
        description: Your unique API key from Data API subscription
        defaultValue: YOUR_DATASTREAM_KEY
        allowedValues: []
        examples: []
address: /
parameters: []
bindings: []
operations:
  - &ref_21
    id: subscribeTokenTransfers
    title: Subscribe token transfers
    description: Subscribe to token transfers
    type: receive
    messages:
      - &ref_24
        id: join
        payload:
          - name: Subscribe to token transfers
            type: object
            properties:
              - name: type
                type: string
                description: join
                required: true
              - name: room
                type: string
                description: >-
                  transfer:{mint} (append :enriched for token metadata, USD
                  values and wallet identities)
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: join
              default: join
              x-parser-schema-id: <anonymous-schema-78>
            room:
              type: string
              default: transfer:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
              description: >-
                transfer:{mint} (append :enriched for token metadata, USD values
                and wallet identities)
              x-parser-schema-id: <anonymous-schema-79>
          examples:
            - type: join
              room: transfer:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          x-parser-schema-id: <anonymous-schema-77>
        title: Subscribe to token transfers
        example: |-
          {
            "type": "join",
            "room": "transfer:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: join
          - id: x-parser-message-name
            value: join
    bindings: []
    extensions: &ref_20
      - id: x-codeSamples
        value: &ref_27
          - lang: typescript
            label: SDK
            source: >
              import { Datastream } from '@solana-tracker/data-api';


              const dataStream = new Datastream({
                wsUrl: 'wss://datastream.solanatracker.io/YOUR_API_KEY',
              });


              dataStream.on('error', console.error);

              await dataStream.connect();


              const sub =
              dataStream.subscribe.transfers.token('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
              { enriched: true }).on((data) => {
                console.log(data);
              });


              // sub.unsubscribe();
      - id: x-parser-unique-object-id
        value: transferMint
  - &ref_23
    id: receiveTokenTransfers
    title: Receive token transfers
    description: Token transfers notification
    type: send
    messages:
      - &ref_26
        id: message
        payload:
          - name: Token transfers notification
            type: object
            properties:
              - name: type
                type: string
                description: message
                required: true
              - name: room
                type: string
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: signature
                    type: string
                    required: true
                  - name: slot
                    type: integer
                    required: true
                  - name: timestamp
                    type: &ref_6
                      - integer
                      - 'null'
                    description: >-
                      Unix seconds: block time, or the time the stream saw the
                      transaction while its block time is unknown
                    required: true
                  - name: commitment
                    type: string
                    enumValues:
                      - processed
                    required: true
                  - name: swapTx
                    type: boolean
                    description: >-
                      The transaction is a swap. Its traded legs are in the
                      trade rooms, not here; what is left (fees, tips, payouts)
                      is.
                    required: true
                  - name: transfers
                    type: array
                    description: >-
                      The transaction's transfers for this room, in instruction
                      order
                    required: true
                    properties:
                      - name: id
                        type: string
                        description: signature:instruction:inner, unique per transfer
                        required: true
                      - name: signature
                        type: string
                        required: true
                      - name: slot
                        type: integer
                        required: true
                      - name: timestamp
                        type: &ref_7
                          - integer
                          - 'null'
                        description: >-
                          Unix seconds: block time, or the time the stream saw
                          the transaction while its block time is unknown
                        required: true
                      - name: commitment
                        type: string
                        enumValues:
                          - processed
                        required: true
                      - name: instruction
                        type: integer
                        description: Outer instruction index
                        required: true
                      - name: inner
                        type: integer
                        description: >-
                          Inner instruction index, -1 for the outer instruction
                          itself
                        required: true
                      - name: type
                        type: string
                        enumValues:
                          - sol
                          - spl
                        required: true
                      - name: program
                        type: string
                        enumValues:
                          - system
                          - spl-token
                          - token-2022
                        required: true
                      - name: mint
                        type: string
                        description: Wrapped SOL mint for SOL
                        required: true
                      - name: decimals
                        type: &ref_8
                          - integer
                          - 'null'
                        description: null when the mint's decimals could not be resolved
                        required: true
                      - name: amount
                        type: string
                        description: Raw amount, before any Token-2022 transfer fee
                        required: true
                      - name: uiAmount
                        type: &ref_9
                          - string
                          - 'null'
                        description: >-
                          Exact decimal amount as a string; null when decimals
                          are unknown
                        required: true
                      - name: fee
                        type: string
                        description: Token-2022 transfer fee withheld, raw
                        required: false
                      - name: from
                        type: object
                        required: true
                        properties:
                          - name: address
                            type: string
                            description: >-
                              The account debited or credited: a wallet for SOL,
                              a token account for SPL
                            required: true
                          - name: owner
                            type: &ref_0
                              - string
                              - 'null'
                            description: The wallet owning address (address itself for SOL)
                            required: true
                          - name: postBalance
                            type: &ref_1
                              - string
                              - 'null'
                            description: Raw balance of address after the transaction
                            required: false
                          - name: identity
                            type: &ref_2
                              - object
                              - 'null'
                            description: >-
                              The wallet's identity, as the trade rooms'
                              :enriched variants give it: KOL roster, named
                              bots, arbitrage, wallet tags and trading
                              platforms, platform profiles, the developer or a
                              pool of the token, SNS domain. null when the
                              wallet has none or it did not arrive in time.
                              :enriched rooms only.
                            required: false
                            properties:
                              - name: type
                                type: string
                                description: The first of tags
                                required: false
                              - name: tags
                                type: array
                                description: >-
                                  kol, bot, arbitrage, potential_bot, hacker,
                                  spam_dusting, a platform (axiom, photon, …),
                                  developer, pool, exchange, sns
                                required: false
                                properties:
                                  - name: item
                                    type: string
                                    required: false
                              - name: name
                                type: string
                                required: false
                              - name: twitter
                                type: string
                                required: false
                              - name: avatar
                                type: string
                                required: false
                              - name: platforms
                                type: array
                                required: false
                                properties:
                                  - name: item
                                    type: string
                                    required: false
                              - name: platformProfiles
                                type: object
                                required: false
                              - name: developer
                                type: object
                                description: >-
                                  The token's developer: the token and how
                                  (creator, pool deployer)
                                required: false
                              - name: pool
                                type: object
                                description: A pool of the token
                                required: false
                              - name: sns
                                type: object
                                required: false
                                properties:
                                  - name: domain
                                    type: string
                                    required: false
                      - name: to
                        type: object
                        required: true
                        properties:
                          - name: address
                            type: string
                            description: >-
                              The account debited or credited: a wallet for SOL,
                              a token account for SPL
                            required: true
                          - name: owner
                            type: *ref_0
                            description: The wallet owning address (address itself for SOL)
                            required: true
                          - name: postBalance
                            type: *ref_1
                            description: Raw balance of address after the transaction
                            required: false
                          - name: identity
                            type: *ref_2
                            description: >-
                              The wallet's identity, as the trade rooms'
                              :enriched variants give it: KOL roster, named
                              bots, arbitrage, wallet tags and trading
                              platforms, platform profiles, the developer or a
                              pool of the token, SNS domain. null when the
                              wallet has none or it did not arrive in time.
                              :enriched rooms only.
                            required: false
                            properties:
                              - name: type
                                type: string
                                description: The first of tags
                                required: false
                              - name: tags
                                type: array
                                description: >-
                                  kol, bot, arbitrage, potential_bot, hacker,
                                  spam_dusting, a platform (axiom, photon, …),
                                  developer, pool, exchange, sns
                                required: false
                                properties:
                                  - name: item
                                    type: string
                                    required: false
                              - name: name
                                type: string
                                required: false
                              - name: twitter
                                type: string
                                required: false
                              - name: avatar
                                type: string
                                required: false
                              - name: platforms
                                type: array
                                required: false
                                properties:
                                  - name: item
                                    type: string
                                    required: false
                              - name: platformProfiles
                                type: object
                                required: false
                              - name: developer
                                type: object
                                description: >-
                                  The token's developer: the token and how
                                  (creator, pool deployer)
                                required: false
                              - name: pool
                                type: object
                                description: A pool of the token
                                required: false
                              - name: sns
                                type: object
                                required: false
                                properties:
                                  - name: domain
                                    type: string
                                    required: false
                      - name: swapTx
                        type: boolean
                        description: >-
                          The transaction is a swap. Its traded legs are in the
                          trade rooms, not here; what is left (fees, tips,
                          payouts) is.
                        required: true
                      - name: direction
                        type: string
                        description: 'Wallet rooms only: relative to the room''s wallet'
                        enumValues:
                          - in
                          - out
                        required: false
                      - name: token
                        type: object
                        required: false
                        properties:
                          - name: mint
                            type: string
                            required: true
                          - name: name
                            type: &ref_3
                              - string
                              - 'null'
                            required: true
                          - name: symbol
                            type: &ref_4
                              - string
                              - 'null'
                            required: true
                          - name: image
                            type: &ref_5
                              - string
                              - 'null'
                            required: true
                          - name: decimals
                            type: integer
                            required: true
                      - name: price
                        type: object
                        description: >-
                          Current USD price from the token's top pool; 1 for
                          USDC/USDT/USD1. :enriched rooms only.
                        required: false
                        properties:
                          - name: usd
                            type: &ref_11
                              - number
                              - 'null'
                            required: true
                      - name: value
                        type: object
                        description: uiAmount x price. :enriched rooms only.
                        required: false
                        properties:
                          - name: usd
                            type: &ref_12
                              - number
                              - 'null'
                            required: true
                      - name: marketCap
                        type: object
                        description: >-
                          USD market cap. SOL: price × circulating supply; null
                          for USDC, USDT and USD1. :enriched rooms only.
                        required: false
                        properties:
                          - name: usd
                            type: &ref_13
                              - number
                              - 'null'
                            required: true
                  - name: balances
                    type: array
                    description: >-
                      The transaction's balance changes for this room: of its
                      wallet (wallet rooms), its mint (mint rooms), or both
                    required: true
                    properties:
                      - name: owner
                        type: string
                        description: Wallet that owns the account
                        required: true
                      - name: account
                        type: string
                        description: Token account, or the wallet itself for SOL
                        required: true
                      - name: mint
                        type: string
                        description: Wrapped SOL mint for SOL
                        required: true
                      - name: program
                        type: string
                        enumValues:
                          - system
                          - spl-token
                          - token-2022
                        required: true
                      - name: decimals
                        type: &ref_14
                          - integer
                          - 'null'
                        required: true
                      - name: pre
                        type: string
                        description: Raw balance before the transaction
                        required: true
                      - name: post
                        type: string
                        description: Raw balance after the transaction
                        required: true
                      - name: change
                        type: string
                        description: post - pre, raw
                        required: true
                      - name: cause
                        type: string
                        description: >-
                          swap: the trader's traded mints; transfer: an account
                          in one of the transaction's transfers; other:
                          everything else (pools, programs, rent, a fee alone)
                        enumValues:
                          - swap
                          - transfer
                          - other
                        required: true
                      - name: fee
                        type: string
                        description: >-
                          The fee payer's SOL entry only: the transaction fee in
                          lamports, included in change
                        required: false
                      - name: identity
                        type: *ref_2
                        description: >-
                          The wallet's identity, as the trade rooms' :enriched
                          variants give it: KOL roster, named bots, arbitrage,
                          wallet tags and trading platforms, platform profiles,
                          the developer or a pool of the token, SNS domain. null
                          when the wallet has none or it did not arrive in time.
                          :enriched rooms only.
                        required: false
                        properties:
                          - name: type
                            type: string
                            description: The first of tags
                            required: false
                          - name: tags
                            type: array
                            description: >-
                              kol, bot, arbitrage, potential_bot, hacker,
                              spam_dusting, a platform (axiom, photon, …),
                              developer, pool, exchange, sns
                            required: false
                            properties:
                              - name: item
                                type: string
                                required: false
                          - name: name
                            type: string
                            required: false
                          - name: twitter
                            type: string
                            required: false
                          - name: avatar
                            type: string
                            required: false
                          - name: platforms
                            type: array
                            required: false
                            properties:
                              - name: item
                                type: string
                                required: false
                          - name: platformProfiles
                            type: object
                            required: false
                          - name: developer
                            type: object
                            description: >-
                              The token's developer: the token and how (creator,
                              pool deployer)
                            required: false
                          - name: pool
                            type: object
                            description: A pool of the token
                            required: false
                          - name: sns
                            type: object
                            required: false
                            properties:
                              - name: domain
                                type: string
                                required: false
                      - name: token
                        type: object
                        required: false
                        properties:
                          - name: mint
                            type: string
                            required: true
                          - name: name
                            type: *ref_3
                            required: true
                          - name: symbol
                            type: *ref_4
                            required: true
                          - name: image
                            type: *ref_5
                            required: true
                          - name: decimals
                            type: integer
                            required: true
                      - name: price
                        type: object
                        description: >-
                          Current USD price from the token's top pool; 1 for
                          USDC/USDT/USD1. :enriched rooms only.
                        required: false
                        properties:
                          - name: usd
                            type: &ref_17
                              - number
                              - 'null'
                            required: true
                      - name: value
                        type: object
                        description: >-
                          change in token units x price; negative for outflows.
                          :enriched rooms only.
                        required: false
                        properties:
                          - name: usd
                            type: &ref_18
                              - number
                              - 'null'
                            required: true
                      - name: marketCap
                        type: object
                        description: >-
                          USD market cap. SOL: price × circulating supply; null
                          for USDC, USDT and USD1. :enriched rooms only.
                        required: false
                        properties:
                          - name: usd
                            type: &ref_19
                              - number
                              - 'null'
                            required: true
                  - name: enrichmentStatus
                    type: string
                    description: >-
                      :enriched rooms only. Present when a lookup missed the
                      250ms deadline; the missing values are null.
                    enumValues:
                      - partial
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
            - data
          properties:
            type:
              type: string
              const: message
              x-parser-schema-id: <anonymous-schema-84>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-85>
            data:
              type: object
              required:
                - signature
                - slot
                - timestamp
                - commitment
                - swapTx
                - transfers
                - balances
              properties:
                signature:
                  type: string
                  x-parser-schema-id: <anonymous-schema-10>
                slot:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-11>
                timestamp:
                  type: *ref_6
                  description: >-
                    Unix seconds: block time, or the time the stream saw the
                    transaction while its block time is unknown
                  x-parser-schema-id: <anonymous-schema-12>
                commitment:
                  type: string
                  enum:
                    - processed
                  x-parser-schema-id: <anonymous-schema-13>
                swapTx:
                  type: boolean
                  description: >-
                    The transaction is a swap. Its traded legs are in the trade
                    rooms, not here; what is left (fees, tips, payouts) is.
                  x-parser-schema-id: <anonymous-schema-14>
                transfers:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - id
                      - signature
                      - slot
                      - timestamp
                      - commitment
                      - instruction
                      - inner
                      - type
                      - program
                      - mint
                      - decimals
                      - amount
                      - uiAmount
                      - from
                      - to
                      - swapTx
                    properties:
                      id:
                        type: string
                        description: signature:instruction:inner, unique per transfer
                        x-parser-schema-id: <anonymous-schema-16>
                      signature:
                        type: string
                        x-parser-schema-id: <anonymous-schema-17>
                      slot:
                        type: integer
                        x-parser-schema-id: <anonymous-schema-18>
                      timestamp:
                        type: *ref_7
                        description: >-
                          Unix seconds: block time, or the time the stream saw
                          the transaction while its block time is unknown
                        x-parser-schema-id: <anonymous-schema-19>
                      commitment:
                        type: string
                        enum:
                          - processed
                        x-parser-schema-id: <anonymous-schema-20>
                      instruction:
                        type: integer
                        description: Outer instruction index
                        x-parser-schema-id: <anonymous-schema-21>
                      inner:
                        type: integer
                        description: >-
                          Inner instruction index, -1 for the outer instruction
                          itself
                        x-parser-schema-id: <anonymous-schema-22>
                      type:
                        type: string
                        enum:
                          - sol
                          - spl
                        x-parser-schema-id: <anonymous-schema-23>
                      program:
                        type: string
                        enum:
                          - system
                          - spl-token
                          - token-2022
                        x-parser-schema-id: <anonymous-schema-24>
                      mint:
                        type: string
                        description: Wrapped SOL mint for SOL
                        x-parser-schema-id: <anonymous-schema-25>
                      decimals:
                        type: *ref_8
                        description: null when the mint's decimals could not be resolved
                        x-parser-schema-id: <anonymous-schema-26>
                      amount:
                        type: string
                        pattern: ^[0-9]+$
                        description: Raw amount, before any Token-2022 transfer fee
                        x-parser-schema-id: <anonymous-schema-27>
                      uiAmount:
                        type: *ref_9
                        description: >-
                          Exact decimal amount as a string; null when decimals
                          are unknown
                        x-parser-schema-id: <anonymous-schema-28>
                      fee:
                        type: string
                        pattern: ^[0-9]+$
                        description: Token-2022 transfer fee withheld, raw
                        x-parser-schema-id: <anonymous-schema-29>
                      from: &ref_10
                        type: object
                        required:
                          - address
                          - owner
                        properties:
                          address:
                            type: string
                            description: >-
                              The account debited or credited: a wallet for SOL,
                              a token account for SPL
                            x-parser-schema-id: <anonymous-schema-30>
                          owner:
                            type: *ref_0
                            description: The wallet owning address (address itself for SOL)
                            x-parser-schema-id: <anonymous-schema-31>
                          postBalance:
                            type: *ref_1
                            pattern: ^[0-9]+$
                            description: Raw balance of address after the transaction
                            x-parser-schema-id: <anonymous-schema-32>
                          identity: &ref_15
                            type: *ref_2
                            description: >-
                              The wallet's identity, as the trade rooms'
                              :enriched variants give it: KOL roster, named
                              bots, arbitrage, wallet tags and trading
                              platforms, platform profiles, the developer or a
                              pool of the token, SNS domain. null when the
                              wallet has none or it did not arrive in time.
                              :enriched rooms only.
                            properties:
                              type:
                                type: string
                                description: The first of tags
                                x-parser-schema-id: <anonymous-schema-33>
                              tags:
                                type: array
                                items:
                                  type: string
                                  x-parser-schema-id: <anonymous-schema-35>
                                description: >-
                                  kol, bot, arbitrage, potential_bot, hacker,
                                  spam_dusting, a platform (axiom, photon, …),
                                  developer, pool, exchange, sns
                                x-parser-schema-id: <anonymous-schema-34>
                              name:
                                type: string
                                x-parser-schema-id: <anonymous-schema-36>
                              twitter:
                                type: string
                                x-parser-schema-id: <anonymous-schema-37>
                              avatar:
                                type: string
                                x-parser-schema-id: <anonymous-schema-38>
                              platforms:
                                type: array
                                items:
                                  type: string
                                  x-parser-schema-id: <anonymous-schema-40>
                                x-parser-schema-id: <anonymous-schema-39>
                              platformProfiles:
                                type: object
                                x-parser-schema-id: <anonymous-schema-41>
                              developer:
                                type: object
                                description: >-
                                  The token's developer: the token and how
                                  (creator, pool deployer)
                                x-parser-schema-id: <anonymous-schema-42>
                              pool:
                                type: object
                                description: A pool of the token
                                x-parser-schema-id: <anonymous-schema-43>
                              sns:
                                type: object
                                properties:
                                  domain:
                                    type: string
                                    x-parser-schema-id: <anonymous-schema-45>
                                x-parser-schema-id: <anonymous-schema-44>
                            additionalProperties: true
                            x-parser-schema-id: WalletIdentity
                        x-parser-schema-id: TransferParty
                      to: *ref_10
                      swapTx:
                        type: boolean
                        description: >-
                          The transaction is a swap. Its traded legs are in the
                          trade rooms, not here; what is left (fees, tips,
                          payouts) is.
                        x-parser-schema-id: <anonymous-schema-46>
                      direction:
                        type: string
                        enum:
                          - in
                          - out
                        description: 'Wallet rooms only: relative to the room''s wallet'
                        x-parser-schema-id: <anonymous-schema-47>
                      token: &ref_16
                        type: object
                        required:
                          - mint
                          - name
                          - symbol
                          - image
                          - decimals
                        properties:
                          mint:
                            type: string
                            x-parser-schema-id: <anonymous-schema-48>
                          name:
                            type: *ref_3
                            x-parser-schema-id: <anonymous-schema-49>
                          symbol:
                            type: *ref_4
                            x-parser-schema-id: <anonymous-schema-50>
                          image:
                            type: *ref_5
                            x-parser-schema-id: <anonymous-schema-51>
                          decimals:
                            type: integer
                            x-parser-schema-id: <anonymous-schema-52>
                        x-parser-schema-id: TransferToken
                      price:
                        type: object
                        required:
                          - usd
                        properties:
                          usd:
                            type: *ref_11
                            x-parser-schema-id: <anonymous-schema-54>
                        description: >-
                          Current USD price from the token's top pool; 1 for
                          USDC/USDT/USD1. :enriched rooms only.
                        x-parser-schema-id: <anonymous-schema-53>
                      value:
                        type: object
                        required:
                          - usd
                        properties:
                          usd:
                            type: *ref_12
                            x-parser-schema-id: <anonymous-schema-56>
                        description: uiAmount x price. :enriched rooms only.
                        x-parser-schema-id: <anonymous-schema-55>
                      marketCap:
                        type: object
                        required:
                          - usd
                        properties:
                          usd:
                            type: *ref_13
                            x-parser-schema-id: <anonymous-schema-58>
                        description: >-
                          USD market cap. SOL: price × circulating supply; null
                          for USDC, USDT and USD1. :enriched rooms only.
                        x-parser-schema-id: <anonymous-schema-57>
                    x-parser-schema-id: Transfer
                  description: >-
                    The transaction's transfers for this room, in instruction
                    order
                  x-parser-schema-id: <anonymous-schema-15>
                balances:
                  type: array
                  items:
                    type: object
                    required:
                      - owner
                      - account
                      - mint
                      - program
                      - decimals
                      - pre
                      - post
                      - change
                      - cause
                    properties:
                      owner:
                        type: string
                        description: Wallet that owns the account
                        x-parser-schema-id: <anonymous-schema-60>
                      account:
                        type: string
                        description: Token account, or the wallet itself for SOL
                        x-parser-schema-id: <anonymous-schema-61>
                      mint:
                        type: string
                        description: Wrapped SOL mint for SOL
                        x-parser-schema-id: <anonymous-schema-62>
                      program:
                        type: string
                        enum:
                          - system
                          - spl-token
                          - token-2022
                        x-parser-schema-id: <anonymous-schema-63>
                      decimals:
                        type: *ref_14
                        x-parser-schema-id: <anonymous-schema-64>
                      pre:
                        type: string
                        pattern: ^[0-9]+$
                        description: Raw balance before the transaction
                        x-parser-schema-id: <anonymous-schema-65>
                      post:
                        type: string
                        pattern: ^[0-9]+$
                        description: Raw balance after the transaction
                        x-parser-schema-id: <anonymous-schema-66>
                      change:
                        type: string
                        pattern: ^-?[0-9]+$
                        description: post - pre, raw
                        x-parser-schema-id: <anonymous-schema-67>
                      cause:
                        type: string
                        enum:
                          - swap
                          - transfer
                          - other
                        description: >-
                          swap: the trader's traded mints; transfer: an account
                          in one of the transaction's transfers; other:
                          everything else (pools, programs, rent, a fee alone)
                        x-parser-schema-id: <anonymous-schema-68>
                      fee:
                        type: string
                        pattern: ^[0-9]+$
                        description: >-
                          The fee payer's SOL entry only: the transaction fee in
                          lamports, included in change
                        x-parser-schema-id: <anonymous-schema-69>
                      identity: *ref_15
                      token: *ref_16
                      price:
                        type: object
                        required:
                          - usd
                        properties:
                          usd:
                            type: *ref_17
                            x-parser-schema-id: <anonymous-schema-71>
                        description: >-
                          Current USD price from the token's top pool; 1 for
                          USDC/USDT/USD1. :enriched rooms only.
                        x-parser-schema-id: <anonymous-schema-70>
                      value:
                        type: object
                        required:
                          - usd
                        properties:
                          usd:
                            type: *ref_18
                            x-parser-schema-id: <anonymous-schema-73>
                        description: >-
                          change in token units x price; negative for outflows.
                          :enriched rooms only.
                        x-parser-schema-id: <anonymous-schema-72>
                      marketCap:
                        type: object
                        required:
                          - usd
                        properties:
                          usd:
                            type: *ref_19
                            x-parser-schema-id: <anonymous-schema-75>
                        description: >-
                          USD market cap. SOL: price × circulating supply; null
                          for USDC, USDT and USD1. :enriched rooms only.
                        x-parser-schema-id: <anonymous-schema-74>
                    x-parser-schema-id: BalanceChange
                  description: >-
                    The transaction's balance changes for this room: of its
                    wallet (wallet rooms), its mint (mint rooms), or both
                  x-parser-schema-id: <anonymous-schema-59>
                enrichmentStatus:
                  type: string
                  enum:
                    - partial
                  description: >-
                    :enriched rooms only. Present when a lookup missed the 250ms
                    deadline; the missing values are null.
                  x-parser-schema-id: <anonymous-schema-76>
              x-parser-schema-id: TransferTransaction
          examples:
            - type: message
              room: transfer:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
              data:
                signature: >-
                  2VxcHt8HKSt2T2EuUZLyWPsEKz4H4BPreWV28aZDEzoaHG4Fsu232oKKeQqpVqsSYaf3vv8KN7UoZ4MPJA8vw9EF
                slot: 459159504
                timestamp: 1792483949
                commitment: processed
                swapTx: false
                transfers:
                  - id: >-
                      2VxcHt8HKSt2T2EuUZLyWPsEKz4H4BPreWV28aZDEzoaHG4Fsu232oKKeQqpVqsSYaf3vv8KN7UoZ4MPJA8vw9EF:2:-1
                    signature: >-
                      2VxcHt8HKSt2T2EuUZLyWPsEKz4H4BPreWV28aZDEzoaHG4Fsu232oKKeQqpVqsSYaf3vv8KN7UoZ4MPJA8vw9EF
                    slot: 459159504
                    timestamp: 1792483949
                    commitment: processed
                    instruction: 2
                    inner: -1
                    type: spl
                    program: spl-token
                    mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    decimals: 6
                    amount: '25000000'
                    uiAmount: '25'
                    from:
                      address: C2RjaMN2NeYAErS6KiBjPQhHCt95J8mCmmLiQqZXPisR
                      owner: BfG7WYmravgBhNdWpGoiFmF8L1duw2vdqdDHiZid2hoJ
                      postBalance: '71035743'
                    to:
                      address: D9CEogjHA6CpS12F8St9zpSco7pQKJB5uR1RqDsuzQZk
                      owner: GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3
                      postBalance: '656987841913'
                    swapTx: false
                balances:
                  - owner: BfG7WYmravgBhNdWpGoiFmF8L1duw2vdqdDHiZid2hoJ
                    account: C2RjaMN2NeYAErS6KiBjPQhHCt95J8mCmmLiQqZXPisR
                    mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    program: spl-token
                    decimals: 6
                    pre: '96035743'
                    post: '71035743'
                    change: '-25000000'
                    cause: transfer
                  - owner: GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3
                    account: D9CEogjHA6CpS12F8St9zpSco7pQKJB5uR1RqDsuzQZk
                    mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    program: spl-token
                    decimals: 6
                    pre: '656962841913'
                    post: '656987841913'
                    change: '25000000'
                    cause: transfer
          x-parser-schema-id: <anonymous-schema-83>
        title: Token transfers notification
        example: |-
          {
            "type": "message",
            "room": "transfer:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
            "data": {
              "signature": "2VxcHt8HKSt2T2EuUZLyWPsEKz4H4BPreWV28aZDEzoaHG4Fsu232oKKeQqpVqsSYaf3vv8KN7UoZ4MPJA8vw9EF",
              "slot": 459159504,
              "timestamp": 1792483949,
              "commitment": "processed",
              "swapTx": false,
              "transfers": [
                {
                  "id": "2VxcHt8HKSt2T2EuUZLyWPsEKz4H4BPreWV28aZDEzoaHG4Fsu232oKKeQqpVqsSYaf3vv8KN7UoZ4MPJA8vw9EF:2:-1",
                  "signature": "2VxcHt8HKSt2T2EuUZLyWPsEKz4H4BPreWV28aZDEzoaHG4Fsu232oKKeQqpVqsSYaf3vv8KN7UoZ4MPJA8vw9EF",
                  "slot": 459159504,
                  "timestamp": 1792483949,
                  "commitment": "processed",
                  "instruction": 2,
                  "inner": -1,
                  "type": "spl",
                  "program": "spl-token",
                  "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                  "decimals": 6,
                  "amount": "25000000",
                  "uiAmount": "25",
                  "from": {
                    "address": "C2RjaMN2NeYAErS6KiBjPQhHCt95J8mCmmLiQqZXPisR",
                    "owner": "BfG7WYmravgBhNdWpGoiFmF8L1duw2vdqdDHiZid2hoJ",
                    "postBalance": "71035743"
                  },
                  "to": {
                    "address": "D9CEogjHA6CpS12F8St9zpSco7pQKJB5uR1RqDsuzQZk",
                    "owner": "GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3",
                    "postBalance": "656987841913"
                  },
                  "swapTx": false
                }
              ],
              "balances": [
                {
                  "owner": "BfG7WYmravgBhNdWpGoiFmF8L1duw2vdqdDHiZid2hoJ",
                  "account": "C2RjaMN2NeYAErS6KiBjPQhHCt95J8mCmmLiQqZXPisR",
                  "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                  "program": "spl-token",
                  "decimals": 6,
                  "pre": "96035743",
                  "post": "71035743",
                  "change": "-25000000",
                  "cause": "transfer"
                },
                {
                  "owner": "GachaNgyXTU3zFogQ8Z5jR2BLXs8215X2AtEH18VxJq3",
                  "account": "D9CEogjHA6CpS12F8St9zpSco7pQKJB5uR1RqDsuzQZk",
                  "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                  "program": "spl-token",
                  "decimals": 6,
                  "pre": "656962841913",
                  "post": "656987841913",
                  "change": "25000000",
                  "cause": "transfer"
                }
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: message
          - id: x-parser-message-name
            value: message
    bindings: []
    extensions: *ref_20
  - &ref_22
    id: unsubscribeTokenTransfers
    title: Unsubscribe token transfers
    description: Unsubscribe from token transfers
    type: receive
    messages:
      - &ref_25
        id: leave
        payload:
          - name: Unsubscribe from token transfers
            type: object
            properties:
              - name: type
                type: string
                description: leave
                required: true
              - name: room
                type: string
                description: >-
                  transfer:{mint} (append :enriched for token metadata, USD
                  values and wallet identities)
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: leave
              default: leave
              x-parser-schema-id: <anonymous-schema-81>
            room:
              type: string
              default: transfer:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
              description: >-
                transfer:{mint} (append :enriched for token metadata, USD values
                and wallet identities)
              x-parser-schema-id: <anonymous-schema-82>
          examples:
            - type: leave
              room: transfer:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          x-parser-schema-id: <anonymous-schema-80>
        title: Unsubscribe from token transfers
        example: |-
          {
            "type": "leave",
            "room": "transfer:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: leave
          - id: x-parser-message-name
            value: leave
    bindings: []
    extensions: *ref_20
sendOperations:
  - *ref_21
  - *ref_22
receiveOperations:
  - *ref_23
sendMessages:
  - *ref_24
  - *ref_25
receiveMessages:
  - *ref_26
extensions:
  - id: x-codeSamples
    value: *ref_27
  - id: x-parser-unique-object-id
    value: transferMint
securitySchemes:
  - id: apiKeyAuth
    name: apiKey
    type: httpApiKey
    description: >-
      API key for authentication. Include your Datastream key in the connection
      URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}
    in: header
    extensions: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.