You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to display a more useful transaction status for batch orders We will add a 'partial success' response code So that clients can differentiate between total failure, mixed success and failure, and complete success of a batch order submission
returns the following response (see bottom for complete output)
{"transaction": {"block": "274807","index": 0,// ..."code": 70,"cursor": "274807.0","command": {"nonce": "8130724558235875754","blockHeight": "274805","batchMarketInstructions": {"cancellations": [{"orderId": "d4d3320d69683b6d762c78ff4270a320878aa753599159fb6e15b88f1257040c","marketId": "9918b1e21f690bf65b6f288e69cbee67604dfe077ea9c2cca6149d5b5c96952d"},//...],"amendments": [],"submissions": [{"marketId": "9918b1e21f690bf65b6f288e69cbee67604dfe077ea9c2cca6149d5b5c96952d","price": "2557554","size": "4074","side": "SIDE_BUY","timeInForce": "TIME_IN_FORCE_GTC","expiresAt": "0","type": "TYPE_LIMIT","reference": "","peggedOrder": null},// ...]}},"signature": {// ...},"error": "0 (OrderError: Edit Not Allowed), 1 (OrderError: Edit Not Allowed), 17 (OrderError: Edit Not Allowed), 18 (OrderError: Edit Not Allowed), 19 (OrderError: Edit Not Allowed), 2 (OrderError: Edit Not Allowed), 20 (OrderError: Edit Not Allowed), 3 (OrderError: Edit Not Allowed)"}}
Code 70 means error, which is set if more than 0 submission in the batch fail. The only way to know which submission is to:
Split the error field on ,
Check the start digit of each error message
Iterate over each type (cancels, amends, orders) to work out which errored
This assumes that you have the full body of the batch when you have the error too. You probably will in this case. But it's fragile and prone to error.
Tasks
Add a new response code (replacing 70) that represents A batch that contains more than 0andless than num_submissions` errors
Ensure that a batch that contains all submissions that are errors still returns 70
Ensure that a batch that contains 0 errors returns 0
Feel free to add any API niceties at all that would make this easier while you're there.
Acceptance Criteria
A list of criteria (aim for 3!) that have to be met for this feature to be accepted as 'done' by the product owner.
It is possible to
Acceptance Criteria and Feature Test Scenarios can, in some cases, be closely related. If acceptance criteria become fully covered by feature test scenarios they can be removed leaving on acceptance criteria that can't be directly or fully proven with tests.
Test Scenarios
Detailed scenarios (1-3!) that can be executed as feature tests to verify that the feature has been implemented as expected. We use the follow format:
GIVEN (setup/context)
WHEN (action)
THEN (assertion) For example...
See here for more format information and examples.
Additional Details (optional)
Any additional information that provides context or gives information that will help us develop the feature.
Feature Overview
In order to display a more useful transaction status for batch orders
We will add a 'partial success' response code
So that clients can differentiate between total failure, mixed success and failure, and complete success of a batch order submission
e.g. this batch transaction:
returns the following response (see bottom for complete output)
Code
70
meanserror
, which is set ifmore than 0
submission in the batch fail. The only way to know which submission is to:error
field on,
This assumes that you have the full body of the batch when you have the error too. You probably will in this case. But it's fragile and prone to error.
Tasks
70
) that representsA batch that contains
more than 0and
less than num_submissions` errors70
0
Acceptance Criteria
A list of criteria (aim for 3!) that have to be met for this feature to be accepted as 'done' by the product owner.
Acceptance Criteria and Feature Test Scenarios can, in some cases, be closely related. If acceptance criteria become fully covered by feature test scenarios they can be removed leaving on acceptance criteria that can't be directly or fully proven with tests.
Test Scenarios
Detailed scenarios (1-3!) that can be executed as feature tests to verify that the feature has been implemented as expected. We use the follow format:
GIVEN (setup/context)
WHEN (action)
THEN (assertion) For example...
See here for more format information and examples.
Additional Details (optional)
Any additional information that provides context or gives information that will help us develop the feature.
Examples (optional)
The text was updated successfully, but these errors were encountered: