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

How to retrieve the exchangeId when placing the order? Avoiding to fetch and loop from all of the open orders? #235

Open
Danilo-Araujo-Silva opened this issue Apr 29, 2022 · 0 comments

Comments

@Danilo-Araujo-Silva
Copy link

How about we return more information when placing an order instead of just the signature?
For example the exchangeId of the order?

For now, we only have the option to place an order and receive a signature at the end.
But we need to fetch all of the open orders, look in all of them using a predefined clientId,
and then collect the exchangeId. How can we avoid this?

For example, maybe we could have something like:

const {clientId, exchangeId, signature, status} = await market.placeOrder(connection, {
  owner,
  payer,
  side: 'buy', // 'buy' or 'sell'
  price: 123.45,
  size: 17.0,
  orderType: 'limit', // 'limit', 'ioc', 'postOnly'
});
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