com.shimari.fxtp
Class FXTP_Trader

java.lang.Object
  extended bycom.shimari.fxtp.FXTP_Trader

public class FXTP_Trader
extends java.lang.Object


Constructor Summary
FXTP_Trader(FXTP fxtpService, FXTP_UserId fxuser, java.lang.String fxPassword)
           
FXTP_Trader(FXTP fxtpService, java.lang.Integer uid, java.lang.String fxPassword)
           
 
Method Summary
 java.lang.String cancel(FXTP_Order order)
           
 java.lang.String[] close(FXTP_Claim claim)
          Determine our current position and issue whatever orders are necessary to close it.
 java.lang.String[] close(java.lang.String claimName)
           
 java.lang.Integer getId()
           
 FXTP_User getUser()
           
 FXTP_UserId getUserId()
           
 java.lang.String[] market(java.lang.String claimName)
          Determine a reasonable spread for claim and create trades
 void refresh()
          Ordinarily the FXTP_User we have is cached for up to 2 minutes.
 java.lang.String[] replaceAll(FXTP_Book book, FXTP_Order newOrder)
          Replace all our orders in the supplied book with the single new order that is provided.
 java.lang.String submit(FXTP_Order order)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FXTP_Trader

public FXTP_Trader(FXTP fxtpService,
                   java.lang.Integer uid,
                   java.lang.String fxPassword)
            throws FXTP_Exception

FXTP_Trader

public FXTP_Trader(FXTP fxtpService,
                   FXTP_UserId fxuser,
                   java.lang.String fxPassword)
Method Detail

refresh

public void refresh()
Ordinarily the FXTP_User we have is cached for up to 2 minutes. Calling this method will flush it from the cache.


getUser

public FXTP_User getUser()
                  throws FXTP_Exception
Throws:
FXTP_Exception

getUserId

public FXTP_UserId getUserId()

getId

public java.lang.Integer getId()

toString

public java.lang.String toString()

cancel

public java.lang.String cancel(FXTP_Order order)
                        throws FXTP_Exception
Throws:
FXTP_Exception

submit

public java.lang.String submit(FXTP_Order order)
                        throws FXTP_Exception
Throws:
FXTP_Exception

replaceAll

public java.lang.String[] replaceAll(FXTP_Book book,
                                     FXTP_Order newOrder)
                              throws FXTP_Exception
Replace all our orders in the supplied book with the single new order that is provided. If the new order is null they're all just cancelled. If the new order was already in the book it's left there, but all the other orders are cancelled.

Throws:
FXTP_Exception

market

public java.lang.String[] market(java.lang.String claimName)
                          throws FXTP_Exception
Determine a reasonable spread for claim and create trades

Throws:
FXTP_Exception

close

public java.lang.String[] close(java.lang.String claimName)
                         throws FXTP_Exception
Throws:
FXTP_Exception

close

public java.lang.String[] close(FXTP_Claim claim)
                         throws FXTP_Exception
Determine our current position and issue whatever orders are necessary to close it.

Throws:
FXTP_Exception