Interface TradeClient

    • Method Detail

      • readAvailableFixInitiatorSessions

        List<ActiveFixSession> readAvailableFixInitiatorSessions()
        Get the currently available FIX initiator sessions.
        Returns:
        a List<ActiveFixSession> value
      • getOpenOrders

        Collection<OrderSummary> getOpenOrders()
        Get open orders.
        Returns:
        a Collection<OrderSummary> value
      • sendOrders

        List<SendOrderResponse> sendOrders​(List<Order> inOrders)
        Submit the given orders.
        Parameters:
        inOrders - a List<Order> value
        Returns:
        a List<SendOrderResponse> value
      • sendOrderSuggestion

        void sendOrderSuggestion​(Suggestion inSuggestion)
        Submit a trade suggestion.
        Parameters:
        inSuggestion - a Suggestion value
      • sendOrder

        SendOrderResponse sendOrder​(Order inOrder)
        Submit the given order.
        Parameters:
        inOrder - an Order value
        Returns:
        a SendOrderResponse value
      • getPositionAsOf

        BigDecimal getPositionAsOf​(Date inDate,
                                   Instrument inInstrument)
        Returns the position of the supplied instrument based on reports generated and received on or before the supplied date in UTC.
        Parameters:
        inDate - a Date value
        inInstrument - an Instrument value
        Returns:
        a BigDecimal value
      • getAllPositionsAsOf

        Map<PositionKey<? extends Instrument>,​BigDecimal> getAllPositionsAsOf​(Date inDate)
        Returns all positions based on reports generated and received on or before the supplied date in UTC.
        Parameters:
        inDate - a Date value
        Returns:
        a Map<PositionKey<? extends Instrument>,BigDecimal> value
      • getOptionPositionsAsOf

        Map<PositionKey<Option>,​BigDecimal> getOptionPositionsAsOf​(Date inDate,
                                                                         String... inRootSymbols)
        Returns all positions of options with the given root symbols based on reports generated and received on or before the supplied date in UTC.
        Parameters:
        inDate - a Date value
        inRootSymbols - a String[] value
        Returns:
        a Map<PositionKey<Optiont>,BigDecimal> value
      • addReport

        void addReport​(HasFIXMessage inReport,
                       BrokerID inBrokerID)
        Add the given report to the system data flow.

        Reports added this way will be added to the system data bus. Reports will be persisted and become part of the system record. The report will be owned by the user logged in to the client.

        This will affect reported positions

        .
        Parameters:
        inReport - a HasFIXMessage value
        inBrokerID - a BrokerID value
      • deleteReport

        void deleteReport​(ReportID inReportId)
        Removes the given report from the persistent report store.

        Reports removed this way will not be added to the system data bus and no clients will receive this report.

        This will affect reported positions

        .
        Parameters:
        inReportId - a ReportID value
      • resolveSymbol

        Instrument resolveSymbol​(String inSymbol)
        Resolves the given symbol to an Instrument.
        Parameters:
        inSymbol - a String value
        Returns:
        an Instrument value
      • findRootOrderIdFor

        OrderID findRootOrderIdFor​(OrderID inOrderID)
        Find the root order ID for the order chain of the given order ID.
        Parameters:
        inOrderID - an OrderID value
        Returns:
        an OrderID value
      • getOptionRoots

        Collection<String> getOptionRoots​(String inUnderlying)
        Get the option roots for the given underlying.
        Parameters:
        inUnderlying - a String value
        Returns:
        a Collection<String> value
      • getUnderlying

        String getUnderlying​(String inOptionRoot)
        Get the underlying for the given root.
        Parameters:
        inOptionRoot - a String value
        Returns:
        a String value
      • getLatestExecutionReportForOrderChain

        ExecutionReport getLatestExecutionReportForOrderChain​(OrderID inOrderId)
        Get the most recent execution report for the order chain represented by the given order id.

        The given OrderID can be either from any order in the chain or the root order id for the chain. In either case, the most recent execution report for the entire chain will be returned, not the given order necessarily.

        If no execution report exists for any order in the given chain, the call will return null.

        Parameters:
        inOrderId - an OrderID value
        Returns:
        an ExecutionReport value or null
      • getReports

        CollectionPageResponse<Report> getReports​(PageRequest inPageRequest)
        Get reports with the given page request.
        Parameters:
        inPageRequest - a PageRequest value
        Returns:
        a CollectionPageResponse<Report> value
      • getAveragePriceFills

        CollectionPageResponse<AverageFillPrice> getAveragePriceFills​(PageRequest inPageRequest)
        Get average price fills values.
        Parameters:
        inPageRequest - a PageRequest value
        Returns:
        a CollectionPageResponse<AveragePriceFill> value
      • addSuggestionListener

        void addSuggestionListener​(SuggestionListener inSuggestionListener)
        Add the given suggestion listener.
        Parameters:
        inSuggestionListener - a SuggestionListener value
      • removeSuggestionListener

        void removeSuggestionListener​(SuggestionListener inSuggestionListener)
        Remove the given suggestion listener.
        Parameters:
        inSuggestionListener - a SuggestionListener value