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

Accept strings for action, priceType and expiration #90

Merged
merged 2 commits into from
Mar 8, 2018

Conversation

jsom
Copy link
Contributor

@jsom jsom commented Mar 5, 2018

Partners should be using the order capabilities to set action, priceType and expiration for an order object as part of the FV1 migration.

TODO:

  • Do we have a deprecation strategy or should we just rip out the enums now?
  • Do we have a changelog I need to update?

Hurr. I Android developer now.

@guillaumedebavelaere
Copy link
Contributor

Do we have a deprecation strategy or should we just rip out the enums now?

No, you can rip out the enums.

Do we have a changelog I need to update?

You can update the wiki to add the use of the capabilities.

There are also some unit tests you can run.

@jsom
Copy link
Contributor Author

jsom commented Mar 6, 2018

@guillaumedebavelaere updated with unit tests passing

Copy link
Contributor

@guillaumedebavelaere guillaumedebavelaere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, can you add in the wiki a sample code on how to fetch the capabilities?

order.setLimitPrice(20.0);
order.setExpiration(TradeItOrderExpiration.GOOD_FOR_DAY);
order.setPriceType(TradeItOrderPriceType.LIMIT);
order.setExpiration(equityCapabilities.getActions().get(0).getValue());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you forgot to set an action...

@jsom jsom force-pushed the jrs/use-order-caps-for-order branch from 8691f53 to 806014e Compare March 6, 2018 22:26
@jsom jsom force-pushed the jrs/use-order-caps-for-order branch from 806014e to d58bd9c Compare March 6, 2018 22:27
public enum TradeItOrderAction {
BUY("buy"),
SELL("sell"),
BUY_TO_COVER("buyTocover"),
BUY_TO_COVER("buyToCover"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it was a typo in the value?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jsom
Copy link
Contributor Author

jsom commented Mar 6, 2018

@guillaumedebavelaere I'll update the wiki when this gets merged.

Copy link
Contributor

@guillaumedebavelaere guillaumedebavelaere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

public enum TradeItOrderAction {
BUY("buy"),
SELL("sell"),
BUY_TO_COVER("buyTocover"),
BUY_TO_COVER("buyToCover"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@guillaumedebavelaere guillaumedebavelaere merged commit 2fbd446 into develop Mar 8, 2018
@guillaumedebavelaere guillaumedebavelaere deleted the jrs/use-order-caps-for-order branch March 8, 2018 14:38
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

Successfully merging this pull request may close these issues.

3 participants