Skip to content

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

@Danilo-Araujo-Silva

Description

@Danilo-Araujo-Silva

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'
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions