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

[API]: Provide current "vega side price for funding" on an API endpoint #10502

Closed
davidsiska-vega opened this issue Jan 29, 2024 · 3 comments · Fixed by #10505 or #10529
Closed

[API]: Provide current "vega side price for funding" on an API endpoint #10502

davidsiska-vega opened this issue Jan 29, 2024 · 3 comments · Fixed by #10505 or #10529
Assignees
Labels

Comments

@davidsiska-vega
Copy link
Contributor

davidsiska-vega commented Jan 29, 2024

Currently the .../api/v2/markets/data endpoint provides:

  • mark price,

and for perps also

"productData": {
                "perpetualData": {
                    "fundingPayment": "-17994",
                    "fundingRate": "-0.001210715416813",
                    "internalTwap": "14844293",
                    "externalTwap": "14862287",
                    "seqNum": "160",
                    "startTime": "1706544889000000000",
                    "indexPrice": "1494299",
                    "nextIndexPriceCalc": "1706556424211855752",
                    "indexPriceType": "COMPOSITE_PRICE_TYPE_LAST_TRADE"
                }
            },

Request (minimal): add the "vega side price for funding" next to the "indexPrice".

Bonus (if possible): for both (perps markets) and mark price only (futures) of the composite price show the values of the
1)market config used somewhere ~(method,weights,stalenesssettings) -- apparently available elsewhere so not needed here
2) values of the component prices going in
3) their age

@gordsport gordsport added the api label Jan 29, 2024
@gordsport gordsport changed the title Provide current "vega side price for funding" on an API endpoint [API]: Provide current "vega side price for funding" on an API endpoint Jan 29, 2024
@gordsport gordsport moved this to Todo in Core Kanban Jan 29, 2024
@gordsport gordsport added this to the 🏰 Palazzo Mistero milestone Jan 29, 2024
@davidsiska-vega
Copy link
Contributor Author

Terminology clash. Needs to be clarified what we want to call what @barnabee .

But @ze97286 tells me that what's under "indexPrice" there is, in fact, what vega calculates using the composite price method. It's not the external data source price (which the name to me implies).

@gordsport gordsport moved this from Todo to In Progress in Core Kanban Jan 30, 2024
@davidsiska-vega
Copy link
Contributor Author

davidsiska-vega commented Jan 30, 2024

Unblocked, we want the names:
underlyingIndexPrice for the external oracle input coming from the dataSourceSpecForSettlementData.
internalCompositePrice for the internal price synthesised from trades, order book data etc.

@vega-issues vega-issues moved this from In Progress to Waiting Review in Core Kanban Jan 30, 2024
@vega-issues vega-issues moved this from Waiting Review to In Review in Core Kanban Jan 30, 2024
@vega-issues vega-issues moved this from In Review to Approved in Core Kanban Jan 30, 2024
@vega-issues vega-issues moved this from Approved to In Review in Core Kanban Jan 30, 2024
@vega-issues vega-issues moved this from In Review to Approved in Core Kanban Jan 30, 2024
@vega-issues vega-issues moved this from Approved to In Review in Core Kanban Jan 30, 2024
@vega-issues vega-issues moved this from In Review to Approved in Core Kanban Jan 30, 2024
@github-project-automation github-project-automation bot moved this from Approved to Merged in Core Kanban Jan 30, 2024
@ze97286 ze97286 reopened this Jan 31, 2024
@ze97286
Copy link
Contributor

ze97286 commented Jan 31, 2024

the renaming has been done, now we have to:

  1. add the underlyingIndexPrice
  2. bonus: add the components of the composite price

@gordsport gordsport moved this from Merged to In Progress in Core Kanban Jan 31, 2024
@vega-issues vega-issues moved this from In Progress to Waiting Review in Core Kanban Feb 1, 2024
@gordsport gordsport removed the blocked label Feb 1, 2024
@vega-issues vega-issues moved this from Waiting Review to In Review in Core Kanban Feb 1, 2024
@github-project-automation github-project-automation bot moved this from In Review to Merged in Core Kanban Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment