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

# Order Opened

> New DCA opened (`openDca` or `openDcaV2`).



## AsyncAPI

````yaml cn/datastream/dca.json dcaJupiterOpened
id: dcaJupiterOpened
title: Order Opened
description: New DCA opened (`openDca` or `openDcaV2`).
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: subscribeToJupiterDcaOpened
    title: Subscribe to jupiter dca opened
    description: Subscribe — order opened (`dca:jupiter:opened`)
    type: receive
    messages:
      - &ref_5
        id: joindcaJupiterOpened
        payload:
          - name: joindcaJupiterOpened
            description: Subscribe — order opened (`dca:jupiter:opened`)
            type: object
            properties:
              - name: type
                type: string
                description: join
                required: true
              - name: room
                type: string
                description: dca:jupiter:opened
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: join
              default: join
              x-parser-schema-id: <anonymous-schema-131>
            room:
              type: string
              const: dca:jupiter:opened
              default: dca:jupiter:opened
              x-parser-schema-id: <anonymous-schema-132>
          examples:
            - type: join
              room: dca:jupiter:opened
          x-parser-schema-id: <anonymous-schema-130>
        title: Joindca jupiter opened
        description: Subscribe — order opened (`dca:jupiter:opened`)
        example: |-
          {
            "type": "join",
            "room": "dca:jupiter:opened"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: joindcaJupiterOpened
          - id: x-parser-message-name
            value: joindcaJupiterOpened
    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.opened().on((data) => {
                console.log(data);
              });

              // sub.unsubscribe();
      - id: x-parser-unique-object-id
        value: dcaJupiterOpened
  - &ref_3
    id: receiveJupiterDcaOpenedConfirmation
    title: Receive jupiter dca opened confirmation
    description: Subscription confirmed
    type: send
    messages:
      - &ref_7
        id: dcaJupiterOpenedJoined
        payload:
          - name: dcaJupiterOpenedJoined
            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-134>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-135>
          examples:
            - type: joined
              room: dca:jupiter:opened
          x-parser-schema-id: <anonymous-schema-133>
        title: Dca jupiter opened joined
        description: Subscription confirmed
        example: |-
          {
            "type": "joined",
            "room": "dca:jupiter:opened"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: dcaJupiterOpenedJoined
          - id: x-parser-message-name
            value: dcaJupiterOpenedJoined
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: receiveJupiterDcaOpenedData
    title: Receive jupiter dca opened data
    description: Receive — order opened events
    type: send
    messages:
      - &ref_8
        id: dcaJupiterOpenedMessage
        payload:
          - name: dcaJupiterOpenedMessage
            description: Receive — order opened 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: Opened
                    required: false
                  - name: openInstruction
                    type: string
                    enumValues:
                      - openDca
                      - openDcaV2
                    required: false
                  - name: dcaKey
                    type: string
                    required: false
                  - name: userKey
                    type: string
                    required: false
                  - name: inputMint
                    type: string
                    required: false
                  - name: outputMint
                    type: string
                    required: false
                  - name: inDeposited
                    type: string
                    required: false
                  - name: cycleFrequency
                    type: string
                    required: false
                  - name: inAmountPerCycle
                    type: string
                    required: false
                  - name: createdAt
                    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-137>
            room:
              type: string
              x-parser-schema-id: <anonymous-schema-138>
            data:
              type: object
              properties:
                program:
                  type: string
                  x-parser-schema-id: <anonymous-schema-41>
                programId:
                  type: string
                  x-parser-schema-id: <anonymous-schema-42>
                address:
                  type: string
                  x-parser-schema-id: <anonymous-schema-43>
                owner:
                  type: string
                  x-parser-schema-id: <anonymous-schema-44>
                signature:
                  type: string
                  x-parser-schema-id: <anonymous-schema-45>
                slot:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-46>
                timestamp:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-47>
                eventIndex:
                  type: integer
                  x-parser-schema-id: <anonymous-schema-48>
                eventName:
                  type: string
                  const: Opened
                  x-parser-schema-id: <anonymous-schema-49>
                openInstruction:
                  type: string
                  enum:
                    - openDca
                    - openDcaV2
                  x-parser-schema-id: <anonymous-schema-50>
                dcaKey:
                  type: string
                  x-parser-schema-id: <anonymous-schema-51>
                userKey:
                  type: string
                  x-parser-schema-id: <anonymous-schema-52>
                inputMint:
                  type: string
                  x-parser-schema-id: <anonymous-schema-53>
                outputMint:
                  type: string
                  x-parser-schema-id: <anonymous-schema-54>
                inDeposited:
                  type: string
                  x-parser-schema-id: <anonymous-schema-55>
                cycleFrequency:
                  type: string
                  x-parser-schema-id: <anonymous-schema-56>
                inAmountPerCycle:
                  type: string
                  x-parser-schema-id: <anonymous-schema-57>
                createdAt:
                  type: string
                  x-parser-schema-id: <anonymous-schema-58>
                usd:
                  type: object
                  x-parser-schema-id: <anonymous-schema-59>
                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: DcaOpenedEvent
          examples:
            - type: message
              room: dca:jupiter:opened
              data:
                program: jupiter
                programId: DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M
                signature: 3abc...
                slot: 312456700
                timestamp: 1710000000000
                eventIndex: 0
                eventName: Opened
                openInstruction: openDcaV2
                dcaKey: 125PQmudTAXHUUGxtSra1xTzGu3NRCMbRU7i9cikEpwd
                userKey: 2FbbdMWfrfGpyyK4Wh76vyxbmDGcp3LxZNhwBwFpV5UK
                inputMint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                outputMint: So11111111111111111111111111111111111111112
                inDeposited: '1000000000000'
                cycleFrequency: '3600'
                inAmountPerCycle: '50000000'
                createdAt: '1710000000'
                address: 125PQmudTAXHUUGxtSra1xTzGu3NRCMbRU7i9cikEpwd
                owner: 2FbbdMWfrfGpyyK4Wh76vyxbmDGcp3LxZNhwBwFpV5UK
                usd:
                  inDepositedUsd: 1000
                  inAmountPerCycleUsd: 50
                prices:
                  EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v: 1
                  So11111111111111111111111111111111111111112: 142.5
                order:
                  program: jupiter
                  address: 125PQmudTAXHUUGxtSra1xTzGu3NRCMbRU7i9cikEpwd
                  status: pending
                  direction: mixed
                  pair: USDC → SOL
          x-parser-schema-id: <anonymous-schema-136>
        title: Dca jupiter opened message
        description: Receive — order opened events
        example: |-
          {
            "type": "message",
            "room": "dca:jupiter:opened",
            "data": {
              "program": "jupiter",
              "programId": "DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M",
              "signature": "3abc...",
              "slot": 312456700,
              "timestamp": 1710000000000,
              "eventIndex": 0,
              "eventName": "Opened",
              "openInstruction": "openDcaV2",
              "dcaKey": "125PQmudTAXHUUGxtSra1xTzGu3NRCMbRU7i9cikEpwd",
              "userKey": "2FbbdMWfrfGpyyK4Wh76vyxbmDGcp3LxZNhwBwFpV5UK",
              "inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "outputMint": "So11111111111111111111111111111111111111112",
              "inDeposited": "1000000000000",
              "cycleFrequency": "3600",
              "inAmountPerCycle": "50000000",
              "createdAt": "1710000000",
              "address": "125PQmudTAXHUUGxtSra1xTzGu3NRCMbRU7i9cikEpwd",
              "owner": "2FbbdMWfrfGpyyK4Wh76vyxbmDGcp3LxZNhwBwFpV5UK",
              "usd": {
                "inDepositedUsd": 1000,
                "inAmountPerCycleUsd": 50
              },
              "prices": {
                "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": 1,
                "So11111111111111111111111111111111111111112": 142.5
              },
              "order": {
                "program": "jupiter",
                "address": "125PQmudTAXHUUGxtSra1xTzGu3NRCMbRU7i9cikEpwd",
                "status": "pending",
                "direction": "mixed",
                "pair": "USDC → SOL"
              }
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: dcaJupiterOpenedMessage
          - id: x-parser-message-name
            value: dcaJupiterOpenedMessage
    bindings: []
    extensions: *ref_0
  - &ref_2
    id: unsubscribeFromJupiterDcaOpened
    title: Unsubscribe from jupiter dca opened
    description: Unsubscribe
    type: receive
    messages:
      - &ref_6
        id: leavedcaJupiterOpened
        payload:
          - name: leavedcaJupiterOpened
            description: Unsubscribe
            type: object
            properties:
              - name: type
                type: string
                description: leave
                required: true
              - name: room
                type: string
                description: dca:jupiter:opened
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - room
          properties:
            type:
              type: string
              const: leave
              default: leave
              x-parser-schema-id: <anonymous-schema-140>
            room:
              type: string
              const: dca:jupiter:opened
              default: dca:jupiter:opened
              x-parser-schema-id: <anonymous-schema-141>
          examples:
            - type: leave
              room: dca:jupiter:opened
          x-parser-schema-id: <anonymous-schema-139>
        title: Leavedca jupiter opened
        description: Unsubscribe
        example: |-
          {
            "type": "leave",
            "room": "dca:jupiter:opened"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: leavedcaJupiterOpened
          - id: x-parser-message-name
            value: leavedcaJupiterOpened
    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: dcaJupiterOpened
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: []

````