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

# Subscribe Transfers

> Subscribe to real-time token and native transfers.

<Callout icon="activity" color="#FFC107" iconType="regular">To keep the connection alive, you need to send a ping message every less than 60 seconds.</Callout>

You can subscribe and unsubscribe to any amount of topics you want on a single connection.

To update a topic subscription, you can resubscribe to the same topic with new parameters.

Incoming messages will include a `topic` field that you can use to filter the type of message.

<Tip>When **subscribing**, you can leave any of the array fields of the `params` object empty to subscribe to all entries for that field.</Tip>
<Tip>When **unsubscribing**, you can leave the `topics` array empty to unsubscribe from all topics.</Tip>


## AsyncAPI

````yaml dist/asyncapi.yml solanaAssetsTransfersSubscription
id: solanaAssetsTransfersSubscription
title: Transfers Subscription
description: Subscribe to real-time token and native transfers events.
servers:
  - id: production
    protocol: wss
    host: refract.prismapi.io
    bindings: []
    variables: []
address: /v1/ws
parameters: []
bindings: []
operations:
  - &ref_2
    id: receiveSolanaAssetsTransfersSubscription
    title: Receive solana assets transfers subscription
    type: send
    messages:
      - &ref_5
        id: transfersSubscriptionMessage
        contentType: application/json
        payload:
          - name: Transfers Message
            description: Message containing the transfer data.
            type: object
            properties:
              - name: topic
                type: string
                enumValues:
                  - solana.dex.prices
                  - solana.dex.swaps
                  - solana.dex.trades
                  - solana.dex.pools
                  - solana.dex.profiles.wallet
                  - solana.dex.profiles.token
                  - solana.dex.profiles.position
                  - solana.assets.transfers
                  - solana.assets.balance-changes
                required: false
              - name: data
                type: object
                required: false
                properties:
                  - name: id
                    type: integer
                    required: false
                  - name: transfer_type
                    type: string
                    enumValues:
                      - spl_token_transfer
                      - native_transfer
                    required: false
                  - name: stack_height
                    type: integer
                    required: false
                  - name: token_address
                    type: string
                    required: false
                  - name: from_address
                    type: string
                    required: false
                  - name: to_address
                    type: string
                    required: false
                  - name: amount
                    type: number
                    required: false
                  - name: usd_amount
                    type: number
                    required: false
                  - name: block_slot
                    type: integer
                    required: false
                  - name: block_time
                    type: string
                    required: false
                  - name: tx_hash
                    type: string
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            topic:
              x-fern-type-name: SubscriptionTopicEnum
              type: string
              enum:
                - solana.dex.prices
                - solana.dex.swaps
                - solana.dex.trades
                - solana.dex.pools
                - solana.dex.profiles.wallet
                - solana.dex.profiles.token
                - solana.dex.profiles.position
                - solana.assets.transfers
                - solana.assets.balance-changes
              x-parser-schema-id: <anonymous-schema-408>
            data:
              x-fern-type-name: SolanaAssetsTransferMessage
              type: object
              properties:
                id:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-410>
                transfer_type:
                  x-fern-type-name: SolanaAssetsTransferTypeEnum
                  type: string
                  enum:
                    - spl_token_transfer
                    - native_transfer
                  x-parser-schema-id: <anonymous-schema-411>
                stack_height:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-412>
                token_address:
                  type: string
                  x-parser-schema-id: <anonymous-schema-413>
                from_address:
                  type: string
                  x-parser-schema-id: <anonymous-schema-414>
                to_address:
                  type: string
                  x-parser-schema-id: <anonymous-schema-415>
                amount:
                  type: number
                  x-parser-schema-id: <anonymous-schema-416>
                usd_amount:
                  type: number
                  x-parser-schema-id: <anonymous-schema-417>
                block_slot:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-418>
                block_time:
                  type: string
                  format: date-time
                  x-parser-schema-id: <anonymous-schema-419>
                tx_hash:
                  type: string
                  x-parser-schema-id: <anonymous-schema-420>
              x-parser-schema-id: <anonymous-schema-409>
          x-parser-schema-id: <anonymous-schema-407>
        title: Transfers Message
        description: Message containing the transfer data.
        example: |-
          {
            "topic": "solana.assets.transfers",
            "data": {
              "id": 1,
              "transfer_type": "spl_token_transfer",
              "stack_height": 2,
              "token_address": "13NyGvtCdrBUqRSRHJUfw6yXFLoZ9VBu27RL8fq4daos",
              "from_address": "CsVdJ8WH8Q9eHSTRpwtwN3TYApm24QnLKYUMNxJ3DaED",
              "to_address": "J6pQQ3FAcJQeWPPGppWRb4nM8jU3wLyYbRrLh7feMfvd",
              "amount": 256.4115815,
              "usd_amount": 35.323303,
              "block_slot": 382423380,
              "block_time": "2026-05-28T12:00:00Z",
              "tx_hash": "3gg6eQPa2PJ4LkGnd12EoEBHmSB3R3fr9h6MYUaaDAjeZBL5bb9paUxn521Z9d3ScWES4cVKLsexwEvo3dUoqhEs"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: transfersSubscriptionMessage
          - id: x-parser-message-name
            value: transfersSubscriptionMessage
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: solanaAssetsTransfersSubscription
  - &ref_1
    id: sendSolanaAssetsTransfersSubscription
    title: Send solana assets transfers subscription
    type: receive
    messages:
      - &ref_3
        id: subscribeTransfers
        contentType: application/json
        payload:
          - name: Subscribe Transfers
            description: Subscribe to transfer updates.
            type: object
            properties:
              - name: method
                type: string
                enumValues:
                  - subscribe
                  - unsubscribe
                required: true
              - name: topic
                type: string
                enumValues:
                  - solana.dex.prices
                  - solana.dex.swaps
                  - solana.dex.trades
                  - solana.dex.pools
                  - solana.dex.profiles.wallet
                  - solana.dex.profiles.token
                  - solana.dex.profiles.position
                  - solana.assets.transfers
                  - solana.assets.balance-changes
                required: true
              - name: params
                type: object
                required: true
                properties:
                  - name: from_addresses
                    type: array
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: to_addresses
                    type: array
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - method
            - topic
            - params
          properties:
            method:
              x-fern-type-name: SubscriptionMethodEnum
              type: string
              enum:
                - subscribe
                - unsubscribe
              x-parser-schema-id: <anonymous-schema-422>
            topic:
              x-fern-type-name: SubscriptionTopicEnum
              type: string
              enum:
                - solana.dex.prices
                - solana.dex.swaps
                - solana.dex.trades
                - solana.dex.pools
                - solana.dex.profiles.wallet
                - solana.dex.profiles.token
                - solana.dex.profiles.position
                - solana.assets.transfers
                - solana.assets.balance-changes
              x-parser-schema-id: <anonymous-schema-423>
            params:
              type: object
              properties:
                from_addresses:
                  type: array
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-426>
                  x-parser-schema-id: <anonymous-schema-425>
                to_addresses:
                  type: array
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-428>
                  x-parser-schema-id: <anonymous-schema-427>
              x-parser-schema-id: <anonymous-schema-424>
          x-parser-schema-id: <anonymous-schema-421>
        title: Subscribe Transfers
        description: Subscribe to transfer updates.
        example: |-
          {
            "method": "subscribe",
            "topic": "solana.assets.transfers",
            "params": {
              "from_addresses": [
                "13NyGvtCdrBUqRSRHJUfw6yXFLoZ9VBu27RL8fq4daos"
              ],
              "to_addresses": [
                "13NyGvtCdrBUqRSRHJUfw6yXFLoZ9VBu27RL8fq4daos"
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeTransfers
          - id: x-parser-message-name
            value: subscribeTransfers
      - &ref_4
        id: unsubscribeTransfers
        contentType: application/json
        payload:
          - name: Unsubscribe Transfers
            description: Unsubscribe from transfer updates.
            type: object
            properties:
              - name: method
                type: string
                enumValues:
                  - subscribe
                  - unsubscribe
                required: true
              - name: topics
                type: array
                description: >-
                  The topics to unsubscribe from. Leave empty to unsubscribe
                  from all topics.
                required: true
                properties:
                  - name: item
                    type: string
                    enumValues:
                      - solana.dex.prices
                      - solana.dex.swaps
                      - solana.dex.trades
                      - solana.dex.pools
                      - solana.dex.profiles.wallet
                      - solana.dex.profiles.token
                      - solana.dex.profiles.position
                      - solana.assets.transfers
                      - solana.assets.balance-changes
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - method
            - topics
          properties:
            method:
              x-fern-type-name: SubscriptionMethodEnum
              type: string
              enum:
                - subscribe
                - unsubscribe
              x-parser-schema-id: <anonymous-schema-430>
            topics:
              type: array
              description: >-
                The topics to unsubscribe from. Leave empty to unsubscribe from
                all topics.
              items:
                x-fern-type-name: SubscriptionTopicEnum
                type: string
                enum:
                  - solana.dex.prices
                  - solana.dex.swaps
                  - solana.dex.trades
                  - solana.dex.pools
                  - solana.dex.profiles.wallet
                  - solana.dex.profiles.token
                  - solana.dex.profiles.position
                  - solana.assets.transfers
                  - solana.assets.balance-changes
                x-parser-schema-id: <anonymous-schema-432>
              x-parser-schema-id: <anonymous-schema-431>
          x-parser-schema-id: <anonymous-schema-429>
        title: Unsubscribe Transfers
        description: Unsubscribe from transfer updates.
        example: |-
          {
            "method": "unsubscribe",
            "topics": [
              "solana.assets.transfers"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribeTransfers
          - id: x-parser-message-name
            value: unsubscribeTransfers
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
  - *ref_4
receiveMessages:
  - *ref_5
extensions:
  - id: x-parser-unique-object-id
    value: solanaAssetsTransfersSubscription
securitySchemes:
  - id: WsApiKeyAuth
    name: x-api-key
    type: httpApiKey
    description: >
      Your Prism API key. You can get one for free in the [Prism
      Dashboard](https://dashboard.prismapi.io).

      You must include it in the `x-api-key` query parameter.
    in: query
    extensions: []

````