Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JASA API #25

Open
rajithsiriwardana opened this issue Aug 28, 2013 · 1 comment
Open

JASA API #25

rajithsiriwardana opened this issue Aug 28, 2013 · 1 comment
Assignees

Comments

@rajithsiriwardana
Copy link
Member

Isolate JASA simulation environment and provide a API

MaketFacade

public interface MarketFacade {

/*Simulation related*/

//TODO start simulation

public boolean pauseSimulation();

public boolean terminateSimulation();

public boolean resumeSimulation();

/**
 * @param initFunds initial account balance
 * @return spawned AgentId
 */
public String AddUserAgent(double initFunds);

public List<Report> getReports();


/*User related*/

/**
 *
 * @param humanAgentId corresponding agentId
 * @param stockId security id
 * @param quantity stock quantity
 * @param isBuy buy = true, sell=false;
 * @param price single stock price
 * @return adding order successful
 */
public boolean putLimitOrder(String humanAgentId, String stockId, int quantity,
                        double price, boolean isBuy);

/**
 *
 * @param humanAgentId corresponding agentId
 * @param stockId security id
 * @param quantity stock quantity
 * @param isBuy buy = true, sell=false;
 * @return adding order successful
 */
public boolean putMarketOrder(String humanAgentId, String stockId, int quantity,
                              boolean isBuy);

//TODO throwing an event when the orders get matched

public HashMap<String, Integer> getUserAgentAssets(String humanAgentId);

public double getUserAgentFunds(String humanAgentId);

}

@rajithsiriwardana
Copy link
Member Author

rajithsiriwardana added a commit that referenced this issue Aug 29, 2013
rajithsiriwardana added a commit that referenced this issue Aug 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant