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

Enhance positions API to take an array of keys as inputs #11084

Closed
1 task
Tracked by #11019
JonRay15 opened this issue Apr 9, 2024 · 2 comments · Fixed by #11129
Closed
1 task
Tracked by #11019

Enhance positions API to take an array of keys as inputs #11084

JonRay15 opened this issue Apr 9, 2024 · 2 comments · Fixed by #11129
Assignees

Comments

@JonRay15
Copy link

JonRay15 commented Apr 9, 2024

API Overview

As per title

API request details

  • Position API can be fed an array of IDs (Party IDs or sub accounts) and be returned all values

Filtering requirements (inputs)

As above

Sample API output (optional)

Dont think this is needed for this 

Questions

None

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.

@JonRay15
Copy link
Author

@mattrussell36 are you ok with having a Boolean on this for "include subAccounts" rather than feeding an array?

Are there situations where we need to query for multiple keys positions at a time?

@mattrussell36
Copy link
Contributor

Can we clarify if this issue relates to the subscription or the normal request? The GraphQL query and normal endpoint both already accept multiple party IDs, so an includeSubAccounts argument would need to account for the parties provided.

That said, this sounds like a useful addition and sounds good to me.

We do currently have a positions view which shows positions across all keys. Its on the portfolio page (perhaps you could argue we should make this only show positions for the current key so its less confusing with what we show on the trading page).

Finally, the positions stream (and GraphQL subscription) currently only accepts a single party ID. Ideally this would be updated to accept multiple parties and handle the includeSubAccounts argument in the same way as the normal http/graphql request.

@vega-issues vega-issues moved this to In Progress in Core Kanban Apr 16, 2024
@jeremyletang jeremyletang self-assigned this Apr 29, 2024
@vega-issues vega-issues moved this from In Progress to Approved in Core Kanban Apr 29, 2024
@github-project-automation github-project-automation bot moved this from Approved to Merged in Core Kanban Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants