> ## 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.

# Fee Collected

> Fee collected on DCA.



## AsyncAPI

````yaml cn/datastream/dca.json dcaJupiterCollectedFee
id: dcaJupiterCollectedFee
title: Fee Collected
description: Fee collected on DCA.
servers:
  - id: production
    protocol: wss
    host: datastream.solanatracker.io
    bindings: []
    variables:
      - id: apiKey
        description: Your unique API key from Data API subscription
        allowedValues: []
        examples: []
address: /
parameters: []
bindings: []
operations:
  - &ref_1
    id: subscribeToJupiterDcaCollectedFee
    title: Subscribe to jupiter dca collected fee
    description: Subscribe — fee collected (`dca:jupiter:collected_fee`)
    type: receive
    messages:
      - &ref_5
        id: joindcaJupiterCollectedFee
        payload:
          - name: joindcaJupiterCollectedFee
            description: Subscribe — fee collected (`dca:jupiter:collected_fee`)
            type: object
            properties:
              - name: type
                type: string
                description: join
                required: true
              - name: room
                type: string
                description: dca:jupiter:collected_fee
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: join
              default: join
              x-parser-schema-id: <anonymous-schema-191>
            room:
              type: string
              const: dca:jupiter:collected_fee
              default: dca:jupiter:collected_fee
              x-parser-schema-id: <anonymous-schema-192>
          examples:
            - type: join
              room: dca:jupiter:collected_fee
          x-parser-schema-id: <anonymous-schema-190>
        title: Joindca jupiter collected fee
        description: Subscribe — fee collected (`dca:jupiter:collected_fee`)
        example: |-
          {
            "type": "join",
            "room": "dca:jupiter:collected_fee"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: joindcaJupiterCollectedFee
          - id: x-parser-message-name
            value: joindcaJupiterCollectedFee
    bindings: []
    extensions: &ref_0
      - id: x-codeSamples
        value: &ref_9
          - lang: typescript
            label: SDK
            source: |
              import { Datastream } from '@solana-tracker/data-api';

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

              await dataStream.connect();

              const sub = dataStream.subscribe.dca.collectedFee().on((data) => {
                console.log(data);
              });

              // sub.unsubscribe();
      - id: x-parser-unique-object-id
        value: dcaJupiterCollectedFee
  - &ref_3
    id: receiveJupiterDcaCollectedFeeConfirmation
    title: Receive jupiter dca collected fee confirmation
    description: Subscription confirmed
    type: send
    messages:
      - &ref_7
        id: dcaJupiterCollectedFeeJoined
        payload:
          - name: dcaJupiterCollectedFeeJoined
            description: Subscription confirmed
            type: object
            properties:
              - name: type
                type: string
                description: joined
                required: false
              - name: room
                type: string
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: joined
              x-parser-schema-id: <anonymous-schema-194>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-195>
          examples:
            - type: joined
              room: dca:jupiter:collected_fee
          x-parser-schema-id: <anonymous-schema-193>
        title: Dca jupiter collected fee joined
        description: Subscription confirmed
        example: |-
          {
            "type": "joined",
            "room": "dca:jupiter:collected_fee"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: dcaJupiterCollectedFeeJoined
          - id: x-parser-message-name
            value: dcaJupiterCollectedFeeJoined
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: receiveJupiterDcaCollectedFeeData
    title: Receive jupiter dca collected fee data
    description: Receive — fee collection events
    type: send
    messages:
      - &ref_8
        id: dcaJupiterCollectedFeeMessage
        payload:
          - name: dcaJupiterCollectedFeeMessage
            description: Receive — fee collection events
            type: object
            properties:
              - name: type
                type: string
                description: message
                required: false
              - name: room
                type: string
                required: false
              - name: data
                type: object
                required: false
                properties:
                  - name: program
                    type: string
                    required: false
                  - name: programId
                    type: string
                    required: false
                  - name: address
                    type: string
                    required: false
                  - name: owner
                    type: string
                    required: false
                  - name: signature
                    type: string
                    required: false
                  - name: slot
                    type: integer
                    required: false
                  - name: timestamp
                    type: integer
                    required: false
                  - name: eventIndex
                    type: integer
                    required: false
                  - name: eventName
                    type: string
                    description: CollectedFee
                    required: false
                  - name: dcaKey
                    type: string
                    required: false
                  - name: userKey
                    type: string
                    required: false
                  - name: mint
                    type: string
                    required: false
                  - name: amount
                    type: string
                    required: false
                  - name: usd
                    type: object
                    required: false
                  - name: prices
                    type: object
                    description: Mint address to USD price at event time
                    required: false
                  - name: order
                    type: object
                    description: Full order object (same shape as Data API DCA order)
                    required: false
                    properties:
                      - name: program
                        type: string
                        required: false
                      - name: programId
                        type: string
                        required: false
                      - name: address
                        type: string
                        required: false
                      - name: owner
                        type: string
                        required: false
                      - name: status
                        type: string
                        required: false
                      - name: direction
                        type: string
                        required: false
                      - name: pair
                        type: string
                        required: false
                      - name: depositedUsd
                        type: number
                        required: false
                      - name: progressPercent
                        type: number
                        required: false
                      - name: input
                        type: object
                        required: false
                      - name: output
                        type: object
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: message
              x-parser-schema-id: <anonymous-schema-197>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-198>
            data:
              type: object
              properties:
                program:
                  type: string
                  x-parser-schema-id: <anonymous-schema-105>
                programId:
                  type: string
                  x-parser-schema-id: <anonymous-schema-106>
                address:
                  type: string
                  x-parser-schema-id: <anonymous-schema-107>
                owner:
                  type: string
                  x-parser-schema-id: <anonymous-schema-108>
                signature:
                  type: string
                  x-parser-schema-id: <anonymous-schema-109>
                slot:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-110>
                timestamp:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-111>
                eventIndex:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-112>
                eventName:
                  type: string
                  const: CollectedFee
                  x-parser-schema-id: <anonymous-schema-113>
                dcaKey:
                  type: string
                  x-parser-schema-id: <anonymous-schema-114>
                userKey:
                  type: string
                  x-parser-schema-id: <anonymous-schema-115>
                mint:
                  type: string
                  x-parser-schema-id: <anonymous-schema-116>
                amount:
                  type: string
                  x-parser-schema-id: <anonymous-schema-117>
                usd:
                  type: object
                  x-parser-schema-id: <anonymous-schema-118>
                prices:
                  type: object
                  additionalProperties:
                    type: number
                    x-parser-schema-id: <anonymous-schema-29>
                  description: Mint address to USD price at event time
                  x-parser-schema-id: DcaPricesMap
                order:
                  type: object
                  description: Full order object (same shape as Data API DCA order)
                  properties:
                    program:
                      type: string
                      x-parser-schema-id: <anonymous-schema-30>
                    programId:
                      type: string
                      x-parser-schema-id: <anonymous-schema-31>
                    address:
                      type: string
                      x-parser-schema-id: <anonymous-schema-32>
                    owner:
                      type: string
                      x-parser-schema-id: <anonymous-schema-33>
                    status:
                      type: string
                      x-parser-schema-id: <anonymous-schema-34>
                    direction:
                      type: string
                      x-parser-schema-id: <anonymous-schema-35>
                    pair:
                      type: string
                      x-parser-schema-id: <anonymous-schema-36>
                    depositedUsd:
                      type: number
                      nullable: true
                      x-parser-schema-id: <anonymous-schema-37>
                    progressPercent:
                      type: number
                      nullable: true
                      x-parser-schema-id: <anonymous-schema-38>
                    input:
                      type: object
                      x-parser-schema-id: <anonymous-schema-39>
                    output:
                      type: object
                      x-parser-schema-id: <anonymous-schema-40>
                  x-parser-schema-id: DcaOrderWs
              x-parser-schema-id: DcaCollectedFeeEvent
          examples:
            - type: message
              room: dca:jupiter:collected_fee
              data:
                program: jupiter
                programId: DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M
                signature: 8mno...
                slot: 312457300
                timestamp: 1710004000000
                eventIndex: 0
                eventName: CollectedFee
                dcaKey: 82jLLG1C8rbmr1ek4CKAg3TuQh977epmBLcJr8mB6NDo
                userKey: 2FbbdMWfrfGpyyK4Wh76vyxbmDGcp3LxZNhwBwFpV5UK
                mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                amount: '50000'
                address: 82jLLG1C8rbmr1ek4CKAg3TuQh977epmBLcJr8mB6NDo
                owner: 2FbbdMWfrfGpyyK4Wh76vyxbmDGcp3LxZNhwBwFpV5UK
                usd:
                  amountUsd: 0.05
                prices:
                  EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v: 1
                order:
                  program: jupiter
                  address: 82jLLG1C8rbmr1ek4CKAg3TuQh977epmBLcJr8mB6NDo
                  status: active
          x-parser-schema-id: <anonymous-schema-196>
        title: Dca jupiter collected fee message
        description: Receive — fee collection events
        example: |-
          {
            "type": "message",
            "room": "dca:jupiter:collected_fee",
            "data": {
              "program": "jupiter",
              "programId": "DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M",
              "signature": "8mno...",
              "slot": 312457300,
              "timestamp": 1710004000000,
              "eventIndex": 0,
              "eventName": "CollectedFee",
              "dcaKey": "82jLLG1C8rbmr1ek4CKAg3TuQh977epmBLcJr8mB6NDo",
              "userKey": "2FbbdMWfrfGpyyK4Wh76vyxbmDGcp3LxZNhwBwFpV5UK",
              "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "amount": "50000",
              "address": "82jLLG1C8rbmr1ek4CKAg3TuQh977epmBLcJr8mB6NDo",
              "owner": "2FbbdMWfrfGpyyK4Wh76vyxbmDGcp3LxZNhwBwFpV5UK",
              "usd": {
                "amountUsd": 0.05
              },
              "prices": {
                "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": 1
              },
              "order": {
                "program": "jupiter",
                "address": "82jLLG1C8rbmr1ek4CKAg3TuQh977epmBLcJr8mB6NDo",
                "status": "active"
              }
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: dcaJupiterCollectedFeeMessage
          - id: x-parser-message-name
            value: dcaJupiterCollectedFeeMessage
    bindings: []
    extensions: *ref_0
  - &ref_2
    id: unsubscribeFromJupiterDcaCollectedFee
    title: Unsubscribe from jupiter dca collected fee
    description: Unsubscribe
    type: receive
    messages:
      - &ref_6
        id: leavedcaJupiterCollectedFee
        payload:
          - name: leavedcaJupiterCollectedFee
            description: Unsubscribe
            type: object
            properties:
              - name: type
                type: string
                description: leave
                required: true
              - name: room
                type: string
                description: dca:jupiter:collected_fee
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: leave
              default: leave
              x-parser-schema-id: <anonymous-schema-200>
            room:
              type: string
              const: dca:jupiter:collected_fee
              default: dca:jupiter:collected_fee
              x-parser-schema-id: <anonymous-schema-201>
          examples:
            - type: leave
              room: dca:jupiter:collected_fee
          x-parser-schema-id: <anonymous-schema-199>
        title: Leavedca jupiter collected fee
        description: Unsubscribe
        example: |-
          {
            "type": "leave",
            "room": "dca:jupiter:collected_fee"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: leavedcaJupiterCollectedFee
          - id: x-parser-message-name
            value: leavedcaJupiterCollectedFee
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
  - *ref_2
receiveOperations:
  - *ref_3
  - *ref_4
sendMessages:
  - *ref_5
  - *ref_6
receiveMessages:
  - *ref_7
  - *ref_8
extensions:
  - id: x-codeSamples
    value: *ref_9
  - id: x-parser-unique-object-id
    value: dcaJupiterCollectedFee
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: []

````