The following components must be used when using TradingPage:
OrderlyAppProvider- for global settings, state managements, Account instance etc.
Wallet connection components - for connecting and managing wallet connections. You can use your own wallet connection components, or use the ConnectorProvider compoenent within @orderly.network/web3-onboard. For more details, please see this page.
import { TradingPage, OrderlyAppProvider } from "@orderly.network/react";import { ConnectorProvider } from "@orderly.network/web3-onboard";export default function Trading() { // A component that provides wallet connectivity, // but you can also use any wallet connection component that you customize return ( <ConnectorProvider apiKey="<Your web3-onboard's api key>" options={`metadata`}> <OrderlyAppProvider networkId="testnet" brokerId="<Your broker id>" logoUrl="<Your brand logo url>" > <TradingPage symbol={"PERP_ETH_USDC"} tradingViewConfig={`tradingView config`} onSymbolChange={`onSymbolChange handler`} /> </OrderlyAppProvider> </ConnectorProvider> );}
Monitor user’s action to change active symbol through the onSymbolChange event. This is an optional property, but user will not be able to change the active symbol if this is not set. Please see the API for more details.
import { TradingPage } from "@orderly.network/react";export default function Trading() { return ( <TradingPage symbol={"PERP_ETH_USDC"} tradingViewConfig={`tradingView config`} onSymbolChange={`onSymbolChange handler`} /> );}
TradingView charting config. Since @orderly.network/react does not include the tradingView library, you would have to configure the path for the tradingView Advanced Charts js library. After that, the @orderly.network/react package will use the configured library to load the tradingView scripts and create a k-line chart.
TradingView Advanced Charts is free to use, but you need to manually apply for the license here.
Once you obtained access to TradingView Advanced Charts, you can configure it as below:
If this is not configured, then the k-line chart will not be displayed.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Orderly","colors":{"primary":"#aa5cf8","light":"#BE7CFF","dark":"#aa5cf8"},"logo":{"light":"https://mintcdn.com/orderly-network-staging/GoLgfYba1CLV7Hn-/logo/light.svg?fit=max\u0026auto=format\u0026n=GoLgfYba1CLV7Hn-\u0026q=85\u0026s=a284c772cd7a2d9d12e66558986910ba","dark":"https://mintcdn.com/orderly-network-staging/GoLgfYba1CLV7Hn-/logo/dark.svg?fit=max\u0026auto=format\u0026n=GoLgfYba1CLV7Hn-\u0026q=85\u0026s=fc450bfc96ea6c25ebb2bca350f5d64a"},"favicon":"https://mintcdn.com/orderly-network-staging/W2c87En2SrxSUBGJ/favicon.png?fit=max\u0026auto=format\u0026n=W2c87En2SrxSUBGJ\u0026q=85\u0026s=6d4dbe3d03cbecc127b55cb8fb064eb7","api":{"openapi":["orderly.openapi.yaml","sv.openapi.yaml"]},"appearance":{"default":"dark"},"background":{"image":"https://mintcdn.com/orderly-network-staging/eQ3a3CD-iQx6FVnc/images/sdks/color-bg.png?fit=max\u0026auto=format\u0026n=eQ3a3CD-iQx6FVnc\u0026q=85\u0026s=750890d7f41071674e77b8c1b06a20ff"},"navbar":{"links":[{"href":"https://linktr.ee/orderlynetwork","label":"Socials"}]},"footer":{"socials":{"twitter":"https://twitter.com/OrderlyNetwork","linkedin":"https://www.linkedin.com/company/orderly-network","discord":"https://discord.gg/orderlynetwork","medium":"https://medium.com/@orderlynetwork"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"orderly-network-staging","hasAudioNarration":false,"actualSubdomain":"orderly-network-staging","customDomains":["staging-docs.orderly.network"],"gitSource":{"type":"github","owner":"orderlynetwork","repo":"documentation","deployBranch":"staging","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adf61a5808b7de58451a40c","collectionId":"1d393afa-41b2-4c92-b1c7-1f98cd2dc3e6","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf61a5808b7de58451a40c"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adf61a5808b7de58451a40c","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"Build on Omnichain","count":348},{"language":"default","tag":"SDKs","count":209},{"language":"default","tag":"Autogenerated technical reference","count":131},{"language":"default","tag":"Builder API","count":83},{"language":"default","tag":"Interfaces","count":72},{"language":"default","tag":"[evm] react hooks SDK","count":62},{"language":"default","tag":"Trading API","count":50},{"language":"default","tag":"Introduction","count":46},{"language":"default","tag":"User API","count":41},{"language":"default","tag":"Websocket API","count":38}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"editor-v7-file-tree","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"iframe.preview{width:100%;min-height:500px}#sidebar-content button[aria-expanded]{align-items:center!important}#sidebar-content button[aria-expanded] svg{align-self:center}.omnichain-release-notes-marker~h2{margin:2.5rem 0 .9rem;padding-bottom:0;border-bottom:0;font-size:clamp(1.4rem,1.1rem + 1vw,2rem);letter-spacing:-.02em}.omnichain-release-notes-marker~h2+div{display:grid!important;gap:.75rem;padding:1.1rem 1.15rem;border:1px solid rgba(150,150,170,.18);border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.04));box-shadow:0 1px 0 rgba(255,255,255,.02) inset}.omnichain-release-notes-marker~h2+div>div{display:block!important;width:100%!important;padding-top:1rem;border-top:1px solid rgba(150,150,170,.12)}.omnichain-release-notes-marker~h2+div>div:first-child{padding-top:0;border-top:0}.omnichain-release-notes-marker~h2+div>div>div:first-child{float:none!important;display:inline-flex!important;width:auto!important;min-width:0;margin:0;margin-bottom:.55rem}.omnichain-release-notes-marker~h2+div>div>div:first-child p{margin:0}.omnichain-release-notes-marker~h2+div>div>div:first-child span[data-as=p]{background:0 0!important}.omnichain-release-notes-marker~h2+div .orderly-chip-times{background:rgba(202,148,0,.14)!important;color:#f2d17a!important;border:0!important}html:not(.dark) .omnichain-release-notes-marker~h2+div .orderly-chip-times{background:rgba(202,148,0,.12)!important;color:#8a6400!important}.omnichain-release-notes-marker~h2+div>div>div:last-child{float:none!important;display:block!important;width:auto!important;min-width:0;padding-left:0!important;margin-left:0!important}.omnichain-release-notes-marker~h2+div>div>div:last-child>p{margin:0}.omnichain-release-notes-marker~h2+div>div>div:last-child>span[data-as=p]{display:block;margin-top:0;font-size:.95rem;line-height:1.45}.omnichain-release-notes-marker~h2+div>div>div:last-child>span[data-as=p]:first-child strong{display:block;font-weight:600}.omnichain-release-notes-marker~h2+div>div>div:last-child>span[data-as=p]:nth-child(2){margin-top:.25rem;font-size:1rem;font-weight:600}.omnichain-release-notes-marker~h2+div>div>div:last-child ul{margin:.35rem 0 0;padding-left:1.2rem}.omnichain-release-notes-marker~h2+div>div>div:last-child li{margin:.2rem 0;line-height:1.6}@media (max-width:720px){.omnichain-release-notes-marker~h2+div{padding:.95rem .9rem}.omnichain-release-notes-marker~h2+div>div>div:first-child{width:auto!important;min-width:0}}.sdk-overview-cards .card{height:auto!important;margin-bottom:1.25rem!important}.sdk-overview-cards .card.block{display:flex;flex-direction:column}@media screen and (max-width:768px){.sdk-overview-cards .card{margin-bottom:1rem!important}}@media screen and (min-width:1024px){.container{display:flex}.left{width:30%}.right{width:70%}.card{position:relative;height:fit-content;border:1px solid #2a1f3a;padding:16px;border-radius:8px;transition:border .3s ease-in-out;background-color:#16132b;margin-bottom:10px}.gold,.silver{position:absolute;top:8px;left:8px;z-index:10}.card a img,.card img{pointer-events:none;cursor:default}.card:hover{border-color:gold}.card .gold,.card .silver{left:8px;color:#2a1f3a;border-radius:8px;font-size:12px;padding:.5px 5px;font-weight:700;transition:border .3s ease-in-out}.card .gold{position:absolute;top:8px;background:linear-gradient(135deg,#856220,#f4e683,#bf923d,#f1ea82,#4e341b);display:none}.card:hover .bronze,.card:hover .gold,.card:hover .link,.card:hover .silver{display:block}.card .silver{background:linear-gradient(135deg,#856220,#c9c9c9,#7d7d7d,#a5a5a5)}.card .bronze,.card .link,.card .silver{position:absolute;top:8px;display:none}.card .bronze{left:8px;background:linear-gradient(135deg,#856220,#f6cba2,#9d6939,#e9a363);color:#2a1f3a;border-radius:8px;font-size:12px;padding:.5px 5px;font-weight:700;transition:border .3s ease-in-out}.card .link{right:8px;width:20px;height:20px}.content-before{height:100px;display:flex;align-items:center;justify-content:center}.coin98_logo,.logo{height:85px;object-fit:contain}.coin98_logo{margin-left:0}.content-before:hover{cursor:pointer}.search-builders-input{height:10px;width:95%}.search-builders-tier{height:100px;width:95%}.search-builders-tier-btn{background:#16132b;padding:15px;border-radius:10px;display:flex;flex-direction:column;gap:10px;width:95%;height:180px}.filter-header{display:flex;justify-content:space-between;align-items:center;font-weight:700}.reset-btn{background:0 0;color:#a0a0a0;border:1px solid #a0a0a0;padding:5px 10px;border-radius:10px;cursor:pointer;font-size:12px}.reset-btn:hover{color:#fff;border-color:#fff}.filter-item{display:flex;justify-content:space-between;align-items:center;font-size:14px;height:30px}.switch,.tier-icon{display:inline-block}.tier-icon{width:12px;height:12px;border-radius:3px;margin-right:10px}.switch{position:relative;width:34px;height:20px}.switch input{opacity:0;width:0;height:0}.slider,.slider:before{position:absolute;transition:.3s}.slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#555;border-radius:20px}.slider:before{content:\"\";height:14px;width:14px;left:3px;bottom:3px;background-color:#bababa;border-radius:50%}input:checked+.slider{background-color:#b084e9}input:checked+.slider:before{transform:translateX(14px)}.search-builders-network{background:#16132b;padding:15px;border-radius:10px;display:flex;flex-direction:column;gap:10px;width:95%;height:540px}.network-icon{width:18px;height:18px;border-radius:3px;display:inline-block;margin-right:10px}}:root{--home-text-muted:rgb(148, 163, 184);--home-border:rgba(148, 163, 184, 0.15);--home-hero-bg:linear-gradient(\n 135deg,\n rgba(170, 92, 248, 0.06) 0%,\n rgba(170, 92, 248, 0.14) 100%\n );--home-hero-shadow:0 20px 45px rgba(0, 0, 0, 0.2)}:root:not(.dark){--home-text-muted:rgb(100, 116, 139);--home-border:rgba(148, 163, 184, 0.22);--home-hero-bg:linear-gradient(135deg, rgba(15, 23, 42, 0.04) 0%, rgba(170, 92, 248, 0.08) 100%);--home-hero-shadow:0 20px 45px rgba(15, 23, 42, 0.08)}html:not(.dark) .card.block{background-color:#fff!important;border-color:rgba(148,163,184,.25)!important}html:not(.dark) .card.block:hover{border-color:#aa5cf8!important}@media screen and (max-width:768px){.card,.container{display:flex;flex-direction:column}.container{gap:10px}.card{position:relative;border:1px solid #2a1f3a;padding:16px;border-radius:12px;background-color:#16132b;margin-bottom:12px;box-shadow:0 4px 8px rgba(0,0,0,.15);align-items:center;transition:transform .2s ease}.card:active{transform:scale(.98)}.card .bronze,.card .gold,.card .silver{position:absolute;top:8px;left:8px;border-radius:8px;font-size:12px;padding:2px 6px;font-weight:700;color:#2a1f3a}.gold{background:linear-gradient(135deg,#856220,#f4e683,#bf923d,#f1ea82,#4e341b)}.silver{background:linear-gradient(135deg,#856220,#c9c9c9,#7d7d7d,#a5a5a5)}.bronze{background:linear-gradient(135deg,#856220,#f6cba2,#9d6939,#e9a363)}.card .link{position:absolute;top:8px;right:8px;width:20px;height:20px;display:block}.card a img,.card img{pointer-events:none;cursor:default}.content-before{display:flex;justify-content:center;align-items:center;width:100%;min-height:80px}.coin98_logo,.logo{max-height:65px;min-height:40px;max-width:100%;object-fit:contain}.search-builders-input,.search-builders-network,.search-builders-tier{width:100%;border-radius:8px}.search-builders-tier-btn{background:#16132b;padding:15px;border-radius:10px;display:flex;flex-direction:column;gap:10px;width:100%;height:auto}.filter-item{font-size:14px;padding:5px 0}}"}],"page":{"pagePath":"sdks/react/components/trading","slug":"/sdks/react/components/trading","pageMetadata":{"title":"TradingPage","description":"Full-featured TradingPage component with orderbook, chart, order form, positions, and responsive layout.","href":"/sdks/react/components/trading"},"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: \"Full-featured TradingPage component with orderbook, chart, order form, positions, and responsive layout.\"\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={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,OptimizedFrame,OptimizedImage,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedFrame)_missingMdxReference(`OptimizedFrame`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(OptimizedImage,{src:`https://mintcdn.com/orderly-network-staging/eQ3a3CD-iQx6FVnc/images/sdks/react/trading-page.webp?fit=max\u0026auto=format\u0026n=eQ3a3CD-iQx6FVnc\u0026q=85\u0026s=666e4a8ad4d502c29aa1860a21e6020f`,alt:``,\"data-og-width\":`1701`,width:`1701`,\"data-og-height\":`1039`,height:`1039`,\"data-path\":`images/sdks/react/trading-page.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/orderly-network-staging/eQ3a3CD-iQx6FVnc/images/sdks/react/trading-page.webp?w=280\u0026fit=max\u0026auto=format\u0026n=eQ3a3CD-iQx6FVnc\u0026q=85\u0026s=fbee0135d3c9348a07ed220e66da6984 280w, https://mintcdn.com/orderly-network-staging/eQ3a3CD-iQx6FVnc/images/sdks/react/trading-page.webp?w=560\u0026fit=max\u0026auto=format\u0026n=eQ3a3CD-iQx6FVnc\u0026q=85\u0026s=76a07cc7f2c9c5bf8d6e68c8a129ccbd 560w, https://mintcdn.com/orderly-network-staging/eQ3a3CD-iQx6FVnc/images/sdks/react/trading-page.webp?w=840\u0026fit=max\u0026auto=format\u0026n=eQ3a3CD-iQx6FVnc\u0026q=85\u0026s=35f6aab8fa92eb9cd19874acd26b95f5 840w, https://mintcdn.com/orderly-network-staging/eQ3a3CD-iQx6FVnc/images/sdks/react/trading-page.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=eQ3a3CD-iQx6FVnc\u0026q=85\u0026s=ad2f23914f5ef679d3f914ad63f665ae 1100w, https://mintcdn.com/orderly-network-staging/eQ3a3CD-iQx6FVnc/images/sdks/react/trading-page.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=eQ3a3CD-iQx6FVnc\u0026q=85\u0026s=51f6f132d1c7738bffffcf82fbf33401 1650w, https://mintcdn.com/orderly-network-staging/eQ3a3CD-iQx6FVnc/images/sdks/react/trading-page.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=eQ3a3CD-iQx6FVnc\u0026q=85\u0026s=29923bf0addc1b078124db7f10c0d20f 2500w`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`TradingPage`}),` is an App page containing full trading functionalities, and includes the following components:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Orderbook`}),`\n`,_jsx(_components.li,{children:`K-line chart`}),`\n`,_jsx(_components.li,{children:`Order form, list and management`}),`\n`,_jsx(_components.li,{children:`Position list and management`}),`\n`,_jsx(_components.li,{children:`Asset management, deposit and withdrawals`}),`\n`,_jsx(_components.li,{children:`Responsive, automatically adapting to both desktop and mobile`}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`For more features, please visit the `,_jsx(_components.a,{href:`https://demo.orderly.network/`,children:`demo page`}),`. The demo page is\nopen source and the source code can be found\n`,_jsx(_components.a,{href:`https://github.com/OrderlyNetwork/js-sdk-demo`,children:`here`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`preview`,children:`Preview`}),`\n`,_jsx(OptimizedFrame,{className:`preview`,src:`https://storybook.orderly.network/iframe.html?globals=theme%3Acustom\u0026id=package-trading-tradingpage--page\u0026viewMode=story`,title:`Trading Page`,frameBorder:`0`,allowFullScreen:true}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsx(Heading,{level:`3`,id:`dependencies`,children:`Dependencies`}),`\n`,_jsxs(_components.p,{children:[`The following components must be used when using `,_jsx(_components.code,{children:`TradingPage`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`OrderlyAppProvider`}),`- for global settings, state managements, `,_jsx(_components.code,{children:`Account`}),` instance etc.`]}),`\n`,_jsxs(_components.li,{children:[`Wallet connection components - for connecting and managing wallet connections. You can use your own wallet connection components, or use the `,_jsx(_components.code,{children:`ConnectorProvider`}),` compoenent within `,_jsx(_components.code,{children:`@orderly.network/web3-onboard`}),`. For more details, please see `,_jsx(_components.a,{href:`/sdks/react/wallet`,children:`this page`}),`.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`tsx`,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:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`22`,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:`TradingPage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OrderlyAppProvider`}),_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:` \"@orderly.network/react\"`}),_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:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ConnectorProvider`}),_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:` \"@orderly.network/web3-onboard\"`}),_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:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Trading`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_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:` // A component that provides wallet connectivity,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // but you can also use any wallet connection component that you customize`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_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\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`ConnectorProvider`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cYour web3-onboard's api key>\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` options`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`metadata`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`OrderlyAppProvider`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` networkId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"testnet\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` brokerId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cYour broker id>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` logoUrl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cYour brand logo url>\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` >`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`TradingPage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` symbol`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PERP_ETH_USDC\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` tradingViewConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`tradingView config`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onSymbolChange`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`onSymbolChange handler`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`OrderlyAppProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`ConnectorProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`setting-active-symbol`,children:`Setting active symbol`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Set the active symbol through the `,_jsx(_components.code,{children:`symbol`}),` property`]}),`\n`,_jsxs(_components.li,{children:[`Monitor user’s action to change active symbol through the `,_jsx(_components.code,{children:`onSymbolChange`}),` event. This is an optional property, but user will not be able to change the active symbol if this is not set. Please see the `,_jsx(_components.a,{href:`#onsymbolchange`,children:`API`}),` for more details.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`tsx`,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:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`11`,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:`TradingPage`}),_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:` \"@orderly.network/react\"`}),_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:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Trading`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},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\":`#C586C0`},children:` return`}),_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\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`TradingPage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` symbol`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PERP_ETH_USDC\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` tradingViewConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`tradingView config`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onSymbolChange`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`onSymbolChange handler`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`apis`,children:`APIs`}),`\n`,_jsx(Heading,{level:`3`,id:`symbol`,children:`symbol`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Type: `,_jsx(_components.code,{children:`string`})]}),`\n`,_jsx(_components.li,{children:`Required: true`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Sets the active symbol, e.g. `,_jsx(_components.code,{children:`PERP_ETH_USDC`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`onsymbolchange`,children:`onSymbolChange`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Type: `,_jsx(_components.code,{children:`(symbol: API.Symbol) => void`})]}),`\n`,_jsx(_components.li,{children:`Required: false`}),`\n`]}),`\n`,_jsx(_components.p,{children:`This event will be triggered when user selects a new active symbol. The parameter will be the new symbol chosen.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`tsx`,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:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`14`,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:`TradingPage`}),_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:` \"@orderly.network/react\"`}),_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:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Trading`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`symbol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`setSymbol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useState`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PERP_ETH_USDC\"`}),_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:` return`}),_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\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`TradingPage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` symbol`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`symbol`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` tradingViewConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`tradingView config`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onSymbolChange`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`symbol`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setSymbol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`symbol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`symbol`}),_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\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`tradingviewconfig`,children:`tradingViewConfig`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Type: `,_jsx(_components.code,{children:`TradingViewConfig`})]}),`\n`,_jsx(_components.li,{children:`Required: false`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`TradingView charting config. Since `,_jsx(_components.code,{children:`@orderly.network/react`}),` does not include the `,_jsx(_components.code,{children:`tradingView`}),` library, you would have to configure the path for the `,_jsx(_components.code,{children:`tradingView`}),` Advanced Charts js library. After that, the `,_jsx(_components.code,{children:`@orderly.network/react`}),` package will use the configured library to load the `,_jsx(_components.code,{children:`tradingView`}),` scripts and create a k-line chart.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`TradingView Advanced Charts is free to use, but you need to manually apply for the license `,_jsx(_components.a,{href:`https://www.tradingview.com/advanced-charts/`,children:`here`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Once you obtained access to TradingView Advanced Charts, you can configure it as below:`}),`\n`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`tsx`,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:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`14`,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:`TradingPage`}),_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:` \"@orderly.network/react\"`}),_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:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Trading`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},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\":`#C586C0`},children:` return`}),_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\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`TradingPage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` symbol`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PERP_ETH_USDC\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` tradingViewConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` scriptSRC:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/assets/chart/charting_library/charting_library.js\"`}),_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:` library_path:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/assets/chart/charting_library/\"`}),_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:` customCssUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/assets/chart/custom.css\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // optional`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsx(Warning,{children:`If this is not configured, then the k-line chart will not be displayed.`})]})}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":"TradingPage","description":"Full-featured TradingPage component with orderbook, chart, order form, positions, and responsive layout.","href":"/sdks/react/components/trading"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Preview","slug":"preview","depth":2,"children":[]},{"title":"Usage","slug":"usage","depth":2,"children":[{"title":"Dependencies","slug":"dependencies","depth":3,"children":[]},{"title":"Setting active symbol","slug":"setting-active-symbol","depth":3,"children":[]}]},{"title":"APIs","slug":"apis","depth":2,"children":[{"title":"symbol","slug":"symbol","depth":3,"children":[]},{"title":"onSymbolChange","slug":"onsymbolchange","depth":3,"children":[]},{"title":"tradingViewConfig","slug":"tradingviewconfig","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"orderly-network-staging","siteName":"Orderly","title":"TradingPage - Orderly","navMaps":{"firstHrefInVersion":{"latest":{"href":"/sdks/react/components/trading","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-06-20T02:01:32.198Z","originalFileLocation":"sdks/react/components/trading.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=\"dark\"}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=\"Full-featured TradingPage component with orderbook, chart, order form, positions, and responsive layout.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Orderly\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/orderly-network-staging/XHlLD0IGik6x_eVv/_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/orderly-network-staging/XHlLD0IGik6x_eVv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/orderly-network-staging/XHlLD0IGik6x_eVv/_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/orderly-network-staging/XHlLD0IGik6x_eVv/_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/orderly-network-staging/XHlLD0IGik6x_eVv/_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/orderly-network-staging/XHlLD0IGik6x_eVv/_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/orderly-network-staging/XHlLD0IGik6x_eVv/_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/orderly-network-staging/XHlLD0IGik6x_eVv/_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/orderly-network-staging/XHlLD0IGik6x_eVv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"TradingPage - Orderly\">\u003cmeta data-mint-head property=\"og:description\" content=\"Full-featured TradingPage component with orderbook, chart, order form, positions, and responsive layout.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Orderly\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://staging-docs.orderly.network/sdks/react/components/trading\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://orderly-network-staging.mintlify.app/_mintlify/api/og/v2?division=Page+components\u0026amp;title=TradingPage\u0026amp;description=Full-featured+TradingPage+component+with+orderbook%2C+chart%2C+order+form%2C+positions%2C+and+responsive+layout.\u0026amp;theme=ccdcad4c7ba74ae6dad1d78c\u0026amp;signature=5d28f2d6598404851932408add01561e5c4adce600b7ae30fd539f724670324b\">\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=\"TradingPage - Orderly\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Full-featured TradingPage component with orderbook, chart, order form, positions, and responsive layout.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://orderly-network-staging.mintlify.app/_mintlify/api/og/v2?division=Page+components\u0026amp;title=TradingPage\u0026amp;description=Full-featured+TradingPage+component+with+orderbook%2C+chart%2C+order+form%2C+positions%2C+and+responsive+layout.\u0026amp;theme=ccdcad4c7ba74ae6dad1d78c\u0026amp;signature=5d28f2d6598404851932408add01561e5c4adce600b7ae30fd539f724670324b\">\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/orderly-network-staging/XHlLD0IGik6x_eVv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Orderly\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#aa5cf8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://staging-docs.orderly.network/sdks/react/components/trading\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdks/react/components/trading.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://staging-docs.orderly.network/#organization\",\"name\":\"Orderly\",\"url\":\"https://staging-docs.orderly.network\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/orderly-network-staging/GoLgfYba1CLV7Hn-/logo/light.svg?fit=max\u0026auto=format\u0026n=GoLgfYba1CLV7Hn-\u0026q=85\u0026s=a284c772cd7a2d9d12e66558986910ba\"}},{\"@type\":\"WebSite\",\"@id\":\"https://staging-docs.orderly.network#website\",\"name\":\"Orderly\",\"url\":\"https://staging-docs.orderly.network\",\"publisher\":{\"@id\":\"https://staging-docs.orderly.network/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://staging-docs.orderly.network/sdks/react/components/trading#webpage\",\"url\":\"https://staging-docs.orderly.network/sdks/react/components/trading\",\"name\":\"TradingPage\",\"description\":\"Full-featured TradingPage component with orderbook, chart, order form, positions, and responsive layout.\",\"dateModified\":\"2026-06-20T02:01:32.198Z\",\"isPartOf\":{\"@id\":\"https://staging-docs.orderly.network#website\"},\"breadcrumb\":{\"@id\":\"https://staging-docs.orderly.network/sdks/react/components/trading#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://staging-docs.orderly.network/sdks/react/components/trading#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"[evm] react components SDK\",\"item\":\"https://staging-docs.orderly.network/sdks/react/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TradingPage\",\"item\":\"https://staging-docs.orderly.network/sdks/react/components/trading\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://staging-docs.orderly.network/sdks/react/components/trading#article\",\"headline\":\"TradingPage\",\"name\":\"TradingPage\",\"description\":\"Full-featured TradingPage component with orderbook, chart, order form, positions, and responsive layout.\",\"url\":\"https://staging-docs.orderly.network/sdks/react/components/trading\",\"mainEntityOfPage\":{\"@id\":\"https://staging-docs.orderly.network/sdks/react/components/trading#webpage\"},\"dateModified\":\"2026-06-20T02:01:32.198Z\",\"publisher\":{\"@id\":\"https://staging-docs.orderly.network/#organization\"},\"isPartOf\":{\"@id\":\"https://staging-docs.orderly.network#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Orderly\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Orderly","nav":{"global":null,"versions":[{"version":"latest","tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/home"}]},{"tab":"Introduction","pages":[{"title":"Introduction","href":"/introduction/getting-started/what-is-orderly"}]},{"tab":"Build on Omnichain","pages":[{"title":"Build on Omnichain","href":"/build-on-omnichain/building-on-omnichain"}]},{"tab":"SDKs","groups":[{"group":"Software development kits","pages":[{"title":"List of SDKs","href":"/sdks/overview"},{"title":"SDK Best Practices","href":"/sdks/best-practices"},{"title":"Release Notes","href":"/sdks/release-notes"}]},{"group":"[evm] react components SDK","pages":[{"title":"Overview","icon":"react","href":"/sdks/react/overview"},{"title":"Getting started","href":"/sdks/react/getting_started"},{"title":"Theming","href":"/sdks/react/theming"},{"title":"Wallet connect","href":"/sdks/react/wallet"},{"group":"Framework guides","pages":[{"title":"Next.js","description":"How to set up the Orderly SDK in a Next.js project with App Router or Page Router.","href":"/sdks/react/next"}]},{"group":"Page components","pages":[{"title":"TradingPage","href":"/sdks/react/components/trading"}]},{"group":"Block components","pages":[{"title":"Deposit","description":"Pre-built React component for token deposits with wallet connection handling and modal support.","href":"/sdks/react/components/deposit"},{"title":"Withdraw","href":"/sdks/react/components/withdraw"},{"title":"Order Book","href":"/sdks/react/components/order_book"},{"title":"Portfolio","href":"/sdks/react/components/portfolio"},{"title":"Scaffold","href":"/sdks/react/components/scaffold"}]}]},{"group":"[evm] react hooks SDK","pages":[{"title":"Overview","icon":"react","href":"/sdks/hooks/overview"},{"title":"Setup","href":"/sdks/hooks/setup"},{"group":"API requests","pages":[{"title":"Low-level API","href":"/sdks/hooks/api/api"},{"title":"useQuery","href":"/sdks/hooks/api/use-query"},{"title":"usePrivateQuery","href":"/sdks/hooks/api/use-private-query"},{"title":"usePrivateInfiniteQuery","href":"/sdks/hooks/api/use-private-infinite-query"},{"title":"useLazyQuery","href":"/sdks/hooks/api/use-lazy-query"},{"title":"useMutation","href":"/sdks/hooks/api/use-mutation"},{"title":"useWS","href":"/sdks/hooks/api/use-ws"},{"title":"useWsStatus","href":"/sdks/hooks/api/use-ws-status"}]},{"group":"Utility","pages":[{"title":"Utility","href":"/sdks/hooks/util/util"},{"title":"useConfig","href":"/sdks/hooks/util/use-config"},{"title":"useEventEmitter","href":"/sdks/hooks/util/use-event-emitter"},{"title":"useLocalStorage","href":"/sdks/hooks/util/use-local-storage"},{"title":"useSessionStorage","href":"/sdks/hooks/util/use-session-storage"},{"title":"useMediaQuery","href":"/sdks/hooks/util/use-media-query"}]},{"group":"Account","pages":[{"title":"Account","href":"/sdks/hooks/account/account"},{"title":"useAccount","href":"/sdks/hooks/account/use-account"},{"title":"useAccountInfo","href":"/sdks/hooks/account/use-account-info"},{"title":"useAccountInstance","href":"/sdks/hooks/account/use-account-instance"},{"title":"useWalletConnector","href":"/sdks/hooks/account/use-wallet-connector"},{"title":"useWalletSubscription","href":"/sdks/hooks/account/use-wallet-subscription"},{"title":"useLeverage","href":"/sdks/hooks/account/use-leverage"},{"title":"useMarginRatio","href":"/sdks/hooks/account/use-margin-ratio"},{"title":"useSettleSubscription","href":"/sdks/hooks/account/use-settle-subscription"},{"title":"useDaily","href":"/sdks/hooks/account/use-daily"}]},{"group":"Assets","pages":[{"title":"Assets","href":"/sdks/hooks/assets/assets"},{"title":"useCollateral","href":"/sdks/hooks/assets/use-collateral"},{"title":"useMaxQty","href":"/sdks/hooks/assets/use-max-qty"},{"title":"useChain","href":"/sdks/hooks/assets/use-chain"},{"title":"useChains","href":"/sdks/hooks/assets/use-chains"},{"title":"useDeposit","href":"/sdks/hooks/assets/use-deposit"},{"title":"useWithdraw","href":"/sdks/hooks/assets/use-withdraw"},{"title":"useHoldingStream","href":"/sdks/hooks/assets/use-holding-stream"}]},{"group":"Market data","pages":[{"title":"Market data","href":"/sdks/hooks/market-data/markets"},{"title":"useOrderbookStream","href":"/sdks/hooks/market-data/use-orderbook-stream"},{"title":"useIndexPrice","href":"/sdks/hooks/market-data/use-index-price"},{"title":"useMarkPrice","href":"/sdks/hooks/market-data/use-mark-price"},{"title":"useMarkPricesStream","href":"/sdks/hooks/market-data/use-mark-prices-stream"},{"title":"useMarketTradeStream","href":"/sdks/hooks/market-data/use-market-trade-stream"},{"title":"useMarkets","href":"/sdks/hooks/market-data/use-markets"},{"title":"useMarketsStream","href":"/sdks/hooks/market-data/use-markets-stream"},{"title":"useTickerStream","href":"/sdks/hooks/market-data/use-ticker-stream"},{"title":"useSymbolsInfo","href":"/sdks/hooks/market-data/use-symbols-info"},{"title":"useSymbolPriceRange","href":"/sdks/hooks/market-data/use-symbol-price-range"}]},{"group":"Orders","pages":[{"title":"Orders","href":"/sdks/hooks/orders/orders"},{"title":"useOrderEntry","href":"/sdks/hooks/orders/use-order-entry"},{"title":"useOrderStream","href":"/sdks/hooks/orders/use-order-stream"},{"title":"useTPSL","href":"/sdks/hooks/orders/use-tp-sl"}]},{"group":"Positions","pages":[{"title":"usePositionStream","href":"/sdks/hooks/positions/use-position-stream"},{"title":"usePoster","href":"/sdks/hooks/positions/use-poster"}]},{"group":"Funding","pages":[{"title":"Funding","href":"/sdks/hooks/funding/funding"},{"title":"useFundingRate","href":"/sdks/hooks/funding/use-funding-rate"}]},{"group":"Referral","pages":[{"title":"Referral","href":"/sdks/hooks/referral/referral"},{"title":"useCheckReferralCode","href":"/sdks/hooks/referral/use-check-referral-code"},{"title":"useGetReferralCode","href":"/sdks/hooks/referral/use-get-referral-code"},{"title":"useDaily","href":"/sdks/hooks/referral/use-daily"},{"title":"useRefereeInfo","href":"/sdks/hooks/referral/use-referee-info"},{"title":"useRefereeHistory","href":"/sdks/hooks/referral/use-referee-history"},{"title":"useRefereeRebateSummary","href":"/sdks/hooks/referral/use-referee-rebate-summary"},{"title":"useReferralInfo","href":"/sdks/hooks/referral/use-referral-info"},{"title":"useReferralRebateSummary","href":"/sdks/hooks/referral/use-referral-rebate-summary"}]}]},{"group":"[evm] core SDK","pages":[{"title":"Overview","href":"/sdks/core/overview"}]},{"group":"[evm] perp SDK","pages":[{"title":"Overview","icon":"chart-line","href":"/sdks/perp/overview"}]},{"group":"Autogenerated technical reference","pages":[{"title":null,"href":"/sdks/tech-doc/README"},{"title":null,"href":"/sdks/tech-doc/modules"},{"group":"Modules","pages":[{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_core.EventEmitter"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_core"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_core.utils"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_hooks.RefferalAPI"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_hooks"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_hooks.utils"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_net"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_perp.account"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_perp"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_perp.orderUtils"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_perp.positions"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.Calendar"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.DialogBody"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.DialogFooter"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.DialogHeader"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.DropdownMenuShortcut"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.SheetFooter"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.SheetHeader"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.TabPane"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react.Tooltip"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_react"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_trading_view"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_types.API"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_types.WSMessage"},{"title":null,"href":"/sdks/tech-doc/modules/orderly_network_types"}]},{"group":"Interfaces","pages":[{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.AccountState"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.ConfigStore"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.EventEmitter.EventEmitterStatic"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.EventEmitter.ListenerFn"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.IContract"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.OrderlyKeyPair"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.OrderlyKeyStore"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.Signer"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_core.WalletAdapter"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.CallOptions"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.ConfigProviderProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.ControlFunctions"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.DebouncedState"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.Favorite"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.FavoriteTab"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.Options"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.OrderlyConfigContextState"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.Recent"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.RefferalAPI.ReferralInfo"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.StatusContextState"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_hooks.WalletAdapter"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.AccountStatusProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.DepositProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.InputProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.MarketsProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.ModalHocProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.OrderBookProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.OrderEntryProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.OrdersViewProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.PositionsViewProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.TabContextState"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.TabPaneProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.TradeHistoryProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.TradingPageContextValue"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_react.WithdrawProps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_trading_view.DisplayControlSettingInterface"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_trading_view.TradingViewOptions"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_trading_view.TradingViewPorps"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.AccountInfo"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.AlgoOrder"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.AlgoOrderExt"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.Chain"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.ChainDetail"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.FundingRate"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.Holding"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.MarketInfo"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.MarketInfoExt"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.NetworkInfos"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.Order"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.OrderExt"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.OrderResponse"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.Position"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.PositionExt"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.PositionInfo"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.PositionTPSLExt"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.Symbol"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.SymbolExt"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.Token"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.TokenInfo"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.TokenItem"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.API.Trade"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.BaseAlgoOrderEntity"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.ChainConfig"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.ChainInfo"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.NativeCurrency"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.OrderEntity"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.WSMessage.AlgoOrder"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.WSMessage.MarkPrice"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.WSMessage.Order"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.WSMessage.Position"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.WSMessage.Ticker"},{"title":null,"href":"/sdks/tech-doc/interfaces/orderly_network_types.WSMessage.VaultBalance"}]},{"group":"Enums","pages":[{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_hooks.MarketsType"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_hooks.WsNetworkStatus"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_net.WebSocketEvent"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_react.ExtensionPosition"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_react.TradingFeatures"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_trading_view.ChartMode"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.AccountStatusEnum"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.AlgoOrderRootType"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.AlgoOrderType"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.ExchangeStatusEnum"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.OrderSide"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.OrderStatus"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.OrderType"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.PositionSide"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.SystemStateEnum"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.TriggerPriceType"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.WS_WalletStatusEnum"},{"title":null,"href":"/sdks/tech-doc/enums/orderly_network_types.WithdrawStatus"}]},{"group":"Classes","pages":[{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.Account"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.BaseKeyStore"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.BaseOrderlyKeyPair"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.BaseSigner"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.DefaultConfigStore"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.EtherAdapter"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.EventEmitter-1"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.LocalStorageStore"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.MockKeyStore"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_core.SimpleDI"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_net.WS"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_trading_view.Datafeed"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_types.ApiError"},{"title":null,"href":"/sdks/tech-doc/classes/orderly_network_types.SDKError"}]}]}]},{"tab":"Strategy vault","pages":[{"title":"Strategy vault","href":"/introduction/orderly-omniVault/overview"}]},{"tab":"Troubleshooting","pages":[{"title":"Troubleshooting","href":"/troubleshooting/introduction"}]},{"tab":"Release notes","pages":[{"title":"Release notes","href":"/release-notes/omnichain"}]}]},{"version":"pre-release","href":"https://staging-docs.orderly.network"}]},"title":"TradingPage - Orderly","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-BZxD9MAj.js","lightbox-handle-r17bVUz3.js"]}