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 ... support more timely FE behaviour on stop orders We will build an API to... provide a the stop order API via subscription So that ... Console and wallet can provide better UX for users to see the result of their orders in toasts
Both a normal websocket stream and a GraphQL subscription
For a normal orders subscription we also get a 'snapshot' emitted as the first event. While we don't rely on this on the frontend currently, it would be nice if we also had this for stop orders as we can make some optimizations using it.
Websocket
Endpoint: api/v2/stream/stoporders
Query parameters
marketIds: string[]
partyIds: string[]
GraphQL
type StopOrderUpdate {
... # Same as StopOrder where possible. Perhaps nested order field would need to change to orderId: ID!
}
type Subscription {
stopOrders(
filter: StopOrderFilter # Perhaps the liveOnly field is not applicable for the subspcription
): [StopOrderUpdate!]
}
Filtering requirements (inputs)
All the same filters as the existing stop order API
For graphql StopOrderFilter should be used
For a raw websocket stream required queryParameters would be
API Overview
In order to ... support more timely FE behaviour on stop orders
We will build an API to... provide a the stop order API via subscription
So that ... Console and wallet can provide better UX for users to see the result of their orders in toasts
Specs
Spec name to spec or section within a spec
API request details
Websocket
api/v2/stream/stoporders
GraphQL
Filtering requirements (inputs)
marketIds: string[]
partyIds: string[]
Sample API output (optional)
Websocket stream
GraphQL
Questions
order: Order
problematic? PerhapsorderId: ID
would be more consistent?API test scenarios
Detailed scenarios that can be executed as feature tests to verify that the API has been implemented as expected.
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.
The text was updated successfully, but these errors were encountered: