DriveWealth Transactions API

The Transactions API from DriveWealth — 2 operation(s) for transactions.

OpenAPI Specification

drivewealth-transactions-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: DriveWealth Accounts Transactions API
  version: '1.0'
servers:
- url: https://bo-api.drivewealth.io/back-office
  description: Sandbox server (Uses test data)
- url: https://bo-api.drivewealth.net/back-office
  description: Production Server (Uses LIVE data)
tags:
- name: Transactions
  x-displayName: Transactions
paths:
  /accounts/{accountID}/summary/transactions:
    get:
      deprecated: true
      tags:
      - Transactions
      parameters:
      - in: path
        name: accountID
        schema:
          $ref: '#/components/schemas/accountID'
        required: true
      summary: Retrieve Account Transaction Summary
      description: 'Retrives an Account Transaction Summary details by accountID.


        This API has been deprecated. Instead, use List Account Transactions to retrieve historical Transactions. To retrieve orders, use List Account historical Orders.'
      responses:
        '200':
          description: Retrieving Account Transaction Summary details was Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionSummaryRes'
      security:
      - bearerAuth: []
        dwAppKey: []
      - sessionToken: []
        dwAppKey: []
  /accounts/{accountID}/transactions:
    get:
      tags:
      - Transactions
      parameters:
      - in: path
        name: accountID
        schema:
          $ref: '#/components/schemas/accountID'
        required: true
      - in: query
        name: from
        schema:
          type: string
        required: true
        example: '2022-06-16'
        description: Date start time of data. Follow [ISO 8601 standard](https://en.wikipedia.org/wiki/ISO_8601)
      - in: query
        name: to
        schema:
          type: string
        required: true
        example: '2022-07-16'
        description: Date end time of data. Follow [ISO 8601 standard](https://en.wikipedia.org/wiki/ISO_8601)
      - in: query
        name: limit
        schema:
          type: number
        required: false
        example: 25
        description: The number of transactions to be returned per page.
      - in: query
        name: offset
        schema:
          type: string
        required: false
        example: '2022-07-16'
        description: Follow [ISO 8601 standard](https://en.wikipedia.org/wiki/ISO_8601)
      - in: query
        name: direction
        schema:
          type: string
          enum:
          - prev
          - next
        required: false
        example: prev
        description: The direction of pagination
      summary: List Account Transactions
      description: Retrieves a list of Account Transactions by accountID.
      responses:
        '200':
          description: Retrieving a list of Account Transactions was Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionRes'
      security:
      - bearerAuth: []
        dwAppKey: []
      - sessionToken: []
        dwAppKey: []
components:
  schemas:
    dividend:
      type: object
      properties:
        type:
          type: string
          example: CASH
          description: The dividend type, whether a cash or stock dividend.
          enum:
          - CASH
          - STOCK
          - RETURN_OF_CAPITAL
          - DISTRIBUTION_LONG
          - DISTRIBUTION_SHORT
          - OTHER
        amountPerShare:
          type: number
          example: 0.65
          description: The amount of the dividend issued, per share.
        taxCode:
          type: string
          example: FULLY_TAXABLE
          description: Whether the dividend is taxable or not.
          enum:
          - FULLY_TAXABLE
          - NON_TAXABLE
          - TAX_EXEMPT
          - 'null'
    currency:
      type: string
      example: USD
      description: The name of the currency in abbreviation form.
      enum:
      - USD
    created:
      type: string
      example: '2022-12-11T22:28:21.810Z'
      description: ''
    limitPrice:
      type: number
      example: null
      description: The price set for the limit order.
    TransactionSummaryRes:
      type: object
      properties:
        accountID:
          $ref: '#/components/schemas/accountID'
        accountNo:
          $ref: '#/components/schemas/accountNo'
        tradingType:
          $ref: '#/components/schemas/tradingType'
        updated:
          type: string
          example: '2017-06-16T15:35:30.617Z'
          description: Time of last update.
        transactions:
          type: array
          description: An Array of transactions.
          items:
            oneOf:
            - $ref: '#/components/schemas/transactionObj'
    sideAbbreviated:
      type: string
      example: B
      description: The side of the order.
      enum:
      - B
      - S
      - BUY_OPEN
      - BUY_CLOSE
      - SELL_OPEN
      - SELL_CLOSE
    accountID:
      type: string
      example: cc07f91b-7ee1-4868-b8fc-823c70a1b932.1407775317759
      description: The user's unique account identifier.
    orderID:
      type: string
      example: IC.0e352bb7-9869-4233-9861-9673544efedd
      description: A unique DriveWealth order identifier created when an order is placed.
    orderCumulativeQuantity:
      type: number
      example: 0.7219
      description: The amount of shares currently being transacted; larger orders may execute in chunks.
    instrumentType:
      type: string
      example: EQUITY
      description: The classification of the instrument.
      enum:
      - EQUITY
      - ALTERNATIVE_ASSET
      - MUTUAL_FUND
      - DEBT
      - OPTION
      - CRYPTO
    finTranID:
      type: string
      example: EF.a935f686-5567-4e10-9e71-261314207c0b
      description: The internal and unique transaction identification number.
    orderNo:
      type: string
      example: ICDU023727
      description: A unique, human-readable DriveWealth order number.
    orderQuantity:
      type: number
      example: 0.7219
      description: The amount of the instrument in shares.
    accountType:
      type: string
      example: LIVE
      description: The type of account that has been created.
      enum:
      - LIVE
    TransactionRes:
      type: array
      description: A list of transactions.
      items:
        oneOf:
        - $ref: '#/components/schemas/Transaction'
    orderStatusNumber:
      type: number
      example: 2
      description: The current status of the order, represented as a number.
      enum:
      - 0
      - 1
      - 2
      - 4
      - 6
      - 7
      - 8
    instrumentSymbol:
      type: string
      nullable: true
      example: MS
      description: The ticker symbol of the Instrument. Debt Instruments and Global Mutual Funds do not have symbols and are referred to buy their `instrumentID` or `ISIN`.
    instrumentCUSIP:
      description: 'CUSIP stands for `Committee on Uniform Securities Identification Procedures`.

        A CUSIP number identifies most financial instruments, including: stocks of all registered U.S. and Canadian companies, commercial paper, and U.S. government and municipal bonds.

        The CUSIP system facilitates the clearance and settlement process of securities.

        CUSIP numbers consist of nine characters (including letters and numbers) that uniquely identify a company or issuer and the type of financial instrument.

        A similar system is used to identify foreign securities (`CUSIP International Numbering System or CINS`).

        CINS employs the same nine character identifier as CUSIP, but also contains a letter in the first position to signify the issuer''s country or geographic region.

        '
      type: string
      minLength: 9
      maxLength: 9
      example: E09876AA7
    tradingType:
      type: string
      example: CASH
      description: The type of trading the account will participate in.
      enum:
      - CASH
      - MARGIN
    transactionObj:
      type: object
      properties:
        orderId:
          $ref: '#/components/schemas/orderID'
        orderNo:
          $ref: '#/components/schemas/orderNo'
        symbol:
          $ref: '#/components/schemas/instrumentSymbol'
        ISIN:
          $ref: '#/components/schemas/instrumentISIN'
        CUSIP:
          $ref: '#/components/schemas/instrumentCUSIP'
        instrumentType:
          $ref: '#/components/schemas/instrumentType'
        cumQty:
          $ref: '#/components/schemas/orderCumulativeQuantity'
        orderStatus:
          $ref: '#/components/schemas/orderStatusNumber'
        orderType:
          type: string
          example: '1'
          description: The type of order that is placed.
          enum:
          - '0'
          - '1'
          - '2'
          - '3'
          - '4'
          - '6'
          - '7'
          - m
        orderQty:
          $ref: '#/components/schemas/orderQuantity'
        limitPrice:
          $ref: '#/components/schemas/limitPrice'
        stopPrice:
          $ref: '#/components/schemas/stopPrice'
        executedPrice:
          type: number
          example: 122.47
          description: The price at which the order was executed.
        side:
          $ref: '#/components/schemas/sideAbbreviated'
        createdWhen:
          $ref: '#/components/schemas/created'
        updatedWhen:
          type: string
          example: '2017-06-16T15:35:30.617Z'
          description: NEEDS DESCRIPTION
        updatedReason:
          type: string
          example: market_order-buy-new
          description: A reason for the update.
        commission:
          type: number
          example: 0
          description: Commission for the transaction if applicable.
        commissionDesc:
          type: string
          example: Free
          description: A short description about the commission.
        isoTimeRestingOrderExpires:
          type: string
          example: null
          description: The time when the limit order expires.
        executedWhen:
          type: string
          example: 017-06-16T15:35:27.856Z
          description: The time when the transaction was executed.
        realizedPL:
          type: number
          example: 3564.38
          description: Realized profit and loss for position.
        orderCashAmt:
          type: number
          example: null
          description: The amount of cash requested for an order (fractional shares only).
        salesCredit:
          $ref: '#/components/schemas/SalesCredit'
        currency:
          $ref: '#/components/schemas/currency'
    accountNo:
      type: string
      example: DWBG000052
      description: The user's unique account number, that is human readable.
    instrumentISIN:
      description: An `International Securities Identification Number` (ISIN) uniquely identifies a security. Its structure is defined in ISO 6166. ISINs are commonly used when an Instrument does not have a `symbol`, such as Debt Instruments and Global Mutual Funds.
      type: string
      minLength: 12
      maxLength: 14
      example: US023135BX34
    Transaction:
      type: object
      properties:
        accountAmount:
          type: number
          example: -890.12
          description: The amount of the transaction.
        accountBalance:
          type: number
          example: 49984.44
          description: The equity value of the account at the time of the transaction.
        accountType:
          $ref: '#/components/schemas/accountType'
        dividend:
          $ref: '#/components/schemas/dividend'
        dividendTax:
          type: object
          description: An object containing details of a dividend withholding.
          properties:
            rate:
              type: number
              description: The Witholding rate associated with the dividend payment.
              example: 0.15
            type:
              type: string
              description: The type of tax associated with the withholding
              example: FOREIGN_TAX
              enum:
              - FOREIGN_TAX
              - NON_RESIDENTIAL_ALIEN
              - OTHER
        dnb:
          type: boolean
          example: false
          description: If false, the transaction was sent to inteliclear. Default is false.
        comment:
          type: string
          example: Buy 0.0259 shares of AMZN at 1003.13 FULL fill
          description: A comment describing the transaction
        finTranID:
          $ref: '#/components/schemas/finTranID'
        finTranTypeID:
          $ref: '#/components/schemas/finTranTypeID'
        feeSec:
          type: number
          description: The sec fee charged to an applicable sell order. Reference your fee schedule for SEC fee amounts per share.
          example: 0.01
        feeTaf:
          type: number
          description: Trading activity fee (TAF) for an applicable sell order. Reference your fee schedule for TAF fee amounts per share.
          example: 0.01
        feeBase:
          type: number
          description: The net fee amount of TAF and SEC Fees for a given sell order.
          example: 0.02
        feeXtraShares:
          type: number
          description: Commission charged when the share quantity is greater than the base share amount. Reference your commission schedule for more info.
          example: 0.05
        feeExchange:
          type: number
          description: An Exchange Fee applied to an order.
          example: 0.02
        fillQty:
          type: number
          description: The quantity of shares filled for a transaction.
          example: 1.02387115
        fillPx:
          type: number
          description: The fill price of the order for the given transaction.
          example: 17.44
        orderID:
          $ref: '#/components/schemas/orderID'
        mergerAcquisition:
          type: object
          description: An object containing details of a corporate event, such as a merger or an acquisition.
          properties:
            type:
              type: string
              description: The transaction result of the corporate event
              example: EXCHANGE STOCK_CASH
              enum:
              - EXCHANGE_STOCK_CASH
              - ADD_SHARES
              - ADD_SHARES_CASH
              - ADD_SHARES_REMOVE_CASH
              - REMOVE_SHARES
              - REMOVE_SHARES_CASH
              - REMOVE_SHARES_ADD_CASH
            acquirer:
              type: object
              description: Object containing details of the acquiring company
              properties:
                id:
                  $ref: '#/components/schemas/instrumentID'
                symbol:
                  type: string
                  description: The instrument ticker symbol.
                  example: AAPL
                name:
                  type: string
                  description: The name of the acquiring company
                  example: Apple
            acquiree:
              type: object
              description: Object containing details of the company being acquired
              properties:
                id:
                  $ref: '#/components/schemas/instrumentID'
                symbol:
                  type: string
                  description: The instrument ticker symbol.
                  example: TSLA
                name:
                  type: string
                  description: The name of the company being acquired
                  example: TSLA
        positionDelta:
          type: number
          description: The delta in the number of shares due to the corporate action.
          example: 0.18
    finTranTypeID:
      type: string
      example: JNLC
      description: The abbreviated transaction type identifier.
      enum:
      - CSR
      - CSD
      - FEE
      - JNLC
      - CADJ
      - INT
      - SPUR
      - SSAL
      - MERGER_ACQUISITION
      - DIV
      - DIVTAX
      - DIVNRA
      - STCK
      - COMM
      - SPINOFF
      - STOCK_SPLIT
      - ACATS_CASH
      - ACATS_STOCK
      - CCPUR
      - CCSAL
      - SLIP
      - DIVM
      - PTP_WITHHOLDING
    SalesCredit:
      type: object
      description: If set, the unit price will be marked up or marked down based on the prescribed amount. Only applicable to Orders for Debt Instruments.
      properties:
        currency:
          $ref: '#/components/schemas/currency'
        amount:
          type: integer
          example: 14
          description: The sales credit amount in cents.
    instrumentID:
      type: string
      format: uuid
      example: 3fb1e8a9-f7d5-4d90-95e2-43e7326b5636
      description: 'A unique ID created by DriveWealth to identify a specific instrument. '
    stopPrice:
      type: number
      example: 200
      description: The stop price of a limit order.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    dwAppKey:
      type: apiKey
      in: header
      name: dw-client-app-key
    sessionToken:
      type: apiKey
      in: header
      name: dw-auth-token