Open Danilo-Araujo-Silva opened 2 years ago
How can we place several orders in just one transaction? Guaranteeing this way that it returns success only if all of them succeeded?
For example, we have this documentation here: https://github.com/project-serum/serum-ts/tree/master/packages/serum
But we only have an example to be placing a single order at a time, how can we achieve the proposed above? This is very needed for some cases.
Maybe we could have something like:
await market.placeOrder(connection, [ { owner, payer, side: 'buy', // 'buy' or 'sell' price: 123.45, size: 17.0, orderType: 'limit', // 'limit', 'ioc', 'postOnly' }, { owner, payer, side: 'buy', // 'buy' or 'sell' price: 123.45, size: 17.0, orderType: 'limit', // 'limit', 'ioc', 'postOnly' }, ... ]);
How can we place several orders in just one transaction? Guaranteeing this way that it returns success only if all of them succeeded?
For example, we have this documentation here: https://github.com/project-serum/serum-ts/tree/master/packages/serum
But we only have an example to be placing a single order at a time, how can we achieve the proposed above? This is very needed for some cases.
Maybe we could have something like: