How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.
tl;dr: v3 continues to work. No immediate breaking changes. However, since Feb 16, 2025, the v4 pricing API separates mark prices (TP/SL, limits, PnL) from index prices (liquidations) and is the recommended format. Action required only if you perform liquidation calculations on volatile pairs (non-core crypto with futures feeds). Without updating, those calculations will use the wrong price.
Mark & Index Price Separation (v4 API)
Overview
Since February 16, 2025, Gains provides a v4 format that separates mark prices from index prices to support more advanced market structures and align with industry norms.
Core: Crypto with funding fees. Mark includes skew adjustment (for now clients have to calculate).
Volatile: Crypto with futures feeds available. Mark sourced from futures.
Regular: All other markets. Spot price used for both mark and index.
For Core and Regular pairs, mark and index prices will be identical from Gains endpoints. For Volatile pairs, they may differ significantly. Core will still need mark/market price calculated on the client.
The /charts snapshot endpoint now includes an additional indexPrices field alongside the existing OHLC data.
/charts returns the current OHLC snapshot for each pair. It is not a historical OHLCV candles API. The response does not include volume, interval, from, or to parameters.
opens, highs, lows, closes reflect mark prices (as before). indexPrices provides the latest index price per pair index.
SDK Changes
@gainsnetwork/sdk v1.8.3 introduces:
corePairIndices — exported from constants, provides the list of core crypto pair indices (BTC, ETH, etc.)
getMarketType(pairIndex) — returns the market classification (CORE, VOLATILE, or REGULAR) for a given pair index
These can be used to determine which price type applies to each pair:
import { corePairIndices, getMarketType, MARKET_TYPE } from '@gainsnetwork/sdk';const marketType = getMarketType(pairIndex);if (marketType === MARKET_TYPE.VOLATILE) { // Mark = futures, Index = spot — prices will differ}
Migration Guide
Example (TypeScript):
socket.onmessage = (msg) => { const data = JSON.parse(msg.data); // Parse mark prices (for TP/SL/limits) const markPrices = new Map<number, number>(); for (let i = 0; i < data.m.length; i += 2) { markPrices.set(data.m[i], data.m[i + 1]); } // Parse index prices (for liquidations) const indexPrices = new Map<number, number>(); for (let i = 0; i < data.i.length; i += 2) { indexPrices.set(data.i[i], data.i[i + 1]); }};
Timeline
Date
Event
Feb 16, 2025
v4 became the recommended format; index prices enabled for volatile pairs
TBD
v3 deprecation (will be announced separately)
Impact of Not Updating
If you continue using v3 or don’t separate mark/index prices:
Liquidation calculations will be incorrect for volatile pairs, as they will use mark price instead of index price
TP/SL/Limit orders are unaffected (these use mark price, which v3 provides)
Price display is unaffected for most use cases
Recommendation: Evaluate your integration’s use of price data. If you perform liquidation-related calculations, prioritize this update. The impact depends on your exposure to volatile pairs (non core crypto pairs with separate futures markets).
Questions?
Contact the Gains Network team on Discord if you have questions about the migration.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Gains Trade","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/gains/FCyVOdVfN-_VqQ5X/logo/gains.png?fit=max\u0026auto=format\u0026n=FCyVOdVfN-_VqQ5X\u0026q=85\u0026s=576fad34f2d6042b81905e874db68f39","dark":"https://mintcdn.com/gains/FCyVOdVfN-_VqQ5X/logo/gains.png?fit=max\u0026auto=format\u0026n=FCyVOdVfN-_VqQ5X\u0026q=85\u0026s=576fad34f2d6042b81905e874db68f39"},"favicon":"https://mintcdn.com/gains/IoupFIThDEsTzJuI/favicon.png?fit=max\u0026auto=format\u0026n=IoupFIThDEsTzJuI\u0026q=85\u0026s=03b08ffe521c388d78506bdb3a3ed215","navbar":{"primary":{"type":"button","label":"Start Trading","href":"https://gains.trade/trading"}},"footer":{"socials":{"x":"https://x.com/gains_trade","github":"https://github.com/GainsNetwork","telegram":"https://t.me/GainsNetwork","discord":"https://discord.gg/CZzb5XQpYQ"}},"seo":{"metatags":{"og:image":"/images/og-image.png","twitter:image":"/images/og-image.png","twitter:card":"summary_large_image"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gains","hasAudioNarration":false,"actualSubdomain":"gains","customDomains":["docs.gains.trade"],"gitSource":{"type":"github","owner":"gainsnetwork-org","repo":"gains-misc-monorepo","deployBranch":"main","contentDirectory":"docs/mintlify-docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b041e5c0d7e8ddc263b6fee","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"Developers","count":243},{"language":"default","tag":"Technical Reference","count":114},{"language":"default","tag":"Contracts","count":111},{"language":"default","tag":"API Reference","count":74},{"language":"default","tag":"Interfaces","count":50},{"language":"default","tag":"Libraries","count":40},{"language":"default","tag":"Trading API","count":37},{"language":"default","tag":"Traders","count":28},{"language":"default","tag":"Reference","count":28},{"language":"default","tag":"Trading Interface","count":20}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@media (max-width: 1023px){#navbar>div.absolute{background-color:rgb(var(--background-light))!important;-webkit-backdrop-filter:blur(8px)!important;backdrop-filter:blur(8px)!important;transition:none!important}.dark #navbar>div.absolute,html.dark #navbar>div.absolute{background-color:rgb(var(--background-dark))!important}}.cbc{--cbc-ink: #111827;--cbc-muted: #4b5563;--cbc-line: rgba(17, 24, 39, 0.1);--cbc-well: rgba(17, 24, 39, 0.04);--cbc-bar: #a3a9b3;--cbc-accent: #16a34a;--cbc-on-accent-bg: #15803d;--cbc-on-accent: #ffffff;--cbc-gains-row: rgba(22, 163, 74, 0.07);--cbc-ghost: rgba(22, 163, 74, 0.3);--cbc-field: #ffffff;--cbc-field-line: rgba(17, 24, 39, 0.24);--cbc-error: #b91c1c;margin:1.5rem 0;padding:1.25rem;border:1px solid var(--cbc-line);border-radius:16px;color:var(--cbc-ink);font-size:16px;line-height:1.5}.dark .cbc,html.dark .cbc{--cbc-ink: #f3f4f6;--cbc-muted: #a1a8b3;--cbc-line: rgba(243, 244, 246, 0.12);--cbc-well: rgba(243, 244, 246, 0.05);--cbc-bar: #5b626d;--cbc-accent: #07c983;--cbc-on-accent-bg: #07c983;--cbc-on-accent: #04140d;--cbc-gains-row: rgba(7, 201, 131, 0.08);--cbc-ghost: rgba(7, 201, 131, 0.32);--cbc-field: rgba(243, 244, 246, 0.04);--cbc-field-line: rgba(243, 244, 246, 0.28);--cbc-error: #f87171}.cbc-controls{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:1rem 1.25rem}.cbc-field{min-width:0}.cbc-field-rate{grid-column:1 / -1}.cbc-label{display:block;margin-bottom:0.375rem;color:var(--cbc-muted);font-size:14px;font-weight:500}.cbc-segmented{display:flex;gap:4px;padding:4px;border-radius:12px;background:var(--cbc-well)}.cbc-segmented button{flex:1 1 0;min-width:0;min-height:44px;padding:0 0.5rem;border:0;border-radius:9px;background:transparent;color:var(--cbc-ink);font:inherit;font-weight:500;font-variant-numeric:tabular-nums;cursor:pointer;transition:background-color 150ms ease-out, color 150ms ease-out}.cbc-segmented button[aria-pressed=\"true\"]{background:var(--cbc-on-accent-bg);color:var(--cbc-on-accent)}.cbc-segmented button:focus-visible,.cbc a:focus-visible{outline:2px solid var(--cbc-accent);outline-offset:2px}.cbc-input{display:flex;align-items:center;width:10rem;max-width:100%;min-height:44px;padding:0 0.875rem;border:1px solid var(--cbc-field-line);border-radius:10px;background:var(--cbc-field)}.cbc-input:focus-within{outline:2px solid var(--cbc-accent);outline-offset:2px}.cbc-input.is-invalid{border-color:var(--cbc-error)}.cbc-input input{flex:1 1 auto;min-width:0;padding:0.5rem 0;border:0;outline:none;background:transparent;color:var(--cbc-ink);font:inherit;font-weight:600;font-variant-numeric:tabular-nums}.cbc-input input::placeholder{color:var(--cbc-muted)}.cbc-input-unit{flex:none;color:var(--cbc-muted)}.cbc-error{margin:0.375rem 0 0;color:var(--cbc-error);font-size:14px}.cbc-help{margin:0.375rem 0 0;color:var(--cbc-muted);font-size:14px}.cbc-summary{margin:1.25rem 0 0;padding:1rem 1.125rem;border-radius:12px;background:var(--cbc-well)}.cbc-headline{display:flex;flex-wrap:wrap;align-items:baseline;gap:0.25rem 0.625rem;margin:0}.cbc-big{font-size:2rem;line-height:1.15;font-weight:650;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;white-space:nowrap}.cbc-headline-sub{color:var(--cbc-ink)}.cbc-detail{margin:0.375rem 0 0;color:var(--cbc-muted);font-variant-numeric:tabular-nums}.cbc-table{margin:1.25rem 0 0;font-variant-numeric:tabular-nums}.cbc-row{display:grid;grid-template-columns:2rem minmax(6.5rem, 2fr) minmax(0, 3fr);align-items:center;column-gap:0.75rem;padding:0.5rem;border-bottom:1px solid var(--cbc-line)}.cbc-row:last-child{border-bottom:0}.cbc-head{padding-top:0;color:var(--cbc-muted);font-size:13px;font-weight:500}.cbc-rank{color:var(--cbc-muted)}.cbc-venue{min-width:0;overflow-wrap:anywhere}.cbc-cost{display:block;min-width:0}.cbc-row.is-gains{border-radius:8px;background:var(--cbc-gains-row)}.cbc-row.is-gains .cbc-venue{font-weight:600}.cbc-cost-line{display:flex;width:100%;align-items:center;gap:0.625rem}.cbc-track{display:block;position:relative;flex:1 1 auto;height:10px}.cbc-bar,.cbc-ghost{position:absolute;top:0;left:0;height:100%;border-radius:0 4px 4px 0;transition:width 200ms ease-out}.cbc-bar{background:var(--cbc-bar)}.cbc-row.is-gains .cbc-bar{background:var(--cbc-accent)}.cbc-ghost{background:var(--cbc-ghost)}.cbc-value{flex:none;min-width:3.25rem;text-align:right}.cbc-before{display:block;margin-top:2px;color:var(--cbc-muted);font-size:13px;text-align:right}.cbc-source{margin:1rem 0 0;color:var(--cbc-muted);font-size:14px}.cbc-source.cbc-footnote{margin-top:0.5rem}.cbc-source a{color:inherit;text-decoration:underline;text-underline-offset:2px}@media (max-width: 520px){.cbc{padding:1rem}.cbc-controls{grid-template-columns:minmax(0, 1fr)}.cbc-row{grid-template-columns:1.5rem minmax(6.25rem, 1fr) minmax(0, 1.3fr);column-gap:0.5rem;padding:0.5rem 0.25rem}}@media (prefers-reduced-motion: reduce){.cbc-segmented button,.cbc-bar,.cbc-ghost{transition:none}}@media (forced-colors: active){.cbc-bar,.cbc-row.is-gains .cbc-bar{background:CanvasText;forced-color-adjust:none}.cbc-ghost{background:GrayText;forced-color-adjust:none}.cbc-segmented button[aria-pressed=\"true\"]{outline:2px solid Highlight;outline-offset:-2px}}"}]}
{"page":{"pagePath":"developer/integrators/guides/mark-+-index-introduction","slug":"/developer/integrators/guides/mark-+-index-introduction","pageMetadata":{"title":"Mark + Index Introduction","description":"How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.","href":"/developer/integrators/guides/mark-+-index-introduction"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={blockquote:`blockquote`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`tl;dr`}),`: v3 continues to work. No immediate breaking changes. However, since `,_jsx(_components.strong,{children:`Feb 16, 2025`}),`, the v4 pricing API separates mark prices (TP/SL, limits, PnL) from index prices (liquidations) and is the recommended format. Action required only if you perform liquidation calculations on volatile pairs (non-core crypto with futures feeds). Without updating, those calculations will use the wrong price.`]}),`\n`,_jsx(Heading,{level:`2`,id:`mark-\u0026-index-price-separation-v4-api`,children:`Mark \u0026 Index Price Separation (v4 API)`}),`\n`,_jsx(Heading,{level:`3`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`Since `,_jsx(_components.strong,{children:`February 16, 2025`}),`, Gains provides a v4 format that separates `,_jsx(_components.strong,{children:`mark prices`}),` from `,_jsx(_components.strong,{children:`index prices`}),` to support more advanced market structures and align with industry norms.`]}),`\n`,_jsx(Heading,{level:`3`,id:`what-changed`,children:`What Changed`}),`\n`,_jsxs(`table`,{children:[_jsx(`thead`,{children:_jsxs(`tr`,{children:[_jsx(`th`,{width:`142.60546875`,children:`Price Type`}),_jsx(`th`,{children:`Description`}),_jsx(`th`,{children:`Used For`})]})}),_jsxs(`tbody`,{children:[_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`strong`,{children:`Mark Price`})}),_jsx(`td`,{children:`Price used for trade execution`}),_jsx(`td`,{children:`TP/SL, Limit Orders, Stop Orders, PnL calculations`})]}),_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`strong`,{children:`Index Price`})}),_jsx(`td`,{children:`Spot price, unaffected by derivatives skew`}),_jsx(`td`,{children:_jsx(`strong`,{children:`Liquidations only`})})]})]})]}),`\n`,_jsx(Heading,{level:`4`,id:`how-prices-differ-by-market-type`,children:`How Prices Differ by Market Type`}),`\n`,_jsxs(`table`,{children:[_jsx(`thead`,{children:_jsxs(`tr`,{children:[_jsx(`th`,{width:`110.26171875`,children:`Type`}),_jsx(`th`,{width:`193.171875`,children:`Mark Price`}),_jsx(`th`,{width:`130.21875`,children:`Index Price`}),_jsx(`th`,{children:`Examples`})]})}),_jsxs(`tbody`,{children:[_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`strong`,{children:`Core`})}),_jsx(`td`,{children:`market (spot + skew)`}),_jsx(`td`,{children:`spot`}),_jsx(`td`,{children:`BTC, ETH (funding fees)`})]}),_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`strong`,{children:`Volatile`})}),_jsx(`td`,{children:`futures`}),_jsx(`td`,{children:`spot`}),_jsx(`td`,{children:`Non-core crypto`})]}),_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`strong`,{children:`Regular`})}),_jsx(`td`,{children:`spot`}),_jsx(`td`,{children:`spot`}),_jsx(`td`,{children:`Forex, stocks, commodities, non-core crypto w/o futures`})]})]})]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Core`}),`: Crypto with funding fees. Mark includes skew adjustment (for now clients have to calculate).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Volatile`}),`: Crypto with futures feeds available. Mark sourced from futures.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Regular`}),`: All other markets. Spot price used for both mark and index.`]}),`\n`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[`For `,_jsx(_components.strong,{children:`Core`}),` and `,_jsx(_components.strong,{children:`Regular`}),` pairs, mark and index prices will be identical from Gains endpoints. For `,_jsx(_components.strong,{children:`Volatile`}),` pairs, they may differ significantly. `,_jsx(_components.strong,{children:`Core`}),` will still need mark/market price calculated on the client.`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`api-changes`,children:`API Changes`}),`\n`,_jsx(Heading,{level:`4`,id:`connection`,children:`Connection`}),`\n`,_jsx(_components.p,{children:`To use the v4 API, connect to the v4 endpoint:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# v3 (legacy)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`wss://backend-pricing.eu.gains.trade/v3`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# v4 (new)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`wss://backend-pricing.eu.gains.trade/v4`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`4`,id:`message-format`,children:`Message Format`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`v3 (Legacy)`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Timestamp checkpoint`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1707580800000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Price update (flat array: [pairIndex, price, pairIndex, price, ...])`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45000.50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2500.25`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`150.75`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`v4 (New)`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"m\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45000.50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2500.25`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`150.75`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"i\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`44998.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2499.80`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`150.75`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"t\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1707580800000`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(`table`,{children:[_jsx(`thead`,{children:_jsxs(`tr`,{children:[_jsx(`th`,{width:`121.4296875`,children:`Field`}),_jsx(`th`,{width:`146.0078125`,children:`Type`}),_jsx(`th`,{children:`Description`})]})}),_jsxs(`tbody`,{children:[_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`code`,{children:`m`})}),_jsx(`td`,{children:_jsx(`code`,{children:`number[]`})}),_jsxs(`td`,{children:[`Mark prices as flat array `,_jsx(`code`,{children:`[pairIndex, price, …]`})]})]}),_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`code`,{children:`i`})}),_jsx(`td`,{children:_jsx(`code`,{children:`number[]`})}),_jsxs(`td`,{children:[`Index prices as flat array `,_jsx(`code`,{children:`[pairIndex, price, …]`})]})]}),_jsxs(`tr`,{children:[_jsx(`td`,{children:_jsx(`code`,{children:`t`})}),_jsx(`td`,{children:_jsx(`code`,{children:`number`})}),_jsx(`td`,{children:`Timestamp (milliseconds)`})]})]})]}),`\n`,_jsxs(Heading,{level:`4`,id:`/charts-endpoint`,children:[_jsx(_components.code,{children:`/charts`}),` Endpoint`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`/charts`}),` snapshot endpoint now includes an additional `,_jsx(_components.code,{children:`indexPrices`}),` field alongside the existing OHLC data.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`/charts`}),` returns the current OHLC snapshot for each pair. It is not a historical OHLCV candles API. The response does not include volume, interval, `,_jsx(_components.code,{children:`from`}),`, or `,_jsx(_components.code,{children:`to`}),` parameters.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Before:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"opens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45000.50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2500.25`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"highs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45100.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2510.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lows\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`44900.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2490.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"closes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45050.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2505.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1707580800`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`After:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"opens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45000.50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2500.25`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"highs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45100.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2510.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lows\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`44900.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2490.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"closes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45050.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2505.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"indexPrices\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`44998.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2499.80`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1707580800`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`opens`}),`, `,_jsx(_components.code,{children:`highs`}),`, `,_jsx(_components.code,{children:`lows`}),`, `,_jsx(_components.code,{children:`closes`}),` reflect `,_jsx(_components.strong,{children:`mark prices`}),` (as before). `,_jsx(_components.code,{children:`indexPrices`}),` provides the latest `,_jsx(_components.strong,{children:`index price`}),` per pair index.`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`sdk-changes`,children:`SDK Changes`}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`@gainsnetwork/sdk`}),` v1.8.3`]}),` introduces:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`corePairIndices`}),` — exported from `,_jsx(_components.code,{children:`constants`}),`, provides the list of core crypto pair indices (BTC, ETH, etc.)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`getMarketType(pairIndex)`}),` — returns the market classification (`,_jsx(_components.code,{children:`CORE`}),`, `,_jsx(_components.code,{children:`VOLATILE`}),`, or `,_jsx(_components.code,{children:`REGULAR`}),`) for a given pair index`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`These can be used to determine which price type applies to each pair:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`corePairIndices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`getMarketType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`MARKET_TYPE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@gainsnetwork/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` marketType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getMarketType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pairIndex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`marketType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` MARKET_TYPE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`VOLATILE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Mark = futures, Index = spot — prices will differ`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`migration-guide`,children:`Migration Guide`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example (TypeScript):`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`socket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`onmessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`msg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`msg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Parse mark prices (for TP/SL/limits)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` markPrices`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`length`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` markPrices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Parse index prices (for liquidations)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` indexPrices`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`length`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` indexPrices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`timeline`,children:`Timeline`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Date`}),_jsx(_components.th,{children:`Event`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Feb 16, 2025`})}),_jsx(_components.td,{children:`v4 became the recommended format; index prices enabled for volatile pairs`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`TBD`})}),_jsx(_components.td,{children:`v3 deprecation (will be announced separately)`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`impact-of-not-updating`,children:`Impact of Not Updating`}),`\n`,_jsx(_components.p,{children:`If you continue using v3 or don’t separate mark/index prices:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Liquidation calculations will be incorrect`}),` for volatile pairs, as they will use mark price instead of index price`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`TP/SL/Limit orders`}),` are unaffected (these use mark price, which v3 provides)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Price display`}),` is unaffected for most use cases`]}),`\n`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Recommendation:`}),` Evaluate your integration’s use of price data. If you perform liquidation-related calculations, prioritize this update. The impact depends on your exposure to volatile pairs (non core crypto pairs with separate futures markets).`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`questions`,children:`Questions?`}),`\n`,_jsx(_components.p,{children:`Contact the Gains Network team on Discord if you have questions about the migration.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Mark + Index Introduction","description":"How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.","href":"/developer/integrators/guides/mark-+-index-introduction"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Mark \u0026 Index Price Separation (v4 API)","slug":"mark-\u0026-index-price-separation-v4-api","depth":2,"children":[{"title":"Overview","slug":"overview","depth":3,"children":[]},{"title":"What Changed","slug":"what-changed","depth":3,"children":[]},{"title":"How Prices Differ by Market Type","slug":"how-prices-differ-by-market-type","depth":4,"children":[]},{"title":"API Changes","slug":"api-changes","depth":3,"children":[]},{"title":"Connection","slug":"connection","depth":4,"children":[]},{"title":"Message Format","slug":"message-format","depth":4,"children":[]},{"title":"/charts Endpoint","slug":"/charts-endpoint","depth":4,"children":[]},{"title":"SDK Changes","slug":"sdk-changes","depth":3,"children":[]},{"title":"Migration Guide","slug":"migration-guide","depth":3,"children":[]},{"title":"Timeline","slug":"timeline","depth":3,"children":[]},{"title":"Impact of Not Updating","slug":"impact-of-not-updating","depth":3,"children":[]},{"title":"Questions?","slug":"questions","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"gains","siteName":"Gains Trade","title":"Mark + Index Introduction - Gains Trade","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-22T14:49:17.067Z","originalFileLocation":"developer/integrators/guides/mark-+-index-introduction.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gains Trade\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Mark + Index Introduction - Gains Trade\">\u003cmeta data-mint-head property=\"og:description\" content=\"How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gains Trade\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gains.mintlify.site/images/og-image.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Mark + Index Introduction - Gains Trade\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gains.mintlify.site/images/og-image.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/gains/jCqANtqofKPj1YVA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gains Trade\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developer/integrators/guides/mark-%2B-index-introduction.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gains.trade/#organization\",\"name\":\"Gains Trade\",\"url\":\"https://docs.gains.trade\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gains/FCyVOdVfN-_VqQ5X/logo/gains.png?fit=max\u0026auto=format\u0026n=FCyVOdVfN-_VqQ5X\u0026q=85\u0026s=576fad34f2d6042b81905e874db68f39\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gains.trade#website\",\"name\":\"Gains Trade\",\"url\":\"https://docs.gains.trade\",\"publisher\":{\"@id\":\"https://docs.gains.trade/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction#webpage\",\"url\":\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction\",\"name\":\"Mark + Index Introduction\",\"description\":\"How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.\",\"dateModified\":\"2026-11-22T14:49:17.067Z\",\"isPartOf\":{\"@id\":\"https://docs.gains.trade#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrators\",\"item\":\"https://docs.gains.trade/developer/integrators\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Guides\",\"item\":\"https://docs.gains.trade/developer/integrators/guides\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Mark + Index Introduction\",\"item\":\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction#article\",\"headline\":\"Mark + Index Introduction\",\"name\":\"Mark + Index Introduction\",\"description\":\"How the v4 pricing API separates mark prices from index prices, and how to migrate from v3.\",\"url\":\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction#webpage\"},\"image\":\"https://docs.gains.trade/images/og-image.png\",\"dateModified\":\"2026-11-22T14:49:17.067Z\",\"publisher\":{\"@id\":\"https://docs.gains.trade/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gains.trade#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gains Trade\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Gains Trade\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/developer/integrators/guides/mark-%2B-index-introduction.md","siteName":"Gains Trade","nav":{"global":null,"tabs":[{"tab":"Traders","pages":[{"title":"Traders","href":""}]},{"tab":"Developers","groups":[{"group":"Trading API","icon":"bolt","tag":"Beta","pages":[{"title":"Trading API","href":"/developer/trading-api/overview"},{"title":"Quickstart","href":"/developer/trading-api/quickstart"},{"title":"Authentication","href":"/developer/trading-api/authentication"},{"title":"Orders and positions","href":"/developer/trading-api/orders"},{"title":"Market data","href":"/developer/trading-api/market-data"},{"title":"WebSocket","href":"/developer/trading-api/websocket"},{"title":"Errors and limits","href":"/developer/trading-api/errors"},{"title":"SDKs","href":"/developer/trading-api/sdks"},{"title":"Hyperliquid compatibility","href":"/developer/trading-api/hyperliquid-compatibility"},{"group":"Reference","pages":[{"group":"System","pages":[{"title":"Liveness","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /health","href":"/api-reference/system/liveness"},{"title":"Readiness per chain","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /ready","href":"/api-reference/system/readiness-per-chain"},{"title":"Chain identity and signing domain","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}","href":"/api-reference/system/chain-identity-and-signing-domain"}]},{"group":"Markets","pages":[{"title":"List markets","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/markets","href":"/api-reference/markets/list-markets"},{"title":"Get one market","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/markets/{symbol}","href":"/api-reference/markets/get-one-market"},{"title":"Virtual order book","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/markets/{symbol}/book","href":"/api-reference/markets/virtual-order-book"},{"title":"Historical candles","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/markets/{symbol}/candles","href":"/api-reference/markets/historical-candles"},{"title":"Recent executed trades","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/markets/{symbol}/trades","href":"/api-reference/markets/recent-executed-trades"},{"title":"Current funding and borrowing rates","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/markets/{symbol}/funding","href":"/api-reference/markets/current-funding-and-borrowing-rates"},{"title":"Mark and index price of every market","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/prices","href":"/api-reference/markets/mark-and-index-price-of-every-market"}]},{"group":"Account","pages":[{"title":"Balances, fee tier and agents","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/account/{address}","href":"/api-reference/account/balances-fee-tier-and-agents"},{"title":"Open positions","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/account/{address}/positions","href":"/api-reference/account/open-positions"},{"title":"Open orders","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/account/{address}/orders","href":"/api-reference/account/open-orders"},{"title":"Orders placed through the API, newest first","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/account/{address}/orders/history","href":"/api-reference/account/orders-placed-through-the-api-newest-first"},{"title":"Fill history","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/account/{address}/fills","href":"/api-reference/account/fill-history"}]},{"group":"Orders","pages":[{"title":"Order lifecycle status","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/orders/{id}","href":"/api-reference/orders/order-lifecycle-status"},{"title":"Cancel a resting order, or reclaim a timed-out market request","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json delete /v1/{chain}/orders/{id}","href":"/api-reference/orders/cancel-a-resting-order-or-reclaim-a-timed-out-market-request"},{"title":"Update a resting limit or stop order","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json patch /v1/{chain}/orders/{id}","href":"/api-reference/orders/update-a-resting-limit-or-stop-order"},{"title":"Place an order","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json post /v1/{chain}/orders","href":"/api-reference/orders/place-an-order"},{"title":"Report the broadcast transaction of a prepared order","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json post /v1/{chain}/orders/{id}/submit","href":"/api-reference/orders/report-the-broadcast-transaction-of-a-prepared-order"}]},{"group":"Positions","pages":[{"title":"Close a position at market","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json post /v1/{chain}/positions/{id}/close","href":"/api-reference/positions/close-a-position-at-market"},{"title":"Update stop loss, take profit, leverage or collateral","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json patch /v1/{chain}/positions/{id}","href":"/api-reference/positions/update-stop-loss-take-profit-leverage-or-collateral"}]},{"group":"Agents","pages":[{"title":"Authorise an agent","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json post /v1/{chain}/agents","href":"/api-reference/agents/authorise-an-agent"},{"title":"Agent status and delegation transaction","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json get /v1/{chain}/agents/{address}","href":"/api-reference/agents/agent-status-and-delegation-transaction"},{"title":"Revoke an agent","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json delete /v1/{chain}/agents/{address}","href":"/api-reference/agents/revoke-an-agent"},{"title":"Issue a read-only API key","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json post /v1/{chain}/api-keys","href":"/api-reference/agents/issue-a-read-only-api-key"}]},{"group":"Hyperliquid compatibility","pages":[{"title":"Hyperliquid-shaped /info","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json post /hl/{chain}/info","href":"/api-reference/hyperliquid-compatibility/hyperliquid-shaped-info"},{"title":"Hyperliquid-shaped /exchange","deprecated":null,"version":null,"openapi":"/developer/trading-api/openapi.json post /hl/{chain}/exchange","href":"/api-reference/hyperliquid-compatibility/hyperliquid-shaped-exchange"}]}]}]},{"group":"API Reference","icon":"server","pages":[{"title":"Backend API Reference","href":"/developer/api-reference/introduction"},{"group":"Global","pages":[{"title":"Health Check","openapi":"get /health","href":"/developer/api-reference/endpoint/health"},{"title":"Get Chain Stats","openapi":"get /api/stats","href":"/developer/api-reference/endpoint/stats"},{"title":"Get APR Info","openapi":"get /api/apr","href":"/developer/api-reference/endpoint/apr"},{"title":"Get GNS Total Supply","openapi":"get /api/total-supply","href":"/developer/api-reference/endpoint/total-supply"}]},{"group":"Trading Data","pages":[{"title":"Get Trading History Window","openapi":"get /api/trading-history/{window}","href":"/developer/api-reference/endpoint/trading-history"},{"title":"Get Trading History Stats","openapi":"get /api/trading-history/{window}/stats","href":"/developer/api-reference/endpoint/trading-history-stats"},{"title":"Get Wallet Trading Stats","openapi":"get /api/personal-trading-history/{address}/stats","href":"/developer/api-reference/endpoint/personal-trading-stats"},{"title":"Get Batch Wallet Trading Stats","openapi":"post /api/personal-trading-history/stats","href":"/developer/api-reference/endpoint/batch-personal-trading-stats"},{"title":"Get Wallet Trading History","openapi":"get /api/personal-trading-history/{address}","href":"/developer/api-reference/endpoint/personal-trading-history"},{"title":"Get Batch Wallet Trading History","openapi":"post /api/personal-trading-history/batch","href":"/developer/api-reference/endpoint/batch-personal-trading-history"},{"title":"Get Trader Leaderboard","openapi":"get /api/leaderboard/{period}","href":"/developer/api-reference/endpoint/leaderboard"},{"title":"Get Holding Rates","openapi":"get /api/holding-rates/{collateralIndex}/{pairIndex}","href":"/developer/api-reference/endpoint/holding-rates"}]},{"group":"Contests","pages":[{"title":"List Contests","openapi":"get /api/contests","href":"/developer/api-reference/endpoint/contests"},{"title":"Get Contest Details","openapi":"get /api/contests/{id}","href":"/developer/api-reference/endpoint/contest-details"},{"title":"Get Contest Leaderboard","openapi":"get /api/contests/{id}/leaderboard","href":"/developer/api-reference/endpoint/contest-leaderboard"},{"title":"Get Contest Trader Stats","openapi":"get /api/contests/{id}/leaderboard/{trader}","href":"/developer/api-reference/endpoint/contest-trader-stats"}]},{"group":"Dapp","pages":[{"title":"Get Latest Dapp Version","openapi":"get /api/dapp/latest","href":"/developer/api-reference/endpoint/latest-dapp"},{"title":"Get Latest Dapp Version By Mode","openapi":"get /api/dapp/latest/{mode}","href":"/developer/api-reference/endpoint/latest-dapp-by-mode"},{"title":"Get Wallet Associations","openapi":"get /api/dapp/wallet/associated/{address}","href":"/developer/api-reference/endpoint/wallet-associations"},{"title":"Associate Wallet","openapi":"post /api/dapp/wallet/associate","href":"/developer/api-reference/endpoint/associate-wallet"},{"title":"Get Circle Messages","openapi":"get /api/dapp/circle/messages/{domainId}/{txHash}","href":"/developer/api-reference/endpoint/circle-messages"},{"title":"Get Solana Token Balance","openapi":"get /api/dapp/solana/usdc-balance/{address}","href":"/developer/api-reference/endpoint/solana-usdc-balance"},{"title":"Create Transak Widget URL","openapi":"post /api/dapp/transak/widget-url","href":"/developer/api-reference/endpoint/transak-widget-url"}]},{"group":"Bridge","pages":[{"title":"Create Bridge Flow","openapi":"post /api/dapp/bridge/flows","href":"/developer/api-reference/endpoint/create-bridge-flow"},{"title":"Get Bridge Flows By Address","openapi":"get /api/dapp/bridge/flows/{address}","href":"/developer/api-reference/endpoint/bridge-flows-by-address"},{"title":"Get Pending Bridge Flows","openapi":"get /api/dapp/bridge/flows/pending/{address}","href":"/developer/api-reference/endpoint/pending-bridge-flows"},{"title":"Get Bridge Flow By Hash","openapi":"get /api/dapp/bridge/flows/hash/{srcHash}","href":"/developer/api-reference/endpoint/bridge-flow-by-hash"},{"title":"Update Bridge Flow","openapi":"put /api/dapp/bridge/flows/{srcHash}","href":"/developer/api-reference/endpoint/update-bridge-flow"},{"title":"Finalize Bridge Flow","openapi":"patch /api/dapp/bridge/flows/finalize","href":"/developer/api-reference/endpoint/finalize-bridge-flow"},{"title":"Delete Bridge Flow","openapi":"delete /api/dapp/bridge/flows/{srcHash}","href":"/developer/api-reference/endpoint/delete-bridge-flow"}]},{"group":"Campaigns","pages":[{"title":"Check Campaign Eligibility","openapi":"get /api/campaigns/eligibility/{address}","href":"/developer/api-reference/endpoint/campaign-eligibility"},{"title":"Check Campaign Eligibility By ID","openapi":"get /api/campaigns/{campaignId}/eligibility/{address}","href":"/developer/api-reference/endpoint/campaign-eligibility-by-id"},{"title":"Check Solana Campaign Eligibility","openapi":"get /api/campaigns/eligibility/solana/{address}","href":"/developer/api-reference/endpoint/solana-campaign-eligibility"},{"title":"Check Solana Campaign Eligibility By ID","openapi":"get /api/campaigns/{campaignId}/eligibility/solana/{address}","href":"/developer/api-reference/endpoint/solana-campaign-eligibility-by-id"}]},{"group":"User Messaging","pages":[{"title":"Get VIP Status","openapi":"get /api/vip/{address}","href":"/developer/api-reference/endpoint/vip-status"},{"title":"Acknowledge VIP Status","openapi":"post /api/vip/{address}/ack","href":"/developer/api-reference/endpoint/ack-vip-status"},{"title":"Get Notifications","openapi":"get /api/notifications/{address}","href":"/developer/api-reference/endpoint/notifications"},{"title":"Dismiss Notification","openapi":"post /api/notifications/{address}/dismiss","href":"/developer/api-reference/endpoint/dismiss-notification"}]},{"group":"Referrals","pages":[{"title":"Referral Config","openapi":"get /api/referrals/config","href":"/developer/api-reference/endpoint/referral-config"},{"title":"Register Code","openapi":"post /api/referrals/code","href":"/developer/api-reference/endpoint/referral-register-code"},{"title":"Bind Code","openapi":"post /api/referrals/bind","href":"/developer/api-reference/endpoint/referral-bind-code"},{"title":"Resolve Binding","openapi":"get /api/referrals/binding/{address}","href":"/developer/api-reference/endpoint/referral-binding"},{"title":"Resolve Code Owner","openapi":"get /api/referrals/code/{code}/address","href":"/developer/api-reference/endpoint/referral-code-owner"},{"title":"Resolve Address Code","openapi":"get /api/referrals/address/{address}/code","href":"/developer/api-reference/endpoint/referral-owner-code"},{"title":"Referral Summary","openapi":"get /api/referrals/summary/{address}","href":"/developer/api-reference/endpoint/referral-summary"},{"title":"Referral Rewards","openapi":"get /api/referrals/rewards/{address}","href":"/developer/api-reference/endpoint/referral-rewards"},{"title":"Referred Wallets","openapi":"get /api/referrals/referred/{address}","href":"/developer/api-reference/endpoint/referral-referred"},{"title":"Referred Wallet Detail","openapi":"get /api/referrals/referred/{address}/detail","href":"/developer/api-reference/endpoint/referral-referred-detail"},{"title":"Referral History","openapi":"get /api/referrals/history/{address}","href":"/developer/api-reference/endpoint/referral-history"},{"title":"Claim Proof","openapi":"get /api/referrals/proof/{address}","href":"/developer/api-reference/endpoint/referral-proof"},{"title":"Resolve Referral Link","openapi":"get /api/referrals/links/{link}/address","href":"/developer/api-reference/endpoint/referral-link-address"},{"title":"Resolve Referral Address","openapi":"get /api/referrals/addresses/{address}/link","href":"/developer/api-reference/endpoint/referral-address-link"}]},{"group":"Trading Backend","pages":[{"title":"Get Trading Variables","openapi":"get /trading-variables","href":"/developer/api-reference/endpoint/core-trading-variables"},{"title":"Get All Trading Variables","openapi":"get /trading-variables/all","href":"/developer/api-reference/endpoint/core-trading-variables-all"},{"title":"Get Trading Variables By Keys","openapi":"get /trading-variables/{keys}","href":"/developer/api-reference/endpoint/core-trading-variables-by-keys"},{"title":"Get Trading Variable Keys","openapi":"get /trading-variables-keys","href":"/developer/api-reference/endpoint/core-trading-variable-keys"},{"title":"Get Open Trades","openapi":"get /open-trades","href":"/developer/api-reference/endpoint/core-open-trades"},{"title":"Get Open Trades By Address","openapi":"get /open-trades/{address}","href":"/developer/api-reference/endpoint/core-open-trades-by-address"},{"title":"Get Open Trades Info","openapi":"get /open-trades-info","href":"/developer/api-reference/endpoint/core-open-trades-info"},{"title":"Get Pending Events","openapi":"get /pending-events","href":"/developer/api-reference/endpoint/core-pending-events"},{"title":"Get User Trading Variables","openapi":"get /user-trading-variables/{address}","href":"/developer/api-reference/endpoint/core-user-trading-variables"}]},{"group":"Legacy Contests","pages":[{"title":"Get Legacy Contest Leaderboard","openapi":"get /contest/leaderboard","href":"/developer/api-reference/endpoint/legacy-contest-leaderboard"},{"title":"Get Legacy Contest PnL","openapi":"get /contest/pnl","href":"/developer/api-reference/endpoint/legacy-contest-pnl"},{"title":"Get Legacy Contest PnL Percent","openapi":"get /contest/pnl-percent","href":"/developer/api-reference/endpoint/legacy-contest-pnl-percent"},{"title":"Get Legacy Final Open PnL","openapi":"get /contest/final-open-pnl","href":"/developer/api-reference/endpoint/legacy-contest-final-open-pnl"},{"title":"Get Legacy Contest","openapi":"get /contest","href":"/developer/api-reference/endpoint/legacy-contest"},{"title":"Get Legacy Contest Rewards","openapi":"get /contest/rewards","href":"/developer/api-reference/endpoint/legacy-contest-rewards"},{"title":"Get Legacy Contest Results","openapi":"get /contest/results","href":"/developer/api-reference/endpoint/legacy-contest-results"},{"title":"Update Legacy Contest Cache","openapi":"put /contest/cache-update","href":"/developer/api-reference/endpoint/legacy-contest-cache-update"}]},{"group":"Rewards","pages":[{"title":"Get Rewards Root","openapi":"get /rewards/root/{configId}/{epoch}","href":"/developer/api-reference/endpoint/rewards-root"},{"title":"Get All Rewards Roots","openapi":"get /rewards/root/all/{configId}/{epoch}","href":"/developer/api-reference/endpoint/rewards-root-all"},{"title":"Get Rewards By Address","openapi":"get /rewards/{configId}/{epoch}/{address}","href":"/developer/api-reference/endpoint/rewards-by-address"},{"title":"Get All Rewards By Address","openapi":"get /rewards/all/{configId}/{epoch}/{address}","href":"/developer/api-reference/endpoint/rewards-all-by-address"}]}]},{"group":"Integrators","icon":"plug","pages":[{"title":"Integrators","href":"/developer/integrators"},{"title":"Trading Contracts","href":"/developer/integrators/trading-contracts"},{"title":"Delegated Trading","href":"/developer/integrators/delegated-trading"},{"title":"Backend","href":"/developer/integrators/backend"},{"title":"Contests","href":"/developer/integrators/contests"},{"title":"Live prices and OHLC snapshots","href":"/developer/integrators/price-feed"},{"title":"Referrals","href":"/developer/integrators/referrals"},{"group":"Guides","pages":[{"title":"Guides","href":"/developer/integrators/guides"},{"title":"Listing all assets","description":"Fetch every asset listed on Gains, with its pair index, asset class, leverage bounds, and spread.","href":"/developer/integrators/guides/listed-assets"},{"title":"Mark + Index Introduction","href":"/developer/integrators/guides/mark-+-index-introduction"},{"title":"Building the virtual order book","description":"How to derive the gTrade virtual order book from public trading variables, live prices, and SDK price-impact helpers.","href":"/developer/integrators/guides/building-the-virtual-order-book"},{"title":"Support Endpoints Migration","href":"/developer/integrators/guides/support-endpoints-migration"},{"title":"v10.2 migration","href":"/developer/integrators/guides/v10.2-migration"},{"title":"v10 migration","href":"/developer/integrators/guides/v10-migration"},{"title":"Calculating borrowing fees","href":"/developer/integrators/guides/calculating-borrowing-fees"},{"title":"Calculating liquidation price","href":"/developer/integrators/guides/calculating-liquidation-price"},{"title":"Backend Endpoint Refactor","href":"/developer/integrators/guides/backend-endpoint-refactor"},{"title":"History Endpoints Migration","href":"/developer/integrators/guides/history-endpoints-migration"}]}]},{"group":"Technical Reference","icon":"code","pages":[{"group":"Contracts","pages":[{"group":"Changelogs","pages":[{"title":"v10.2 Update","href":"/developer/technical-reference/contracts/changelogs/v10.2-update"},{"title":"v10.1 Update","href":"/developer/technical-reference/contracts/changelogs/v10.1-update"},{"title":"v10 Update","href":"/developer/technical-reference/contracts/changelogs/v10-update"},{"title":"v9.2.1 Update","href":"/developer/technical-reference/contracts/changelogs/v9.2.1-update"},{"title":"v9.1 Update","href":"/developer/technical-reference/contracts/changelogs/v9.1-update"},{"title":"v9.1.1 Update","href":"/developer/technical-reference/contracts/changelogs/v9.1.1-update"},{"title":"v9 Update","href":"/developer/technical-reference/contracts/changelogs/v9-update"}]},{"group":"Core","pages":[{"group":"Abstract","pages":[{"title":"GNSAddressStore","href":"/developer/technical-reference/contracts/core/abstract/gnsaddressstore"},{"title":"GNSDiamondCut","href":"/developer/technical-reference/contracts/core/abstract/gnsdiamondcut"},{"title":"GNSDiamondLoupe","href":"/developer/technical-reference/contracts/core/abstract/gnsdiamondloupe"},{"title":"GNSDiamondStorage","href":"/developer/technical-reference/contracts/core/abstract/gnsdiamondstorage"}]},{"group":"Facets","pages":[{"title":"GNSBorrowingFees","href":"/developer/technical-reference/contracts/core/facets/gnsborrowingfees"},{"title":"GNSOtc","href":"/developer/technical-reference/contracts/core/facets/gnsotc"},{"title":"GNSPriceAggregator","href":"/developer/technical-reference/contracts/core/facets/gnspriceaggregator"},{"title":"GNSTradingInteractions","href":"/developer/technical-reference/contracts/core/facets/gnstradinginteractions"},{"title":"GNSTriggerRewards","href":"/developer/technical-reference/contracts/core/facets/gnstriggerrewards"},{"title":"GNSFeeTiers","href":"/developer/technical-reference/contracts/core/facets/gnsfeetiers"},{"title":"GNSPairsStorage","href":"/developer/technical-reference/contracts/core/facets/gnspairsstorage"},{"title":"GNSPriceImpact","href":"/developer/technical-reference/contracts/core/facets/gnspriceimpact"},{"title":"GNSReferrals","href":"/developer/technical-reference/contracts/core/facets/gnsreferrals"},{"title":"GNSTradingCallbacks","href":"/developer/technical-reference/contracts/core/facets/gnstradingcallbacks"},{"title":"GNSTradingStorage","href":"/developer/technical-reference/contracts/core/facets/gnstradingstorage"}]},{"title":"GNSMultiCollatDiamond","href":"/developer/technical-reference/contracts/core/gnsmulticollatdiamond"},{"title":"GNSStaking","href":"/developer/technical-reference/contracts/core/gnsstaking"},{"title":"GToken","href":"/developer/technical-reference/contracts/core/gtoken"},{"title":"GTokenOpenPnlFeed","href":"/developer/technical-reference/contracts/core/gtokenopenpnlfeed"}]},{"group":"Interfaces","pages":[{"group":"Libraries","pages":[{"title":"IBorrowingFeesUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/iborrowingfeesutils"},{"title":"IOtcUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/iotcutils"},{"title":"IPriceAggregatorUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/ipriceaggregatorutils"},{"title":"ITriggerRewardsUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/itriggerrewardsutils"},{"title":"IFeeTiersUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/ifeetiersutils"},{"title":"IPairsStorageUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/ipairsstorageutils"},{"title":"IPriceImpactUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/ipriceimpactutils"},{"title":"IReferralsUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/ireferralsutils"},{"title":"ITradingCallbacksUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/itradingcallbacksutils"},{"title":"ITradingCommonUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/itradingcommonutils"},{"title":"ITradingInteractionsUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/itradinginteractionsutils"},{"title":"ITradingStorageUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/itradingstorageutils"},{"title":"IUpdateLeverageUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/iupdateleverageutils"},{"title":"IUpdatePositionSizeUtils","href":"/developer/technical-reference/contracts/interfaces/libraries/iupdatepositionsizeutils"}]},{"group":"Types","pages":[{"title":"IAddressStore","href":"/developer/technical-reference/contracts/interfaces/types/iaddressstore"},{"title":"IBorrowingFees","href":"/developer/technical-reference/contracts/interfaces/types/iborrowingfees"},{"title":"IDiamondStorage","href":"/developer/technical-reference/contracts/interfaces/types/idiamondstorage"},{"title":"IOtc","href":"/developer/technical-reference/contracts/interfaces/types/iotc"},{"title":"IPriceAggregator","href":"/developer/technical-reference/contracts/interfaces/types/ipriceaggregator"},{"title":"ITradingStorage","href":"/developer/technical-reference/contracts/interfaces/types/itradingstorage"},{"title":"ITradingInteractions","href":"/developer/technical-reference/contracts/interfaces/types/itradinginteractions"},{"title":"ITriggerRewards","href":"/developer/technical-reference/contracts/interfaces/types/itriggerrewards"},{"title":"ITypes","href":"/developer/technical-reference/contracts/interfaces/types/itypes"},{"title":"IUpdateLeverage","href":"/developer/technical-reference/contracts/interfaces/types/iupdateleverage"},{"title":"IPairsStorage","href":"/developer/technical-reference/contracts/interfaces/types/ipairsstorage"},{"title":"IFeeTiers","href":"/developer/technical-reference/contracts/interfaces/types/ifeetiers"},{"title":"IPriceImpact","href":"/developer/technical-reference/contracts/interfaces/types/ipriceimpact"},{"title":"IReferrals","href":"/developer/technical-reference/contracts/interfaces/types/ireferrals"},{"title":"ITradingCallbacks","href":"/developer/technical-reference/contracts/interfaces/types/itradingcallbacks"},{"title":"IUpdatePositionSize","href":"/developer/technical-reference/contracts/interfaces/types/iupdatepositionsize"}]},{"title":"IChainlinkFeed","href":"/developer/technical-reference/contracts/interfaces/ichainlinkfeed"},{"title":"IArbSys","href":"/developer/technical-reference/contracts/interfaces/iarbsys"},{"title":"IChainlinkOracle","href":"/developer/technical-reference/contracts/interfaces/ichainlinkoracle"},{"title":"IERC20","href":"/developer/technical-reference/contracts/interfaces/ierc20"},{"title":"IERC721","href":"/developer/technical-reference/contracts/interfaces/ierc721"},{"title":"IERC721Design","href":"/developer/technical-reference/contracts/interfaces/ierc721design"},{"title":"IGeneralErrors","href":"/developer/technical-reference/contracts/interfaces/igeneralerrors"},{"title":"IGNSAddressStore","href":"/developer/technical-reference/contracts/interfaces/ignsaddressstore"},{"title":"IGNSDiamond","href":"/developer/technical-reference/contracts/interfaces/ignsdiamond"},{"title":"IGNSDiamondCut","href":"/developer/technical-reference/contracts/interfaces/ignsdiamondcut"},{"title":"IGNSMultiCollatDiamond","href":"/developer/technical-reference/contracts/interfaces/ignsmulticollatdiamond"},{"title":"IGNSDiamondLoupe","href":"/developer/technical-reference/contracts/interfaces/ignsdiamondloupe"},{"title":"IGNSStaking","href":"/developer/technical-reference/contracts/interfaces/ignsstaking"},{"title":"IGToken","href":"/developer/technical-reference/contracts/interfaces/igtoken"},{"title":"IGTokenLockedDepositNft","href":"/developer/technical-reference/contracts/interfaces/igtokenlockeddepositnft"},{"title":"IGTokenOpenPnlFeed","href":"/developer/technical-reference/contracts/interfaces/igtokenopenpnlfeed"},{"title":"IGTokenLockedDepositNftDesign","href":"/developer/technical-reference/contracts/interfaces/igtokenlockeddepositnftdesign"},{"title":"ILiquidityPool","href":"/developer/technical-reference/contracts/interfaces/iliquiditypool"},{"title":"IRateProvider","href":"/developer/technical-reference/contracts/interfaces/irateprovider"},{"title":"IOwnable","href":"/developer/technical-reference/contracts/interfaces/iownable"}]},{"group":"Libraries","pages":[{"group":"updateLeverage","pages":[{"title":"UpdateLeverageLifecycles","href":"/developer/technical-reference/contracts/libraries/updateleverage/updateleveragelifecycles"}]},{"group":"updatePositionSize","pages":[{"title":"IncreasePositionSizeUtils","href":"/developer/technical-reference/contracts/libraries/updatepositionsize/increasepositionsizeutils"},{"title":"DecreasePositionSizeUtils","href":"/developer/technical-reference/contracts/libraries/updatepositionsize/decreasepositionsizeutils"},{"title":"UpdatePositionSizeLifecycles","href":"/developer/technical-reference/contracts/libraries/updatepositionsize/updatepositionsizelifecycles"}]},{"title":"AddressStoreUtils","href":"/developer/technical-reference/contracts/libraries/addressstoreutils"},{"title":"ChainlinkClientUtils","href":"/developer/technical-reference/contracts/libraries/chainlinkclientutils"},{"title":"ChainUtils","href":"/developer/technical-reference/contracts/libraries/chainutils"},{"title":"ConstantsUtils","href":"/developer/technical-reference/contracts/libraries/constantsutils"},{"title":"CollateralUtils","href":"/developer/technical-reference/contracts/libraries/collateralutils"},{"title":"DiamondUtils","href":"/developer/technical-reference/contracts/libraries/diamondutils"},{"title":"LiquidityPoolUtils","href":"/developer/technical-reference/contracts/libraries/liquiditypoolutils"},{"title":"OtcUtils","href":"/developer/technical-reference/contracts/libraries/otcutils"},{"title":"PackingUtils","href":"/developer/technical-reference/contracts/libraries/packingutils"},{"title":"StorageUtils","href":"/developer/technical-reference/contracts/libraries/storageutils"},{"title":"TriggerRewardsUtils","href":"/developer/technical-reference/contracts/libraries/triggerrewardsutils"},{"title":"ArrayGetters","href":"/developer/technical-reference/contracts/libraries/arraygetters"},{"title":"BorrowingFeesUtils","href":"/developer/technical-reference/contracts/libraries/borrowingfeesutils"},{"title":"FeeTiersUtils","href":"/developer/technical-reference/contracts/libraries/feetiersutils"},{"title":"PriceAggregatorUtils","href":"/developer/technical-reference/contracts/libraries/priceaggregatorutils"},{"title":"PriceImpactUtils","href":"/developer/technical-reference/contracts/libraries/priceimpactutils"},{"title":"ReferralsUtils","href":"/developer/technical-reference/contracts/libraries/referralsutils"},{"title":"TradingCallbacksUtils","href":"/developer/technical-reference/contracts/libraries/tradingcallbacksutils"},{"title":"PairsStorageUtils","href":"/developer/technical-reference/contracts/libraries/pairsstorageutils"},{"title":"TradingCommonUtils","href":"/developer/technical-reference/contracts/libraries/tradingcommonutils"},{"title":"TradingStorageUtils","href":"/developer/technical-reference/contracts/libraries/tradingstorageutils"},{"title":"TradingInteractionsUtils","href":"/developer/technical-reference/contracts/libraries/tradinginteractionsutils"}]},{"group":"Misc","pages":[{"title":"EpochBasedTokenClaim","href":"/developer/technical-reference/contracts/misc/epochbasedtokenclaim"},{"title":"GNSCompensationHandler","href":"/developer/technical-reference/contracts/misc/gnscompensationhandler"},{"title":"GTokenRateProvider","href":"/developer/technical-reference/contracts/misc/gtokenrateprovider"},{"title":"GTokenLockedDepositNftDesign","href":"/developer/technical-reference/contracts/misc/gtokenlockeddepositnftdesign"},{"title":"ManagerTimelock","href":"/developer/technical-reference/contracts/misc/managertimelock"},{"title":"OwnerTimelock","href":"/developer/technical-reference/contracts/misc/ownertimelock"},{"title":"VotingDelegator","href":"/developer/technical-reference/contracts/misc/votingdelegator"}]},{"group":"Tokens","pages":[{"title":"GainsNetworkToken","href":"/developer/technical-reference/contracts/tokens/gainsnetworktoken"},{"title":"GTokenLockedDepositNft","href":"/developer/technical-reference/contracts/tokens/gtokenlockeddepositnft"}]}]},{"group":"Backend","pages":[{"title":"Backend Types","href":"/developer/technical-reference/backend/backend-types"}]},{"group":"SDK","pages":[{"title":"SDK","href":"/developer/technical-reference/sdk"},{"title":"Client Types","href":"/developer/technical-reference/sdk/client-types"}]}]}]},{"tab":"$GNS","pages":[{"title":"$GNS","href":"/what-is-gains-network/summary"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Mark + Index Introduction - Gains Trade","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}