from finance_dev import FinanceDev, modelswith FinanceDev( security=models.Security( client_id="<YOUR_CLIENT_ID_HERE>", client_secret="<YOUR_CLIENT_SECRET_HERE>", ),) as fd_client: res = fd_client.orders.list_active_orders(id="TEST-ACCOUNT-001", limit=50, cursor=0) while res is not None: # Handle items res = res.next()
import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.accounts.orders.listActive({
id: "TEST-ACCOUNT-001",
});
for await (const page of result) {
console.log(page);
}
}
run();
Paginated active orders for an account from the trade read service: open orders plus today’s terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates.
Use Case: Drive a live blotter or reconcile REST snapshots with accUpdates by merging on clOrdId.
GET
/
v2
/
accounts
/
{id}
/
orders
Python (SDK)
from finance_dev import FinanceDev, modelswith FinanceDev( security=models.Security( client_id="<YOUR_CLIENT_ID_HERE>", client_secret="<YOUR_CLIENT_SECRET_HERE>", ),) as fd_client: res = fd_client.orders.list_active_orders(id="TEST-ACCOUNT-001", limit=50, cursor=0) while res is not None: # Handle items res = res.next()
import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.accounts.orders.listActive({
id: "TEST-ACCOUNT-001",
});
for await (const page of result) {
console.log(page);
}
}
run();
Every 200 response includes orders (array, never null — may be empty) and nextCursor (int64, 0 when there are no more pages). Each order always includes clOrdId, accountId, symbol, quantity/price fields (qty, price, stopPrice, cumQty, leavesQty, avgPrice), and createdAt / updatedAt. Fields such as side, type, ordStatus, and legs may be omitted when unset.
Numeric quantities and prices are returned as decimal strings to preserve precision. The shape is consistent whether the data was served from cache or the database.
Maximum number of orders to return in this page. Use smaller values for UI lists and larger values for back-office exports. Default is 50; maximum is 500.
Opaque pagination cursor. Send 0 (or omit) for the first page; pass the previous response's nextCursor for subsequent pages. Stop when nextCursor is absent.
Response
Page of active orders
Paginated v2 orders response from GET /v2/accounts/{id}/orders and GET /v2/accounts/{id}/orders/history. orders is always present; nextCursor is present only when another page exists.
Page of orders in v2 domain shape (TradeOrderV2). null from GET /v2/accounts/{id}/orders when the account has no active orders; an empty array from the history endpoint when there are no matches.
Opaque pagination cursor. Pass as cursor on the next request. This field is omitted on the final page.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Aries API","colors":{"primary":"#0BAA5E","light":"#0BAA5E","dark":"#098F4E"},"logo":{"light":"https://mintcdn.com/ariesfinancialinc/RAN-JEltzDnib-_A/logo/light.svg?fit=max\u0026auto=format\u0026n=RAN-JEltzDnib-_A\u0026q=85\u0026s=4eae127cdf55bb09159d2b5a625690e3","dark":"https://mintcdn.com/ariesfinancialinc/RAN-JEltzDnib-_A/logo/dark.svg?fit=max\u0026auto=format\u0026n=RAN-JEltzDnib-_A\u0026q=85\u0026s=fbee595bbc78c2506c5e92673b91d2c7"},"favicon":"https://mintcdn.com/ariesfinancialinc/RAN-JEltzDnib-_A/favicon.svg?fit=max\u0026auto=format\u0026n=RAN-JEltzDnib-_A\u0026q=85\u0026s=0c47f5ea65b933ab26eae6eaca2fc12c","api":{"openapi":["openapi.json"],"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"mailto:support@aries.com","label":"Support"}],"primary":{"type":"button","label":"Aries","href":"https://aries.com"}},"contextual":{"options":["chatgpt","claude","view"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ariesfinancialinc","hasAudioNarration":false,"actualSubdomain":"ariesfinancialinc","customDomains":["finance.dev"],"gitSource":{"type":"github","owner":"aries-financial-inc","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeab772bd6bd4d02bb4d556","collectionId":"5f3965ef-2edc-49ee-be66-8e32e0157ac3","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeab772bd6bd4d02bb4d556"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aeab772bd6bd4d02bb4d556","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Supplemental API","count":116},{"language":"default","tag":"Core API","count":38},{"language":"default","tag":"Orders","count":22},{"language":"default","tag":"Prediction API","count":20},{"language":"default","tag":"Stock Alternative","count":18},{"language":"default","tag":"Analytics","count":13},{"language":"default","tag":"Options","count":11},{"language":"default","tag":"Guide","count":10},{"language":"default","tag":"Stocks","count":10},{"language":"default","tag":"MCP Auth","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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":"llms-txt-v2","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":"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":"vite-origin","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"html{visibility:visible!important;opacity:1!important}body{opacity:1!important;transition:none!important;will-change:auto!important}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeSpeed;font-display:swap}.hero-title{text-align:center!important;font-size:clamp(2rem, 5vw, 3rem)!important;font-weight:700!important;margin:0 auto!important;will-change:transform!important}.hero-description,.hero-title+p{text-align:center!important;max-width:800px!important;margin:1rem auto!important}div[class*=\"CardGroup\"],.card-group{display:grid!important;grid-template-columns:repeat(auto-fit, minmax(300px, 1fr))!important;gap:1.5rem!important;contain:layout style!important;content-visibility:auto!important}.aries-oauth-dialog[open]{display:flex;align-items:center;justify-content:center;width:100%;min-height:100dvh;min-height:100vh;max-width:100vw;max-height:100dvh;max-height:100vh;box-sizing:border-box;margin:0;border:none;padding:1rem;background:transparent;overflow:auto;overscroll-behavior:contain}.aries-oauth-dialog::backdrop{background:rgba(0, 0, 0, 0.65);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.aries-oauth-dialog[data-oauth-theme=\"light\"]::backdrop{background:rgba(0, 0, 0, 0.45);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.aries-oauth-dialog[data-oauth-theme=\"dark\"]::backdrop{background:rgba(0, 0, 0, 0.72);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.welcome-hero{background:linear-gradient(180deg, #ecfdf5 0%, #d1fae5 50%, #ecfdf5 100%)!important}.welcome-hero-gradient{background:linear-gradient(to top, #a7f3d0, transparent)!important}.welcome-feature-box{background:#E7F6EF!important;border:1px solid #0BAA5E!important;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)!important}.welcome-feature-box:hover{background:#DAF2E7!important;border-color:#0BAA5E!important;transform:translateY(-4px)!important;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)!important}.welcome-feature-link{color:#0BAA5E!important}.welcome-feature-title{color:#000000!important}.dark .welcome-hero{background:linear-gradient(180deg, rgba(11, 170, 94, 0.15) 0%, rgba(11, 170, 94, 0.25) 50%, rgba(11, 170, 94, 0.15) 100%)!important}.dark .welcome-hero-gradient{background:linear-gradient(to top, rgba(11, 170, 94, 0.2), transparent)!important}.dark .welcome-feature-box{background:rgba(11, 170, 94, 0.15)!important;border:1px solid rgba(11, 170, 94, 0.5)!important}.dark .welcome-feature-box:hover{background:rgba(11, 170, 94, 0.2)!important;border-color:rgba(11, 170, 94, 0.6)!important}.dark .welcome-feature-link{color:#0BAA5E!important}.dark .welcome-feature-title{color:#FFFFFF!important}.welcome-feature-box-coming-soon{cursor:default!important;pointer-events:none!important}.welcome-feature-box-coming-soon:hover{transform:none!important}.welcome-coming-soon{color:#0BAA5E!important;font-weight:600!important}.dark .welcome-coming-soon{color:#0BAA5E!important}*/\n\n/* Hero Section Theme-Aware Styling */\n/* Light mode hero styling (default) */\n.hero-title{color:#000000!important}.hero-description{color:#000000!important}.hero-footnote{color:#000000!important}.hero-link{color:#0BAA5E!important}.section-title{color:#000000!important}.welcome-cards a[class*=\"Card\"],.welcome-cards .card{transition:transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),\n box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),\n border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),\n background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1)!important;transform-origin:center center!important}.welcome-cards,.welcome-cards div[class*=\"CardGroup\"],.welcome-cards .card-group{overflow:visible!important}.welcome-cards a[class*=\"Card\"]:hover,.welcome-cards .card:hover{transform:translateY(-6px)!important;border-color:rgba(11, 170, 94, 0.45)!important;box-shadow:0 18px 30px -12px rgba(0, 0, 0, 0.16),\n 0 10px 18px -14px rgba(11, 170, 94, 0.35)!important}.dark .welcome-cards a[class*=\"Card\"]:hover,.dark .welcome-cards .card:hover{border-color:rgba(11, 170, 94, 0.55)!important;box-shadow:0 18px 30px -12px rgba(0, 0, 0, 0.45),\n 0 10px 22px -16px rgba(11, 170, 94, 0.35)!important}.dark .hero-title{color:#FFFFFF!important}.dark .hero-description{color:#D1D5DB!important}.dark .hero-footnote{color:#9CA3AF!important}.dark .hero-link{color:#0BAA5E!important}.dark .section-title{color:#FFFFFF!important}@media (max-width: 1024px){.welcome-side-by-side{grid-template-columns:1fr!important}}@media (max-width: 640px){.welcome-cards{padding:0 24px!important}}.dark select,.dark select option{background-color:#000000!important;color:#ffffff!important;border-color:rgba(255, 255, 255, 0.2)!important}.dark select:focus,.dark select:active{background-color:#000000!important;color:#ffffff!important}.dark [class*=\"playground\"] select,.dark [class*=\"api\"] select,.dark [class*=\"request\"] select,.dark form select{background-color:#000000!important;color:#ffffff!important;border-color:rgba(255, 255, 255, 0.2)!important}.dark [class*=\"playground\"] select option,.dark [class*=\"api\"] select option,.dark [class*=\"request\"] select option,.dark form select option{background-color:#000000!important;color:#ffffff!important}select,select option{background-color:#ffffff!important;color:#000000!important}.prompt{background-color:#ffffff!important;border-color:rgba(10, 15, 13, 0.1)!important}.dark .prompt{background-color:#0B0C0E!important;border-color:rgba(255, 255, 255, 0.1)!important}img[src=\"/logo/claude-logo.png\"]{border-radius:23%!important}img[src=\"https://cdn.simpleicons.org/cursor\"],img[src=\"/logo/chatgpt-logo.png\"]{background-color:#ffffff!important;border-radius:23%!important;padding:3px!important}"}],"page":{"pagePath":"api-reference/accounts/list-active-orders","slug":"/api-reference/accounts/list-active-orders","pageMetadata":{"title":"Today's Orders","description":"Paginated active orders for an account from the trade read service: open orders plus today's terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates.\n\n**Use Case:** Drive a live blotter or reconcile REST snapshots with `accUpdates` by merging on `clOrdId`.\n","openapi":"openapi.json GET /v2/accounts/{id}/orders","href":"/api-reference/accounts/list-active-orders"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Paginated active orders for an account from the trade read service: open orders plus today’s terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Use Case:\"\n }), \" Drive a live blotter or reconcile REST snapshots with \", _jsx(_components.code, {\n children: \"accUpdates\"\n }), \" by merging on \", _jsx(_components.code, {\n children: \"clOrdId\"\n }), \".\"]\n })]\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];const OAuthLoginButton=({scopes=`user:information watchlist:information watchlist:management account:information order:execution order:information position:information market:information calendar:information options:information analytics:information market:supplemental`,responseType=`token`,buttonText=`Authenticate with OAuth`,showStatus=true,requiredScopes=[]})=>{const{Info}=_provideComponents()||{};if(!Info)_missingMdxReference(`Info`,true);const[isDarkMode,setIsDarkMode]=useState(false);useEffect(()=>{const checkDarkMode=()=>{const isDark=document.documentElement.classList.contains(`dark`)||document.documentElement.getAttribute(`data-theme`)===`dark`||document.body.classList.contains(`dark`)||document.body.getAttribute(`data-theme`)===`dark`;setIsDarkMode(isDark)};checkDarkMode();const htmlObserver=new MutationObserver(checkDarkMode);const bodyObserver=new MutationObserver(checkDarkMode);htmlObserver.observe(document.documentElement,{attributes:true,attributeFilter:[`class`,`data-theme`,`style`]});bodyObserver.observe(document.body,{attributes:true,attributeFilter:[`class`,`data-theme`,`style`]});const interval=setInterval(checkDarkMode,1e3);return()=>{htmlObserver.disconnect();bodyObserver.disconnect();clearInterval(interval)}},[]);const styles=useMemo(()=>({statusContainer:{marginBottom:`1.5rem`,padding:`0.875rem 1rem`,backgroundColor:isDarkMode?`rgba(11, 170, 94, 0.08)`:`rgba(11, 170, 94, 0.06)`,border:isDarkMode?`1px solid rgba(11, 170, 94, 0.25)`:`1px solid rgba(11, 170, 94, 0.25)`,borderRadius:`10px`},statusContent:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`1rem`,flexWrap:`wrap`},statusLeft:{display:`flex`,alignItems:`center`,gap:`1rem`,flexWrap:`wrap`},statusBadge:{display:`flex`,alignItems:`center`,gap:`0.5rem`},checkmark:{color:isDarkMode?`#0BAA5E`:`#0BAA5E`,fontSize:`1.25rem`,fontWeight:`bold`},statusText:{color:isDarkMode?`#0BAA5E`:`#0BAA5E`,fontWeight:`600`,fontSize:`0.95rem`},expiryText:{color:isDarkMode?`#a1a1aa`:`#71717a`,fontSize:`0.8125rem`},logoutButton:{padding:`0.375rem 0.75rem`,backgroundColor:`transparent`,color:isDarkMode?`#e4e4e7`:`#3f3f46`,border:isDarkMode?`1px solid rgba(255, 255, 255, 0.1)`:`1px solid rgba(0, 0, 0, 0.1)`,borderRadius:`6px`,cursor:`pointer`,fontSize:`0.8125rem`,fontWeight:`500`,transition:`background-color 0.15s ease`},logoutButtonHover:{backgroundColor:isDarkMode?`rgba(255, 255, 255, 0.05)`:`rgba(0, 0, 0, 0.04)`},buttonContainer:{marginBottom:`1.5rem`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`1rem`,padding:`0.875rem 1rem`,backgroundColor:`transparent`,border:isDarkMode?`1px solid rgba(255, 255, 255, 0.1)`:`1px solid rgba(0, 0, 0, 0.08)`,borderRadius:`10px`},loginButton:{display:`inline-flex`,alignItems:`center`,gap:`0.5rem`,padding:`0.5rem 0.875rem`,backgroundColor:`#0BAA5E`,color:`white`,border:`1px solid #0BAA5E`,borderRadius:`8px`,cursor:`pointer`,fontSize:`0.8125rem`,fontWeight:`500`,lineHeight:`1.25rem`,transition:`background-color 0.15s ease, border-color 0.15s ease`,whiteSpace:`nowrap`,flexShrink:0},loginButtonHover:{backgroundColor:`#098F4E`,borderColor:`#098F4E`},lockIcon:{width:`14px`,height:`14px`,flexShrink:0},helpText:{margin:0,fontSize:`0.8125rem`,color:isDarkMode?`#9ca3af`:`#6b7280`,lineHeight:`1.5`,flex:1},modalDialog:{border:`none`,backgroundColor:`transparent`,padding:0,margin:0,maxWidth:`100%`,maxHeight:`100%`},modalContent:{backgroundColor:isDarkMode?`#0f0f10`:`#ffffff`,border:isDarkMode?`1px solid rgba(255, 255, 255, 0.08)`:`1px solid rgba(0, 0, 0, 0.08)`,borderRadius:`12px`,padding:`1.5rem`,maxWidth:`500px`,width:`100%`,boxShadow:isDarkMode?`0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3)`:`0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)`},modalHeader:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`1.5rem`},modalTitle:{margin:0,fontSize:`1.125rem`,fontWeight:`600`,color:isDarkMode?`#fafafa`:`#0a0a0a`},closeButton:{background:`none`,border:`none`,fontSize:`1.5rem`,lineHeight:1,color:isDarkMode?`#a1a1aa`:`#71717a`,cursor:`pointer`,padding:`0`,width:`2rem`,height:`2rem`,display:`flex`,alignItems:`center`,justifyContent:`center`,borderRadius:`6px`,transition:`color 0.15s ease, background-color 0.15s ease`},form:{display:`flex`,flexDirection:`column`,gap:`1rem`},formGroup:{display:`flex`,flexDirection:`column`,gap:`0.5rem`},label:{fontSize:`0.8125rem`,fontWeight:`500`,color:isDarkMode?`#e4e4e7`:`#3f3f46`},input:{padding:`0.5rem 0.75rem`,border:isDarkMode?`1px solid rgba(255, 255, 255, 0.1)`:`1px solid rgba(0, 0, 0, 0.1)`,borderRadius:`8px`,fontSize:`0.875rem`,color:isDarkMode?`#fafafa`:`#0a0a0a`,backgroundColor:isDarkMode?`rgba(255, 255, 255, 0.03)`:`#ffffff`,transition:`border-color 0.15s ease, box-shadow 0.15s ease`,outline:`none`},inputHelp:{margin:0,fontSize:`0.75rem`,color:isDarkMode?`#a1a1aa`:`#71717a`},link:{color:`#0BAA5E`,textDecoration:`none`,fontWeight:`500`},errorBox:{padding:`0.75rem`,backgroundColor:isDarkMode?`rgba(220, 38, 38, 0.1)`:`rgba(220, 38, 38, 0.05)`,border:isDarkMode?`1px solid rgba(220, 38, 38, 0.3)`:`1px solid rgba(220, 38, 38, 0.2)`,borderRadius:`8px`,color:isDarkMode?`#fca5a5`:`#dc2626`,fontSize:`0.8125rem`},modalFooter:{display:`flex`,gap:`0.5rem`,justifyContent:`flex-end`,marginTop:`0.5rem`},cancelButton:{padding:`0.5rem 0.875rem`,backgroundColor:`transparent`,color:isDarkMode?`#e4e4e7`:`#3f3f46`,border:isDarkMode?`1px solid rgba(255, 255, 255, 0.1)`:`1px solid rgba(0, 0, 0, 0.1)`,borderRadius:`8px`,cursor:`pointer`,fontSize:`0.8125rem`,fontWeight:`500`,lineHeight:`1.25rem`,transition:`background-color 0.15s ease`},submitButton:{padding:`0.5rem 0.875rem`,backgroundColor:`#0BAA5E`,color:`white`,border:`1px solid #0BAA5E`,borderRadius:`8px`,cursor:`pointer`,fontSize:`0.8125rem`,fontWeight:`500`,lineHeight:`1.25rem`,transition:`background-color 0.15s ease, border-color 0.15s ease`},submitButtonDisabled:{opacity:.6,cursor:`not-allowed`},redirectUrlContainer:{display:`flex`,alignItems:`center`,gap:`0.5rem`,padding:`0.5rem 0.75rem`,backgroundColor:isDarkMode?`rgba(255, 255, 255, 0.03)`:`rgba(0, 0, 0, 0.03)`,border:isDarkMode?`1px solid rgba(255, 255, 255, 0.08)`:`1px solid rgba(0, 0, 0, 0.08)`,borderRadius:`8px`,fontSize:`0.8125rem`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`},redirectUrlText:{flex:1,color:isDarkMode?`#a1a1aa`:`#71717a`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},copyButton:{padding:`0.25rem 0.625rem`,backgroundColor:`transparent`,color:isDarkMode?`#e4e4e7`:`#3f3f46`,border:isDarkMode?`1px solid rgba(255, 255, 255, 0.1)`:`1px solid rgba(0, 0, 0, 0.1)`,borderRadius:`6px`,cursor:`pointer`,fontSize:`0.75rem`,fontWeight:`500`,transition:`background-color 0.15s ease, border-color 0.15s ease`,whiteSpace:`nowrap`},copyButtonHover:{backgroundColor:isDarkMode?`rgba(255, 255, 255, 0.05)`:`rgba(0, 0, 0, 0.04)`},copyButtonCopied:{backgroundColor:`#0BAA5E`,color:`white`,border:`1px solid #0BAA5E`}}),[isDarkMode]);const[isModalOpen,setIsModalOpen]=useState(false);const[clientId,setClientId]=useState(``);const[isLoading,setIsLoading]=useState(false);const[hasValidToken,setHasValidToken]=useState(false);const[tokenSource,setTokenSource]=useState(null);const[timeRemaining,setTimeRemaining]=useState(0);const[error,setError]=useState(``);const[copied,setCopied]=useState(false);const redirectUrl=typeof window!==`undefined`?window.location.origin+`/api-reference`:``;useEffect(()=>{updateTokenState();if(window.AriesOAuth){const lastClientId=window.AriesOAuth.getLastClientId();setClientId(lastClientId)}const handleTokenUpdate=()=>{updateTokenState()};const handleOAuthError=event=>{setError(event.detail.description||`Authentication failed`);setIsLoading(false)};const handleOAuthSuccess=()=>{setIsModalOpen(false);setIsLoading(false);setError(``)};window.addEventListener(`tokenStatusChanged`,handleTokenUpdate);window.addEventListener(`tokenUpdated`,handleTokenUpdate);window.addEventListener(`tokenCleared`,handleTokenUpdate);window.addEventListener(`oauthError`,handleOAuthError);window.addEventListener(`oauthSuccess`,handleOAuthSuccess);const interval=setInterval(()=>{if(hasValidToken){updateTokenState()}},1e3);return()=>{window.removeEventListener(`tokenStatusChanged`,handleTokenUpdate);window.removeEventListener(`tokenUpdated`,handleTokenUpdate);window.removeEventListener(`tokenCleared`,handleTokenUpdate);window.removeEventListener(`oauthError`,handleOAuthError);window.removeEventListener(`oauthSuccess`,handleOAuthSuccess);clearInterval(interval)}},[hasValidToken]);const updateTokenState=useCallback(()=>{if(window.AriesOAuth){const isValid=window.AriesOAuth.isAuthenticated();const remaining=window.AriesOAuth.getTimeRemaining();const knownExpiry=window.AriesOAuth.hasKnownExpiry?window.AriesOAuth.hasKnownExpiry():false;const source=window.AriesOAuth.getTokenSource?window.AriesOAuth.getTokenSource():null;setHasValidToken(isValid);setTokenSource(source);setTimeRemaining(knownExpiry\u0026\u0026typeof remaining===`number`?remaining:null)}},[]);const handleLogin=()=>{setError(``);setIsModalOpen(true)};const handleLogout=()=>{if(window.AriesOAuth){window.AriesOAuth.logout()}try{const cfg=window.AriesOAuth?.config;const tokenKey=cfg?.TOKEN_KEY??`aries_access_token`;const expiryKey=cfg?.TOKEN_EXPIRY_KEY??`aries_token_timestamp`;const sourceKey=cfg?.TOKEN_SOURCE_KEY??`aries_token_source`;localStorage.removeItem(tokenKey);localStorage.removeItem(expiryKey);localStorage.removeItem(sourceKey)}catch(_){}setHasValidToken(false);setTimeRemaining(null)};const handleOAuthRedirect=async e=>{e.preventDefault();if(!clientId.trim()){setError(`Please enter your Client ID`);return}setIsLoading(true);try{if(window.AriesOAuth){window.AriesOAuth.saveClientId(clientId.trim())}const returnPath=window.location.pathname+window.location.search+window.location.hash;sessionStorage.setItem(`oauth_return_path`,returnPath);const pkce=await window.AriesOAuth.generatePKCE();const authEndpoint=window.AriesOAuth?.config?.AUTH_ENDPOINT||`https://app.aries.com/oauth2/authorize`;const authUrl=new URL(authEndpoint);authUrl.searchParams.set(`client_id`,clientId.trim());authUrl.searchParams.set(`redirect_uri`,redirectUrl);authUrl.searchParams.set(`response_type`,`code`);authUrl.searchParams.set(`code_challenge`,pkce.challenge);authUrl.searchParams.set(`code_challenge_method`,`S256`);authUrl.searchParams.set(`scope`,scopes);authUrl.searchParams.set(`state`,generateState());const fullAuthUrl=authUrl.toString();setTimeout(()=>{window.location.href=fullAuthUrl},100)}catch(error){setError(`Failed to initiate OAuth flow: `+error.message);setIsLoading(false)}};const generateState=()=>{return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)};const formatTimeRemaining=seconds=>{const minutes=Math.floor(seconds/60);const secs=seconds%60;return`${minutes}m ${secs}s`};const copyRedirectUrl=()=>{navigator.clipboard.writeText(redirectUrl).then(()=>{setCopied(true);setTimeout(()=>setCopied(false),2e3)}).catch(()=>{})};const oauthDialogRef=useRef(null);const isLoadingRef=useRef(false);isLoadingRef.current=isLoading;const closeModal=useCallback(()=>{if(!isLoading){setIsModalOpen(false);setError(``);setCopied(false)}},[isLoading]);useEffect(()=>{const el=oauthDialogRef.current;if(!el)return;if(isModalOpen){if(!el.open)el.showModal()}else{if(el.open)el.close()}},[isModalOpen]);useEffect(()=>{const el=oauthDialogRef.current;if(!el)return;const onClose=()=>{setIsModalOpen(false);setError(``);setCopied(false)};const onCancel=e=>{if(isLoadingRef.current)e.preventDefault()};el.addEventListener(`close`,onClose);el.addEventListener(`cancel`,onCancel);return()=>{el.removeEventListener(`close`,onClose);el.removeEventListener(`cancel`,onCancel)}},[hasValidToken,showStatus]);if(hasValidToken\u0026\u0026showStatus\u0026\u0026tokenSource===`oauth`){return _jsx(`div`,{style:styles.statusContainer,children:_jsxs(`div`,{style:styles.statusContent,children:[_jsxs(`div`,{style:styles.statusLeft,children:[_jsxs(`div`,{style:styles.statusBadge,children:[_jsx(`span`,{style:styles.checkmark,children:`✓`}),_jsx(`span`,{style:styles.statusText,children:`Authenticated`})]}),typeof timeRemaining===`number`?_jsxs(`span`,{style:styles.expiryText,children:[`Expires in `,formatTimeRemaining(timeRemaining)]}):null]}),_jsx(`button`,{onClick:handleLogout,style:styles.logoutButton,onMouseEnter:e=>e.target.style.backgroundColor=styles.logoutButtonHover.backgroundColor,onMouseLeave:e=>e.target.style.backgroundColor=styles.logoutButton.backgroundColor,children:`Logout`})]})})}const onDialogClick=e=>{if(e.target===e.currentTarget){closeModal()}};const modalMarkup=_jsx(`dialog`,{ref:oauthDialogRef,className:`aries-oauth-dialog`,\"data-oauth-theme\":isDarkMode?`dark`:`light`,style:styles.modalDialog,onClick:onDialogClick,children:_jsxs(`div`,{style:styles.modalContent,onClick:e=>e.stopPropagation(),children:[_jsxs(`div`,{style:styles.modalHeader,children:[_jsx(`h3`,{style:styles.modalTitle,children:`OAuth Authentication`}),_jsx(`button`,{type:`button`,onClick:closeModal,style:styles.closeButton,disabled:isLoading,children:`×`})]}),_jsxs(`form`,{onSubmit:handleOAuthRedirect,style:styles.form,children:[_jsxs(`div`,{style:styles.formGroup,children:[_jsx(`label`,{htmlFor:`clientId`,style:styles.label,children:`Client ID`}),_jsx(`input`,{id:`clientId`,type:`text`,value:clientId,onChange:e=>setClientId(e.target.value),placeholder:`Enter your OAuth Client ID`,style:styles.input,disabled:isLoading}),_jsxs(`p`,{style:styles.inputHelp,children:[`Get your Client ID from`,` `,_jsx(`a`,{href:`https://app.aries.com/client-center/api`,target:`_blank`,rel:`noopener noreferrer`,style:styles.link,children:`Client Center / Manage Account → API`})]})]}),_jsxs(`div`,{style:styles.formGroup,children:[_jsx(`label`,{style:styles.label,children:`Redirect URL`}),_jsxs(`div`,{style:styles.redirectUrlContainer,children:[_jsx(`span`,{style:styles.redirectUrlText,title:redirectUrl,children:redirectUrl}),_jsx(`button`,{type:`button`,onClick:copyRedirectUrl,style:{...styles.copyButton,...copied?styles.copyButtonCopied:{}},onMouseEnter:e=>{if(!copied){e.currentTarget.style.backgroundColor=styles.copyButtonHover.backgroundColor}},onMouseLeave:e=>{if(!copied){e.currentTarget.style.backgroundColor=styles.copyButton.backgroundColor}},children:copied?`✓ Copied`:`Copy`})]}),_jsx(`p`,{style:styles.inputHelp,children:`Add this URL to your OAuth client's allowed redirect URIs`})]}),error\u0026\u0026_jsx(`div`,{style:styles.errorBox,children:error}),_jsxs(`div`,{style:styles.modalFooter,children:[_jsx(`button`,{type:`button`,onClick:closeModal,style:styles.cancelButton,disabled:isLoading,children:`Cancel`}),_jsx(`button`,{type:`submit`,style:{...styles.submitButton,...isLoading?styles.submitButtonDisabled:{}},disabled:isLoading,children:isLoading?`Redirecting...`:`Initiate Login`})]})]})]})});return _jsxs(_Fragment,{children:[_jsxs(`div`,{style:styles.buttonContainer,children:[_jsxs(`div`,{style:styles.helpText,children:[_jsx(`strong`,{style:{color:isDarkMode?`#e5e7eb`:`#374151`},children:`Quick Auth:`}),` `,`Authenticate once to auto-fill your Bearer token across all API endpoints`]}),_jsxs(`button`,{onClick:handleLogin,style:styles.loginButton,onMouseEnter:e=>{e.currentTarget.style.backgroundColor=styles.loginButtonHover.backgroundColor;e.currentTarget.style.borderColor=styles.loginButtonHover.borderColor},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=styles.loginButton.backgroundColor;e.currentTarget.style.borderColor=styles.loginButton.borderColor},children:[_jsxs(`svg`,{style:styles.lockIcon,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,\"aria-hidden\":`true`,children:[_jsx(`rect`,{x:`3`,y:`11`,width:`18`,height:`11`,rx:`2`,ry:`2`}),_jsx(`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`})]}),buttonText]})]}),modalMarkup,requiredScopes.length>0\u0026\u0026_jsxs(Info,{children:[_jsx(`strong`,{children:requiredScopes.length===1\u0026\u0026requiredScopes[0].length===1?`Required scope`:requiredScopes.length===1?`Required scopes`:`Required scope (any one of)`}),` `,requiredScopes.map((alternative,i)=>_jsxs(`span`,{children:[i>0\u0026\u0026` or `,alternative.map((scope,j)=>_jsxs(`span`,{children:[j>0\u0026\u0026` + `,_jsx(`code`,{children:scope})]},scope))]},i))]})]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_MdxComponentBoundary,{name:`OAuthLoginButton`,children:_jsx(OAuthLoginButton,{requiredScopes:[[`order:information`]]})}),`\n`,_jsx(Heading,{level:`2`,id:`compared-to-v1-account-orders`,children:`Compared to v1 account orders`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/api-reference/accounts/orders`,children:`Account Orders`}),` (`,_jsx(_components.code,{children:`GET /v2/accounts/{id}/orders`}),`) returns legacy field names (`,_jsx(_components.code,{children:`orderType`}),`, `,_jsx(_components.code,{children:`status`}),`, `,_jsx(_components.code,{children:`quantity`}),`, …) and an `,_jsx(_components.code,{children:`availability`}),` object. This v2 endpoint returns `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`domains/order.Order`})}),` objects (field names `,_jsx(_components.code,{children:`type`}),`, `,_jsx(_components.code,{children:`ordStatus`}),`, `,_jsx(_components.code,{children:`qty`}),`, …) and paginates with `,_jsx(_components.code,{children:`nextCursor`}),` instead of bundling availability metadata.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-envelope`,children:`Response envelope`}),`\n`,_jsxs(_components.p,{children:[`Every `,_jsx(_components.strong,{children:`200`}),` response includes `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`orders`})}),` (array, never null — may be empty) and `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`nextCursor`})}),` (`,_jsx(_components.code,{children:`int64`}),`, `,_jsx(_components.code,{children:`0`}),` when there are no more pages). Each order always includes `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`clOrdId`})}),`, `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`accountId`})}),`, `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`symbol`})}),`, quantity/price fields (`,_jsx(_components.code,{children:`qty`}),`, `,_jsx(_components.code,{children:`price`}),`, `,_jsx(_components.code,{children:`stopPrice`}),`, `,_jsx(_components.code,{children:`cumQty`}),`, `,_jsx(_components.code,{children:`leavesQty`}),`, `,_jsx(_components.code,{children:`avgPrice`}),`), and `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`createdAt`})}),` / `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`updatedAt`})}),`. Fields such as `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`side`})}),`, `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`type`})}),`, `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`ordStatus`})}),`, and `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`legs`})}),` may be omitted when unset.`]}),`\n`,_jsx(Heading,{level:`2`,id:`demo-response-v2-shape`,children:`Demo response (v2 shape)`}),`\n`,_jsxs(_components.p,{children:[`Numeric quantities and prices are returned as `,_jsx(_components.strong,{children:`decimal strings`}),` to preserve precision. The shape is consistent whether the data was served from cache or the database.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`31`,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:`31`,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:` \"orders\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clOrdId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"clord-20260115-aapl-001\"`}),_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:` \"ordId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ord-7f3a9c2e-0001\"`}),_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:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TEST-ACCOUNT-001\"`}),_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:` \"clientId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"demo-oauth-client\"`}),_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:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_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:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BUY\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"LIMIT\"`}),_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:` \"timeInForce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"DAY\"`}),_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:` \"qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100\"`}),_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:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"175.50\"`}),_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:` \"stopPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:` \"ordStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NEW\"`}),_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:` \"cumQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_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:` \"leavesQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100\"`}),_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:` \"avgPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_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:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_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:` \"exDestination\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NASDAQ\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:` \"ordRejReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_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:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SINGLE_LEG\"`}),_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:` \"legs\"`}),_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:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-01-15T14:30:00Z\"`}),_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:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-01-15T14:30:05Z\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"nextCursor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{OAuthLoginButton,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":"Today's Orders","description":"Paginated active orders for an account from the trade read service: open orders plus today's terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates.\n\n**Use Case:** Drive a live blotter or reconcile REST snapshots with `accUpdates` by merging on `clOrdId`.\n","openapi":"openapi.json GET /v2/accounts/{id}/orders","href":"/api-reference/accounts/list-active-orders"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[152,16465,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Compared to v1 account orders","slug":"compared-to-v1-account-orders","depth":2,"children":[]},{"title":"Response envelope","slug":"response-envelope","depth":2,"children":[]},{"title":"Demo response (v2 shape)","slug":"demo-response-v2-shape","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/ariesfinancialinc/d35069a6af6e0e00/public/oauth-manager.js","/_mintlify/custom/ariesfinancialinc/baaed03e98a52073/public/token-autofill.js","/_mintlify/custom/ariesfinancialinc/5c3c9fc4fbc77145/public/paste-plain-text.js"],"openApiReferenceData":{"operation":{"description":"Paginated active orders for an account from the trade read service: open orders plus today's terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates.\n\n**Use Case:** Drive a live blotter or reconcile REST snapshots with `accUpdates` by merging on `clOrdId`.\n","operationId":"listActiveOrders","x-codeSamples":[{"lang":"python","label":"Python (SDK)","source":"from finance_dev import FinanceDev, models\n\n\nwith FinanceDev(\n security=models.Security(\n client_id=\"\u003cYOUR_CLIENT_ID_HERE>\",\n client_secret=\"\u003cYOUR_CLIENT_SECRET_HERE>\",\n ),\n) as fd_client:\n\n res = fd_client.orders.list_active_orders(id=\"TEST-ACCOUNT-001\", limit=50, cursor=0)\n\n while res is not None:\n # Handle items\n\n res = res.next()"},{"lang":"typescript","label":"Typescript (SDK)","source":"import { FinanceDev } from \"@ariesdotcom/finance-dev\";\n\nconst financeDev = new FinanceDev({\n security: {\n clientID: \"\u003cYOUR_CLIENT_ID_HERE>\",\n clientSecret: \"\u003cYOUR_CLIENT_SECRET_HERE>\",\n },\n});\n\nasync function run() {\n const result = await financeDev.accounts.orders.listActive({\n id: \"TEST-ACCOUNT-001\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"}],"parameters":["d826ce83-87d3-4a99-baba-7908894db7a9","c00aa4b0-dad3-45af-83ec-8fbda1d8fcb0","954214c5-e637-487e-aeb6-02fc07ea717c"],"responses":{"200":"671641dc-08b4-4e37-bb0e-12b2944e66f7","400":"010eacb5-cc1e-4023-a15f-453a4b7f5c39","401":"78f21f4e-1055-41da-bfb0-f055bdf08816","403":"fb5cef7d-80de-4e8e-882a-7bdc4200d15f","404":"13b990dd-f731-4e74-9dee-f57e720c0f53","500":"9752c0f4-e96b-4129-8507-b68dd3365403"},"security":["6853b154-8f5c-4da6-aacc-e831ba46a872"],"summary":"List active orders (v2)","tags":["Orders"],"method":"get","type":"path","servers":["f38d7b7f-6d4c-4c3f-8232-2c94a60e51ad","421feb2d-ac41-443e-9380-492252b72659"],"path":"/v2/accounts/{id}/orders","baseUrlOptions":["https://api.aries.com","https://api.tradearies.dev"],"title":"List active orders (v2)","codeSamples":[{"label":"Python (SDK)","lang":"python","source":"from finance_dev import FinanceDev, models\n\n\nwith FinanceDev(\n security=models.Security(\n client_id=\"\u003cYOUR_CLIENT_ID_HERE>\",\n client_secret=\"\u003cYOUR_CLIENT_SECRET_HERE>\",\n ),\n) as fd_client:\n\n res = fd_client.orders.list_active_orders(id=\"TEST-ACCOUNT-001\", limit=50, cursor=0)\n\n while res is not None:\n # Handle items\n\n res = res.next()"},{"label":"Typescript (SDK)","lang":"typescript","source":"import { FinanceDev } from \"@ariesdotcom/finance-dev\";\n\nconst financeDev = new FinanceDev({\n security: {\n clientID: \"\u003cYOUR_CLIENT_ID_HERE>\",\n clientSecret: \"\u003cYOUR_CLIENT_SECRET_HERE>\",\n },\n});\n\nasync function run() {\n const result = await financeDev.accounts.orders.listActive({\n id: \"TEST-ACCOUNT-001\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"d826ce83-87d3-4a99-baba-7908894db7a9":{"description":"Account ID whose active orders you want to read. Use the account identifier from the user's account list or trading setup.","example":"TEST-ACCOUNT-001","in":"path","name":"id","required":true,"schema":{"type":"string","isRequired":true,"description":"Account ID whose active orders you want to read. Use the account identifier from the user's account list or trading setup.","uniqueKey":"","typeLabel":"string"}},"c00aa4b0-dad3-45af-83ec-8fbda1d8fcb0":{"description":"Maximum number of orders to return in this page. Use smaller values for UI lists and larger values for back-office exports. Default is 50; maximum is 500.","example":50,"in":"query","name":"limit","schema":{"default":50,"maximum":500,"minimum":1,"type":"integer","description":"Maximum number of orders to return in this page. Use smaller values for UI lists and larger values for back-office exports. Default is 50; maximum is 500.","uniqueKey":"","typeLabel":"integer"}},"954214c5-e637-487e-aeb6-02fc07ea717c":{"description":"Opaque pagination cursor. Send `0` (or omit) for the first page; pass the previous response's `nextCursor` for subsequent pages. Stop when `nextCursor` is absent.","example":0,"in":"query","name":"cursor","schema":{"default":0,"format":"int64","type":"integer","description":"Opaque pagination cursor. Send `0` (or omit) for the first page; pass the previous response's `nextCursor` for subsequent pages. Stop when `nextCursor` is absent.","uniqueKey":"","typeLabel":"integer\u003cint64>"}}},"responses":{"671641dc-08b4-4e37-bb0e-12b2944e66f7":{"content":{"application/json":{"example":{"orders":[{"accountId":"TEST-ACCOUNT-001","avgPrice":"0","category":"SINGLE_LEG","clOrdId":"clord-20260115-aapl-001","clientId":"demo-oauth-client","createdAt":"2026-01-15T14:30:00Z","cumQty":"0","currency":"USD","exDestination":"MNGD","leavesQty":"100","legs":[],"ordId":"ord-7f3a9c2e-0001","ordRejReason":"","ordStatus":"NEW","price":"175.50","qty":"100","securityType":"EQUITY","side":"BUY","stopPrice":"","symbol":"AAPL","text":"","timeInForce":"DAY","type":"LIMIT","updatedAt":"2026-01-15T14:30:05Z"}]},"schema":{"description":"Paginated v2 orders response from **GET /v2/accounts/{id}/orders** and **GET /v2/accounts/{id}/orders/history**. `orders` is always present; `nextCursor` is present only when another page exists.","properties":{"orders":{"oneOf":[{"description":"Page of orders in v2 domain shape (`TradeOrderV2`). `null` from **GET /v2/accounts/{id}/orders** when the account has no active orders; an empty array from the history endpoint when there are no matches.","items":{"description":"Standard v2 order shape returned by the trading endpoints. Identical across **GET /v2/accounts/{id}/orders** (cache and DB), **GET /v2/accounts/{id}/orders/history**, and WebSocket `accUpdates` — merge live updates with REST by `clOrdId` without field remapping. Numeric quantities and prices are decimal strings. Fields marked optional in Go (`omitempty`) may be absent when empty; core quantity, price, and timestamp fields are always present on each order object.","properties":{"accountId":{"description":"Account that owns this order.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].accountId","typeLabel":"string"},"advancedOrderRole":{"description":"The order's role within its advanced-order list.\n- `SIBLING` — An OCO order.\n- `ENTRY`, `PROFIT_TARGET`, `STOP_LOSS` — Bracket orders.\n- `PARENT`, `CHILD` — OTO and OTOCO orders.\n\nOmitted for ordinary orders.","enum":["SIBLING","ENTRY","PROFIT_TARGET","STOP_LOSS","PARENT","CHILD"],"type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].advancedOrderRole","typeLabel":"enum\u003cstring>"},"advancedOrderType":{"description":"Kind of advanced-order list the order was placed in.\n- `OCO` — One-cancels-other siblings.\n- `BRACKET` — Entry with a profit target and/or stop loss.\n- `OTO` — Parent whose fill releases its children.\n- `OTOCO` — Parent whose fill releases a one-cancels-other group.\n\nOmitted for ordinary orders.","enum":["OCO","BRACKET","OTO","OTOCO"],"type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].advancedOrderType","typeLabel":"enum\u003cstring>"},"avgPrice":{"description":"Average fill price at the order level. For multi-leg orders this may be zero; use each leg's `avgPrice` instead.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].avgPrice","typeLabel":"string"},"category":{"description":"What kind of trade this order represents.\n- `EQUITY` — Plain stock or ETF order.\n- `SINGLE_LEG` — One option contract (call or put).\n- `MULTI_LEG` — Two-to-four-leg option strategy (spread, condor, straddle, etc.). See the `legs` array.\n\nOmitted when the order has not been classified.","enum":["SINGLE_LEG","MULTI_LEG","EQUITY"],"type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].category","typeLabel":"enum\u003cstring>"},"clOrdId":{"description":"Client order ID — unique per account, used as the merge key with WebSocket order snapshots.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].clOrdId","typeLabel":"string"},"clientId":{"description":"OAuth client / application identifier that submitted the order. Always serialized; may be empty.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].clientId","typeLabel":"string"},"createdAt":{"description":"Time the order record was created. Use this for timeline and sorting displays.","format":"date-time","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].createdAt","typeLabel":"string\u003cdate-time>"},"cumQty":{"description":"Total quantity already filled, returned as a decimal string.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].cumQty","typeLabel":"string"},"currency":{"description":"Currency for prices and amounts on this order, usually USD for U.S. securities.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].currency","typeLabel":"string"},"exDestination":{"description":"Where the order was routed for execution. Useful for support diagnostics and advanced routing displays.\n- `MNGD` — Managed routing (Aries chooses the best venue automatically).\n- `MNGDFTE` — Managed routing with fill-then-end (extended) handling.","enum":["MNGD","MNGDFTE"],"example":"MNGD","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].exDestination","typeLabel":"enum\u003cstring>"},"leavesQty":{"description":"Quantity still open and waiting to fill, returned as a decimal string.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].leavesQty","typeLabel":"string"},"legs":{"description":"Per-leg details for option spreads or other multi-leg orders. Empty or omitted for normal single-symbol orders.","items":{"description":"Option leg on a v2 order (`order.Leg`). Multi-leg orders carry per-leg `avgPrice`; order-level `avgPrice` is zero when `legs` is non-empty.","properties":{"maturity":{"description":"Option expiration date in YYYY-MM-DD format. Present for option legs.","type":"string","isRequired":true,"uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].maturity","typeLabel":"string"},"positionEffect":{"description":"Whether this leg opens a new position or closes an existing one:\n- `OPEN` — opens a new position (or increases an existing one).\n- `CLOSE` — closes an existing position (or reduces it).","enum":["OPEN","CLOSE"],"type":"string","isRequired":true,"uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].positionEffect","typeLabel":"enum\u003cstring>"},"putCall":{"description":"Option contract type. CALL gives the right to buy; PUT gives the right to sell.","enum":["CALL","PUT"],"type":"string","isRequired":true,"uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].putCall","typeLabel":"enum\u003cstring>"},"ratioQty":{"description":"Quantity ratio for this leg, returned as a decimal string. Use it to display strategy structure.","type":"string","isRequired":true,"uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].ratioQty","typeLabel":"string"},"securityType":{"description":"Instrument type for this leg. EQUITY is stock or ETF; OPTION is an options contract.","enum":["EQUITY","OPTION"],"type":"string","isRequired":true,"uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].securityType","typeLabel":"enum\u003cstring>"},"side":{"description":"Direction for this leg. BUY purchases the instrument; SELL sells it.","enum":["BUY","SELL"],"type":"string","isRequired":true,"uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].side","typeLabel":"enum\u003cstring>"},"strikePrice":{"description":"Option strike price as a decimal string. Present for option legs.","type":"string","isRequired":true,"uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].strikePrice","typeLabel":"string"},"symbol":{"description":"Symbol for this leg. For options, use the exact contract symbol from search or the order response.","type":"string","isRequired":true,"uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].symbol","typeLabel":"string"},"avgPrice":{"description":"Average fill price for this leg (decimal string)","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].avgPrice","typeLabel":"string"},"tickerSymbol":{"description":"Full OCC contract symbol for an option leg (for example `AAPL261023C00340000`). Equity legs carry the plain symbol. Omitted on orders stored before this field existed.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX].tickerSymbol","typeLabel":"string"}},"required":["symbol","side","ratioQty","securityType","maturity","strikePrice","positionEffect","putCall"],"type":"object","uniqueKey":"orders.oneOf.0.items.[INDEX].legs.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"orders.oneOf.0.items.[INDEX].legs","typeLabel":"object[]"},"listId":{"description":"ID of the advanced-order list (OCO, bracket, OTO or OTOCO) this order was placed in, shared by every order in the list. Kept on the order's cancel and replace records. Omitted for ordinary orders.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].listId","typeLabel":"string"},"ordId":{"description":"Broker order ID. Always serialized; may be an empty string for cancel-rejects or before the broker accepts the order.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].ordId","typeLabel":"string"},"ordRejReason":{"description":"Broker rejection reason code or text. Use this with `text` to explain why an order was rejected.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].ordRejReason","typeLabel":"string"},"ordStatus":{"description":"Current state of the order. Possible values:\n- `PENDING_NEW` — Submitted, waiting for exchange acknowledgement.\n- `NEW` — Accepted by the exchange and live in the order book; no fills yet.\n- `PARTIALLY_FILLED` — Some of the quantity has executed; the rest is still working. See `cumQty` and `leavesQty`.\n- `FILLED` — Fully executed. Order is complete.\n- `PENDING_CANCEL` — Cancel request submitted; waiting for exchange confirmation.\n- `CANCELED` — Order was cancelled and will not execute further.\n- `PENDING_REPLACE` — Replace/modify request submitted; waiting for exchange confirmation.\n- `REPLACED` — Order was successfully replaced/modified.\n- `REJECTED` — Order was refused (bad parameters, insufficient buying power, halted symbol, etc.). Check `ordRejReason` and `text`.\n- `EXPIRED` — Order reached its time-in-force limit without filling (e.g. a `DAY` order that didn't fill before close).\n- `DONE_FOR_DAY` — Order is no longer active for today's session but may resume on the next trading day (rare).\n- `STOPPED` — Trading was stopped on this order by an exchange action.\n- `SUSPENDED` — Order is temporarily suspended by the broker or exchange.\n- `CALCULATED` — End-of-day calculated status from FIX (rarely surfaced).\n- `ACCEPTED_FOR_BID` — Acknowledged for a bid (auction workflows).\n- `SUPERSEDED` — Replaced by a newer record; excluded from history responses server-side.\n\nOmitted when the broker has not yet reported a status.","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE","SUPERSEDED"],"type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].ordStatus","typeLabel":"enum\u003cstring>"},"origClOrdId":{"description":"Original client order ID for replace/cancel chains. Omitted when not part of a chain.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].origClOrdId","typeLabel":"string"},"parentClOrdId":{"description":"Client order ID the parent order was placed with, on a child of a bracket, OTO or OTOCO. Unchanged when the child is replaced or cancelled, and when the parent is replaced — follow the parent's `origClOrdId` chain for that. Omitted for parents, OCO orders and ordinary orders.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].parentClOrdId","typeLabel":"string"},"price":{"description":"Limit or reference price as a decimal string. Required for limit-style orders and empty or zero for pure market orders.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].price","typeLabel":"string"},"qty":{"description":"Original order size as a decimal string. Use this with filled and remaining quantities to show execution progress.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].qty","typeLabel":"string"},"securityType":{"description":"Instrument type for the order. EQUITY is stock or ETF; OPTION is an options contract.","enum":["EQUITY","OPTION"],"type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].securityType","typeLabel":"enum\u003cstring>"},"side":{"description":"Which direction to trade in. Pick one:\n- `BUY` — buying shares or contracts (opens a long position or closes an existing short).\n- `SELL` — selling shares or contracts you already hold (closes a long position).\n- `SELL_SHORT` — selling shares you do not own (opens a short position). Subject to short-sale regulations.\n- `BUY_TO_COVER` — buying shares to close an open short position.","enum":["BUY","SELL","SELL_SHORT","BUY_TO_COVER"],"example":"BUY","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].side","typeLabel":"enum\u003cstring>"},"stopPrice":{"description":"Stop trigger price as a decimal string. Required for stop-style orders and empty or zero when not used.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].stopPrice","typeLabel":"string"},"symbol":{"description":"Primary symbol traded by the order.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].symbol","typeLabel":"string"},"text":{"description":"Broker or platform message about the order. Show this when status is rejected or when the user needs extra context.","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].text","typeLabel":"string"},"timeInForce":{"description":"How long the order should stay alive before automatically cancelling. Pick one:\n- `DAY` — Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.\n- `GTC` — Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).\n- `IOC` — Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.\n- `FOK` — Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.\n- `EXTENDED_HOURS` — Active during pre-market and after-hours trading sessions in addition to regular hours.\n- `AT_THE_OPENING` — Execute at the official market open price; if it can't fill at open, it's cancelled.\n- `AT_THE_CLOSE` — Execute at the official market close price; if it can't fill at close, it's cancelled.","enum":["DAY","GTC","IOC","FOK","EXTENDED_HOURS","AT_THE_OPENING","AT_THE_CLOSE"],"example":"DAY","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].timeInForce","typeLabel":"enum\u003cstring>"},"type":{"description":"How the order is priced. Pick one:\n- `MARKET` — Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.\n- `LIMIT` — Execute only at the limit `price` or better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires the `price` field.\n- `STOP` — Sits inactive until the market hits `stopPrice`, then converts to a market order. Common for stop-loss exits. Requires the `stopPrice` field.\n- `STOP_LIMIT` — Sits inactive until the market hits `stopPrice`, then converts to a limit order at `price`. More control than `STOP`, but the limit may not fill. Requires both `stopPrice` and `price`.","enum":["MARKET","LIMIT","STOP","STOP_LIMIT"],"example":"LIMIT","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"updatedAt":{"description":"Time the order record was last updated. Use this to show status freshness.","format":"date-time","type":"string","uniqueKey":"orders.oneOf.0.items.[INDEX].updatedAt","typeLabel":"string\u003cdate-time>"}},"type":"object","uniqueKey":"orders.oneOf.0.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"orders.oneOf.0","typeLabel":"object[]"},{"description":"Page of orders in v2 domain shape (`TradeOrderV2`). `null` from **GET /v2/accounts/{id}/orders** when the account has no active orders; an empty array from the history endpoint when there are no matches.","items":{"description":"Standard v2 order shape returned by the trading endpoints. Identical across **GET /v2/accounts/{id}/orders** (cache and DB), **GET /v2/accounts/{id}/orders/history**, and WebSocket `accUpdates` — merge live updates with REST by `clOrdId` without field remapping. Numeric quantities and prices are decimal strings. Fields marked optional in Go (`omitempty`) may be absent when empty; core quantity, price, and timestamp fields are always present on each order object.","properties":{"accountId":{"description":"Account that owns this order.","type":"string"},"advancedOrderRole":{"description":"The order's role within its advanced-order list.\n- `SIBLING` — An OCO order.\n- `ENTRY`, `PROFIT_TARGET`, `STOP_LOSS` — Bracket orders.\n- `PARENT`, `CHILD` — OTO and OTOCO orders.\n\nOmitted for ordinary orders.","enum":["SIBLING","ENTRY","PROFIT_TARGET","STOP_LOSS","PARENT","CHILD"],"type":"string"},"advancedOrderType":{"description":"Kind of advanced-order list the order was placed in.\n- `OCO` — One-cancels-other siblings.\n- `BRACKET` — Entry with a profit target and/or stop loss.\n- `OTO` — Parent whose fill releases its children.\n- `OTOCO` — Parent whose fill releases a one-cancels-other group.\n\nOmitted for ordinary orders.","enum":["OCO","BRACKET","OTO","OTOCO"],"type":"string"},"avgPrice":{"description":"Average fill price at the order level. For multi-leg orders this may be zero; use each leg's `avgPrice` instead.","type":"string"},"category":{"description":"What kind of trade this order represents.\n- `EQUITY` — Plain stock or ETF order.\n- `SINGLE_LEG` — One option contract (call or put).\n- `MULTI_LEG` — Two-to-four-leg option strategy (spread, condor, straddle, etc.). See the `legs` array.\n\nOmitted when the order has not been classified.","enum":["SINGLE_LEG","MULTI_LEG","EQUITY"],"type":"string"},"clOrdId":{"description":"Client order ID — unique per account, used as the merge key with WebSocket order snapshots.","type":"string"},"clientId":{"description":"OAuth client / application identifier that submitted the order. Always serialized; may be empty.","type":"string"},"createdAt":{"description":"Time the order record was created. Use this for timeline and sorting displays.","format":"date-time","type":"string"},"cumQty":{"description":"Total quantity already filled, returned as a decimal string.","type":"string"},"currency":{"description":"Currency for prices and amounts on this order, usually USD for U.S. securities.","type":"string"},"exDestination":{"description":"Where the order was routed for execution. Useful for support diagnostics and advanced routing displays.\n- `MNGD` — Managed routing (Aries chooses the best venue automatically).\n- `MNGDFTE` — Managed routing with fill-then-end (extended) handling.","enum":["MNGD","MNGDFTE"],"example":"MNGD","type":"string"},"leavesQty":{"description":"Quantity still open and waiting to fill, returned as a decimal string.","type":"string"},"legs":{"description":"Per-leg details for option spreads or other multi-leg orders. Empty or omitted for normal single-symbol orders.","items":{"description":"Option leg on a v2 order (`order.Leg`). Multi-leg orders carry per-leg `avgPrice`; order-level `avgPrice` is zero when `legs` is non-empty.","properties":{"avgPrice":{"description":"Average fill price for this leg (decimal string)","type":"string"},"maturity":{"description":"Option expiration date in YYYY-MM-DD format. Present for option legs.","type":"string"},"positionEffect":{"description":"Whether this leg opens a new position or closes an existing one:\n- `OPEN` — opens a new position (or increases an existing one).\n- `CLOSE` — closes an existing position (or reduces it).","enum":["OPEN","CLOSE"],"type":"string"},"putCall":{"description":"Option contract type. CALL gives the right to buy; PUT gives the right to sell.","enum":["CALL","PUT"],"type":"string"},"ratioQty":{"description":"Quantity ratio for this leg, returned as a decimal string. Use it to display strategy structure.","type":"string"},"securityType":{"description":"Instrument type for this leg. EQUITY is stock or ETF; OPTION is an options contract.","enum":["EQUITY","OPTION"],"type":"string"},"side":{"description":"Direction for this leg. BUY purchases the instrument; SELL sells it.","enum":["BUY","SELL"],"type":"string"},"strikePrice":{"description":"Option strike price as a decimal string. Present for option legs.","type":"string"},"symbol":{"description":"Symbol for this leg. For options, use the exact contract symbol from search or the order response.","type":"string"},"tickerSymbol":{"description":"Full OCC contract symbol for an option leg (for example `AAPL261023C00340000`). Equity legs carry the plain symbol. Omitted on orders stored before this field existed.","type":"string"}},"required":["symbol","side","ratioQty","securityType","maturity","strikePrice","positionEffect","putCall"],"type":"object"},"type":"array"},"listId":{"description":"ID of the advanced-order list (OCO, bracket, OTO or OTOCO) this order was placed in, shared by every order in the list. Kept on the order's cancel and replace records. Omitted for ordinary orders.","type":"string"},"ordId":{"description":"Broker order ID. Always serialized; may be an empty string for cancel-rejects or before the broker accepts the order.","type":"string"},"ordRejReason":{"description":"Broker rejection reason code or text. Use this with `text` to explain why an order was rejected.","type":"string"},"ordStatus":{"description":"Current state of the order. Possible values:\n- `PENDING_NEW` — Submitted, waiting for exchange acknowledgement.\n- `NEW` — Accepted by the exchange and live in the order book; no fills yet.\n- `PARTIALLY_FILLED` — Some of the quantity has executed; the rest is still working. See `cumQty` and `leavesQty`.\n- `FILLED` — Fully executed. Order is complete.\n- `PENDING_CANCEL` — Cancel request submitted; waiting for exchange confirmation.\n- `CANCELED` — Order was cancelled and will not execute further.\n- `PENDING_REPLACE` — Replace/modify request submitted; waiting for exchange confirmation.\n- `REPLACED` — Order was successfully replaced/modified.\n- `REJECTED` — Order was refused (bad parameters, insufficient buying power, halted symbol, etc.). Check `ordRejReason` and `text`.\n- `EXPIRED` — Order reached its time-in-force limit without filling (e.g. a `DAY` order that didn't fill before close).\n- `DONE_FOR_DAY` — Order is no longer active for today's session but may resume on the next trading day (rare).\n- `STOPPED` — Trading was stopped on this order by an exchange action.\n- `SUSPENDED` — Order is temporarily suspended by the broker or exchange.\n- `CALCULATED` — End-of-day calculated status from FIX (rarely surfaced).\n- `ACCEPTED_FOR_BID` — Acknowledged for a bid (auction workflows).\n- `SUPERSEDED` — Replaced by a newer record; excluded from history responses server-side.\n\nOmitted when the broker has not yet reported a status.","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE","SUPERSEDED"],"type":"string"},"origClOrdId":{"description":"Original client order ID for replace/cancel chains. Omitted when not part of a chain.","type":"string"},"parentClOrdId":{"description":"Client order ID the parent order was placed with, on a child of a bracket, OTO or OTOCO. Unchanged when the child is replaced or cancelled, and when the parent is replaced — follow the parent's `origClOrdId` chain for that. Omitted for parents, OCO orders and ordinary orders.","type":"string"},"price":{"description":"Limit or reference price as a decimal string. Required for limit-style orders and empty or zero for pure market orders.","type":"string"},"qty":{"description":"Original order size as a decimal string. Use this with filled and remaining quantities to show execution progress.","type":"string"},"securityType":{"description":"Instrument type for the order. EQUITY is stock or ETF; OPTION is an options contract.","enum":["EQUITY","OPTION"],"type":"string"},"side":{"description":"Which direction to trade in. Pick one:\n- `BUY` — buying shares or contracts (opens a long position or closes an existing short).\n- `SELL` — selling shares or contracts you already hold (closes a long position).\n- `SELL_SHORT` — selling shares you do not own (opens a short position). Subject to short-sale regulations.\n- `BUY_TO_COVER` — buying shares to close an open short position.","enum":["BUY","SELL","SELL_SHORT","BUY_TO_COVER"],"example":"BUY","type":"string"},"stopPrice":{"description":"Stop trigger price as a decimal string. Required for stop-style orders and empty or zero when not used.","type":"string"},"symbol":{"description":"Primary symbol traded by the order.","type":"string"},"text":{"description":"Broker or platform message about the order. Show this when status is rejected or when the user needs extra context.","type":"string"},"timeInForce":{"description":"How long the order should stay alive before automatically cancelling. Pick one:\n- `DAY` — Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.\n- `GTC` — Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).\n- `IOC` — Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.\n- `FOK` — Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.\n- `EXTENDED_HOURS` — Active during pre-market and after-hours trading sessions in addition to regular hours.\n- `AT_THE_OPENING` — Execute at the official market open price; if it can't fill at open, it's cancelled.\n- `AT_THE_CLOSE` — Execute at the official market close price; if it can't fill at close, it's cancelled.","enum":["DAY","GTC","IOC","FOK","EXTENDED_HOURS","AT_THE_OPENING","AT_THE_CLOSE"],"example":"DAY","type":"string"},"type":{"description":"How the order is priced. Pick one:\n- `MARKET` — Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.\n- `LIMIT` — Execute only at the limit `price` or better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires the `price` field.\n- `STOP` — Sits inactive until the market hits `stopPrice`, then converts to a market order. Common for stop-loss exits. Requires the `stopPrice` field.\n- `STOP_LIMIT` — Sits inactive until the market hits `stopPrice`, then converts to a limit order at `price`. More control than `STOP`, but the limit may not fill. Requires both `stopPrice` and `price`.","enum":["MARKET","LIMIT","STOP","STOP_LIMIT"],"example":"LIMIT","type":"string"},"updatedAt":{"description":"Time the order record was last updated. Use this to show status freshness.","format":"date-time","type":"string"}},"type":"object"},"type":"null","isRequired":true,"uniqueKey":"orders.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"orders","typeLabel":"object[] | null"},"nextCursor":{"description":"Opaque pagination cursor. Pass as `cursor` on the next request. This field is omitted on the final page.","format":"int64","type":"integer","uniqueKey":"nextCursor","typeLabel":"integer\u003cint64>"}},"required":["orders"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"orders":[{"accountId":"TEST-ACCOUNT-001","avgPrice":"0","category":"SINGLE_LEG","clOrdId":"clord-20260115-aapl-001","clientId":"demo-oauth-client","createdAt":"2026-01-15T14:30:00Z","cumQty":"0","currency":"USD","exDestination":"MNGD","leavesQty":"100","legs":[],"ordId":"ord-7f3a9c2e-0001","ordRejReason":"","ordStatus":"NEW","price":"175.50","qty":"100","securityType":"EQUITY","side":"BUY","stopPrice":"","symbol":"AAPL","text":"","timeInForce":"DAY","type":"LIMIT","updatedAt":"2026-01-15T14:30:05Z"}]}}},"exampleType":"examples"}},"description":"Page of active orders","exampleType":"examples"},"010eacb5-cc1e-4023-a15f-453a4b7f5c39":{"content":{"application/json":{"examples":{"flat_string":{"title":"flat_string","value":{"error":"string"}},"flat_with_codes":{"title":"flat_with_codes","value":{"codes":[{"code":"string","description":"string","field":"string"}],"error":"string"}},"nested_bad_request":{"title":"nested_bad_request","value":{"error":{"code":"INVALID_JSON","message":"string","type":"BAD_REQUEST"}}},"nested_shared_http_error":{"title":"nested_shared_http_error","value":{"error":{"code":"VALIDATION_ERROR","details":{"fieldName":"field is required"},"message":"Query parameter validation failed","type":"VALIDATION"}}}},"schema":{"oneOf":[{"type":"object","description":"400 responses commonly use a nested `error` object (`type`, `code`, `message`, optional `details`). Some services still return flat `ErrorResponse` (`error` string, optional `codes`).","properties":{"error":{"description":"Structured payload for the nested `error` object. Services using the shared Go error writer emit uppercase `type` values aligned with error categories (for example `VALIDATION`, `BAD_REQUEST`, `AUTHENTICATION`, `AUTHORIZATION`, `NOT_FOUND`, `RATE_LIMIT`, `INTERNAL`).","properties":{"code":{"description":"Machine-readable code","example":"INVALID_TOKEN","type":"string","uniqueKey":"oneOf.0.error.code","typeLabel":"string"},"details":{"additionalProperties":true,"description":"Optional extra context","type":"object","uniqueKey":"oneOf.0.error.details","typeLabel":"object"},"message":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.0.error.message","typeLabel":"string"},"request_id":{"description":"Request correlation id when provided","type":"string","uniqueKey":"oneOf.0.error.request_id","typeLabel":"string"},"type":{"description":"Error category emitted by the shared error writer, such as VALIDATION, BAD_REQUEST, AUTHENTICATION, AUTHORIZATION, NOT_FOUND, RATE_LIMIT, or INTERNAL.","example":"AUTHENTICATION","type":"string","uniqueKey":"oneOf.0.error.type","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.0.error","typeLabel":"object"},"meta":{"additionalProperties":true,"description":"Optional metadata","type":"object","uniqueKey":"oneOf.0.meta","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"400 responses commonly use a nested `error` object (`type`, `code`, `message`, optional `details`). Some services still return flat `ErrorResponse` (`error` string, optional `codes`).","properties":{"codes":{"description":"Structured error codes for programmatic handling","items":{"description":"A single structured error entry identifying a machine-readable code, a human-readable description, and optionally the field that caused it.","properties":{"code":{"description":"Machine-readable error code","example":"INVALID_PASSWORD","type":"string","uniqueKey":"oneOf.1.codes.items.[INDEX].code","typeLabel":"string"},"description":{"description":"Human-readable description of the error","example":"Password must be between 8 and 64 characters","type":"string","uniqueKey":"oneOf.1.codes.items.[INDEX].description","typeLabel":"string"},"field":{"description":"Field name that caused the error","example":"password","type":"string","uniqueKey":"oneOf.1.codes.items.[INDEX].field","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.1.codes.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"oneOf.1.codes","typeLabel":"object[]"},"error":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.1.error","typeLabel":"string"},"metadata":{"additionalProperties":true,"description":"Additional error context","type":"object","uniqueKey":"oneOf.1.metadata","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Invalid query/path/body, malformed JSON, or failed validation.\n\n**Backend (shared HTTP errors):** Routes that use the shared error writer typically return a **nested** JSON object: `error.type` is an uppercase category such as `VALIDATION` or `BAD_REQUEST` (see the API implementation). Other routes may return the **flat** `ErrorResponse` shape (`error` as a string, optional `codes`). The body may rarely be empty.\n\n**OpenAPI:** Every operation’s **400** response references this component so the documented schema and examples stay aligned.","exampleType":"examples"},"78f21f4e-1055-41da-bfb0-f055bdf08816":{"content":{"application/json":{"examples":{"flat_message":{"title":"flat_message","value":{"error":"string"}},"flat_with_codes":{"title":"flat_with_codes","value":{"codes":[{"code":"string","description":"string"}],"error":"string"}},"nested_error_object":{"title":"nested_error_object","value":{"error":{"code":"INVALID_TOKEN","message":"string","type":"AUTHENTICATION"}}}},"schema":{"oneOf":[{"type":"object","description":"401 responses may use a flat `ErrorResponse` shape or a nested `error` object. Inspect `error`: if it is a string, use the flat shape; if it is an object, use the structured shape.","properties":{"codes":{"description":"Structured error codes for programmatic handling","items":{"description":"A single structured error entry identifying a machine-readable code, a human-readable description, and optionally the field that caused it.","properties":{"code":{"description":"Machine-readable error code","example":"INVALID_PASSWORD","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].code","typeLabel":"string"},"description":{"description":"Human-readable description of the error","example":"Password must be between 8 and 64 characters","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].description","typeLabel":"string"},"field":{"description":"Field name that caused the error","example":"password","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].field","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.0.codes.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"oneOf.0.codes","typeLabel":"object[]"},"error":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.0.error","typeLabel":"string"},"metadata":{"additionalProperties":true,"description":"Additional error context","type":"object","uniqueKey":"oneOf.0.metadata","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"401 responses may use a flat `ErrorResponse` shape or a nested `error` object. Inspect `error`: if it is a string, use the flat shape; if it is an object, use the structured shape.","properties":{"error":{"description":"Structured payload for the nested `error` object. Services using the shared Go error writer emit uppercase `type` values aligned with error categories (for example `VALIDATION`, `BAD_REQUEST`, `AUTHENTICATION`, `AUTHORIZATION`, `NOT_FOUND`, `RATE_LIMIT`, `INTERNAL`).","properties":{"code":{"description":"Machine-readable code","example":"INVALID_TOKEN","type":"string","uniqueKey":"oneOf.1.error.code","typeLabel":"string"},"details":{"additionalProperties":true,"description":"Optional extra context","type":"object","uniqueKey":"oneOf.1.error.details","typeLabel":"object"},"message":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.1.error.message","typeLabel":"string"},"request_id":{"description":"Request correlation id when provided","type":"string","uniqueKey":"oneOf.1.error.request_id","typeLabel":"string"},"type":{"description":"Error category emitted by the shared error writer, such as VALIDATION, BAD_REQUEST, AUTHENTICATION, AUTHORIZATION, NOT_FOUND, RATE_LIMIT, or INTERNAL.","example":"AUTHENTICATION","type":"string","uniqueKey":"oneOf.1.error.type","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.1.error","typeLabel":"object"},"meta":{"additionalProperties":true,"description":"Optional metadata","type":"object","uniqueKey":"oneOf.1.meta","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Authentication failed: missing credentials, invalid JWT, or expired access token.\n\n**Response body variants:** Some routes return JSON with a string `error` field (and optionally `codes` / `metadata`). Others return JSON where `error` is a structured object (`type`, `code`, `message`, and optionally `details`, `request_id`). The response may have **no body** even though the status is 401—clients should treat 401 as unauthenticated and refresh or re-authenticate regardless of body shape.","exampleType":"examples"},"fb5cef7d-80de-4e8e-882a-7bdc4200d15f":{"content":{"application/json":{"examples":{"flat":{"title":"flat","value":{"error":"string"}},"nested":{"title":"nested","value":{"error":{"code":"INSUFFICIENT_SCOPE","message":"string","type":"AUTHORIZATION"}}}},"schema":{"oneOf":[{"type":"object","description":"403 responses may use a flat or nested error shape.","properties":{"codes":{"description":"Structured error codes for programmatic handling","items":{"description":"A single structured error entry identifying a machine-readable code, a human-readable description, and optionally the field that caused it.","properties":{"code":{"description":"Machine-readable error code","example":"INVALID_PASSWORD","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].code","typeLabel":"string"},"description":{"description":"Human-readable description of the error","example":"Password must be between 8 and 64 characters","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].description","typeLabel":"string"},"field":{"description":"Field name that caused the error","example":"password","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].field","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.0.codes.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"oneOf.0.codes","typeLabel":"object[]"},"error":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.0.error","typeLabel":"string"},"metadata":{"additionalProperties":true,"description":"Additional error context","type":"object","uniqueKey":"oneOf.0.metadata","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"403 responses may use a flat or nested error shape.","properties":{"error":{"description":"Structured payload for the nested `error` object. Services using the shared Go error writer emit uppercase `type` values aligned with error categories (for example `VALIDATION`, `BAD_REQUEST`, `AUTHENTICATION`, `AUTHORIZATION`, `NOT_FOUND`, `RATE_LIMIT`, `INTERNAL`).","properties":{"code":{"description":"Machine-readable code","example":"INVALID_TOKEN","type":"string","uniqueKey":"oneOf.1.error.code","typeLabel":"string"},"details":{"additionalProperties":true,"description":"Optional extra context","type":"object","uniqueKey":"oneOf.1.error.details","typeLabel":"object"},"message":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.1.error.message","typeLabel":"string"},"request_id":{"description":"Request correlation id when provided","type":"string","uniqueKey":"oneOf.1.error.request_id","typeLabel":"string"},"type":{"description":"Error category emitted by the shared error writer, such as VALIDATION, BAD_REQUEST, AUTHENTICATION, AUTHORIZATION, NOT_FOUND, RATE_LIMIT, or INTERNAL.","example":"AUTHENTICATION","type":"string","uniqueKey":"oneOf.1.error.type","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.1.error","typeLabel":"object"},"meta":{"additionalProperties":true,"description":"Optional metadata","type":"object","uniqueKey":"oneOf.1.meta","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Authenticated but not allowed to perform this action or access this resource (insufficient scope or role).\n\n**Response body variants:** Flat `ErrorResponse` or nested `error` object, same pattern as 400/401.","exampleType":"examples"},"13b990dd-f731-4e74-9dee-f57e720c0f53":{"content":{"application/json":{"examples":{"flat":{"title":"flat","value":{"error":"string"}},"nested":{"title":"nested","value":{"error":{"code":"RESOURCE_NOT_FOUND","message":"string","type":"NOT_FOUND"}}}},"schema":{"oneOf":[{"type":"object","description":"404 responses may use a flat or nested error shape.","properties":{"codes":{"description":"Structured error codes for programmatic handling","items":{"description":"A single structured error entry identifying a machine-readable code, a human-readable description, and optionally the field that caused it.","properties":{"code":{"description":"Machine-readable error code","example":"INVALID_PASSWORD","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].code","typeLabel":"string"},"description":{"description":"Human-readable description of the error","example":"Password must be between 8 and 64 characters","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].description","typeLabel":"string"},"field":{"description":"Field name that caused the error","example":"password","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].field","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.0.codes.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"oneOf.0.codes","typeLabel":"object[]"},"error":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.0.error","typeLabel":"string"},"metadata":{"additionalProperties":true,"description":"Additional error context","type":"object","uniqueKey":"oneOf.0.metadata","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"404 responses may use a flat or nested error shape.","properties":{"error":{"description":"Structured payload for the nested `error` object. Services using the shared Go error writer emit uppercase `type` values aligned with error categories (for example `VALIDATION`, `BAD_REQUEST`, `AUTHENTICATION`, `AUTHORIZATION`, `NOT_FOUND`, `RATE_LIMIT`, `INTERNAL`).","properties":{"code":{"description":"Machine-readable code","example":"INVALID_TOKEN","type":"string","uniqueKey":"oneOf.1.error.code","typeLabel":"string"},"details":{"additionalProperties":true,"description":"Optional extra context","type":"object","uniqueKey":"oneOf.1.error.details","typeLabel":"object"},"message":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.1.error.message","typeLabel":"string"},"request_id":{"description":"Request correlation id when provided","type":"string","uniqueKey":"oneOf.1.error.request_id","typeLabel":"string"},"type":{"description":"Error category emitted by the shared error writer, such as VALIDATION, BAD_REQUEST, AUTHENTICATION, AUTHORIZATION, NOT_FOUND, RATE_LIMIT, or INTERNAL.","example":"AUTHENTICATION","type":"string","uniqueKey":"oneOf.1.error.type","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.1.error","typeLabel":"object"},"meta":{"additionalProperties":true,"description":"Optional metadata","type":"object","uniqueKey":"oneOf.1.meta","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"The requested resource does not exist or is not visible to this caller.\n\n**Response body variants:** Flat `ErrorResponse` or nested `error` object.","exampleType":"examples"},"9752c0f4-e96b-4129-8507-b68dd3365403":{"content":{"application/json":{"examples":{"flat_string":{"title":"flat_string","value":{"error":"string"}},"nested_error_object":{"title":"nested_error_object","value":{"error":{"code":"INTERNAL_ERROR","message":"string","type":"INTERNAL"}}}},"schema":{"oneOf":[{"type":"object","description":"5xx responses may use a flat or nested error shape.","properties":{"codes":{"description":"Structured error codes for programmatic handling","items":{"description":"A single structured error entry identifying a machine-readable code, a human-readable description, and optionally the field that caused it.","properties":{"code":{"description":"Machine-readable error code","example":"INVALID_PASSWORD","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].code","typeLabel":"string"},"description":{"description":"Human-readable description of the error","example":"Password must be between 8 and 64 characters","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].description","typeLabel":"string"},"field":{"description":"Field name that caused the error","example":"password","type":"string","uniqueKey":"oneOf.0.codes.items.[INDEX].field","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.0.codes.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"oneOf.0.codes","typeLabel":"object[]"},"error":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.0.error","typeLabel":"string"},"metadata":{"additionalProperties":true,"description":"Additional error context","type":"object","uniqueKey":"oneOf.0.metadata","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"5xx responses may use a flat or nested error shape.","properties":{"error":{"description":"Structured payload for the nested `error` object. Services using the shared Go error writer emit uppercase `type` values aligned with error categories (for example `VALIDATION`, `BAD_REQUEST`, `AUTHENTICATION`, `AUTHORIZATION`, `NOT_FOUND`, `RATE_LIMIT`, `INTERNAL`).","properties":{"code":{"description":"Machine-readable code","example":"INVALID_TOKEN","type":"string","uniqueKey":"oneOf.1.error.code","typeLabel":"string"},"details":{"additionalProperties":true,"description":"Optional extra context","type":"object","uniqueKey":"oneOf.1.error.details","typeLabel":"object"},"message":{"description":"Error detail as a string. Exact message content is not fixed and should not be hard-coded.","example":"string","type":"string","uniqueKey":"oneOf.1.error.message","typeLabel":"string"},"request_id":{"description":"Request correlation id when provided","type":"string","uniqueKey":"oneOf.1.error.request_id","typeLabel":"string"},"type":{"description":"Error category emitted by the shared error writer, such as VALIDATION, BAD_REQUEST, AUTHENTICATION, AUTHORIZATION, NOT_FOUND, RATE_LIMIT, or INTERNAL.","example":"AUTHENTICATION","type":"string","uniqueKey":"oneOf.1.error.type","typeLabel":"string"}},"type":"object","uniqueKey":"oneOf.1.error","typeLabel":"object"},"meta":{"additionalProperties":true,"description":"Optional metadata","type":"object","uniqueKey":"oneOf.1.meta","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"description":"Unexpected server error or upstream failure. **Retry with exponential backoff**; do not assume a specific JSON body shape.\n\n**Response body variants:** Flat `ErrorResponse`, nested `error` object, or occasionally a minimal message.","exampleType":"examples"}},"security":{"6853b154-8f5c-4da6-aacc-e831ba46a872":{"OAuth2":{"description":"OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.","flows":{"authorizationCode":{"authorizationUrl":"https://app.aries.com/oauth2/authorize","refreshUrl":"https://api.aries.com/v1/oauth2/token","scopes":{"account:information":"View account balances, positions, and transaction history","analytics:information":"View analytics, ratings, and market insights","calendar:information":"Access earnings, economic, and market schedule data","market:information":"Access live and historical market data","market:supplemental":"News, company profiles, financials, filings, ETF data, technical analysis","options:information":"Access options chains and expiration data","order:execution":"Place, modify, and cancel orders","order:information":"View order history and status","position:information":"View current positions and holdings","user:information":"View user profile and personal details","user:management":"Manage user-scoped resources and saved configuration (internal).","watchlist:information":"View your watchlists and their symbols.","watchlist:management":"Create, update, replace, and delete your watchlists."},"tokenUrl":"https://api.aries.com/v1/oauth2/token"},"clientCredentials":{"refreshUrl":"https://api.aries.com/v1/oauth2/token","scopes":{"account:information":"View account balances, positions, and transaction history","analytics:information":"View analytics, ratings, and market insights","calendar:information":"Access earnings, economic, and market schedule data","market:information":"Access live and historical market data","market:supplemental":"News, company profiles, financials, filings, ETF data, technical analysis","options:information":"Access options chains and expiration data","order:execution":"Place, modify, and cancel orders","order:information":"View order history and status","position:information":"View current positions and holdings","user:information":"View user profile and personal details","user:management":"Manage user-scoped resources and saved configuration (internal).","watchlist:information":"View your watchlists and their symbols.","watchlist:management":"Create, update, replace, and delete your watchlists."},"tokenUrl":"https://api.aries.com/v1/oauth2/token"}},"type":"oauth2","scopes":["order:information"],"schemeName":"OAuth2"}}},"servers":{"f38d7b7f-6d4c-4c3f-8232-2c94a60e51ad":{"description":"Production server","url":"https://api.aries.com"},"421feb2d-ac41-443e-9380-492252b72659":{"description":"Staging server","url":"https://api.tradearies.dev"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"description":"OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.","flows":{"authorizationCode":{"authorizationUrl":"https://app.aries.com/oauth2/authorize","refreshUrl":"https://api.aries.com/v1/oauth2/token","scopes":{"account:information":"View account balances, positions, and transaction history","analytics:information":"View analytics, ratings, and market insights","calendar:information":"Access earnings, economic, and market schedule data","market:information":"Access live and historical market data","market:supplemental":"News, company profiles, financials, filings, ETF data, technical analysis","options:information":"Access options chains and expiration data","order:execution":"Place, modify, and cancel orders","order:information":"View order history and status","position:information":"View current positions and holdings","user:information":"View user profile and personal details","user:management":"Manage user-scoped resources and saved configuration (internal).","watchlist:information":"View your watchlists and their symbols.","watchlist:management":"Create, update, replace, and delete your watchlists."},"tokenUrl":"https://api.aries.com/v1/oauth2/token"},"clientCredentials":{"refreshUrl":"https://api.aries.com/v1/oauth2/token","scopes":{"account:information":"View account balances, positions, and transaction history","analytics:information":"View analytics, ratings, and market insights","calendar:information":"Access earnings, economic, and market schedule data","market:information":"Access live and historical market data","market:supplemental":"News, company profiles, financials, filings, ETF data, technical analysis","options:information":"Access options chains and expiration data","order:execution":"Place, modify, and cancel orders","order:information":"View order history and status","position:information":"View current positions and holdings","user:information":"View user profile and personal details","user:management":"Manage user-scoped resources and saved configuration (internal).","watchlist:information":"View your watchlists and their symbols.","watchlist:management":"Create, update, replace, and delete your watchlists."},"tokenUrl":"https://api.aries.com/v1/oauth2/token"}},"type":"oauth2","scopes":["order:information"],"schemeName":"OAuth2"},"schema":{"title":"OAuth2 Auth","type":"string","isRequired":true,"description":"OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"OAuth2","name":"Authorization"}],"title":"OAuth2"}]},"originalFileLocation":"openapi.json"},"subdomain":"ariesfinancialinc","siteName":"Aries API","title":"Today's Orders - Aries API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-21T15:46:21.325Z","originalFileLocation":"api-reference/accounts/list-active-orders.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=\"Paginated active orders for an account from the trade read service: open orders plus today\u0026#x27;s terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates. Use Case: Drive a live blotter or reconcile REST snapshots with accUpdates by merging on clOrdId.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Aries API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_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/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_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/ariesfinancialinc/ylnD03T0GOb_wvQC/_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/ariesfinancialinc/ylnD03T0GOb_wvQC/_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/ariesfinancialinc/ylnD03T0GOb_wvQC/_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/ariesfinancialinc/ylnD03T0GOb_wvQC/_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/ariesfinancialinc/ylnD03T0GOb_wvQC/_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/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Today\u0026#x27;s Orders - Aries API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Paginated active orders for an account from the trade read service: open orders plus today\u0026#x27;s terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates. Use Case: Drive a live blotter or reconcile REST snapshots with accUpdates by merging on clOrdId.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Aries API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://finance.dev/api-reference/accounts/list-active-orders\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ariesfinancialinc.mintlify.app/_mintlify/api/og/v2?division=Accounts\u0026amp;title=Today%27s+Orders\u0026amp;description=Paginated+active+orders+for+an+account+from+the+trade+read+service%3A+open+orders+plus+today%27s+terminal+activity.+Default+source+is+the+v2+cache%3B+optional+Postgre\u0026amp;theme=d059c03e4782a17f3aeb5806\u0026amp;signature=d33da8e996dcf12e6c9d1d3427987b44f1577ad05bdfc92f17f2fd5c2a5ca2c6\">\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=\"Today\u0026#x27;s Orders - Aries API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Paginated active orders for an account from the trade read service: open orders plus today\u0026#x27;s terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates. Use Case: Drive a live blotter or reconcile REST snapshots with accUpdates by merging on clOrdId.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ariesfinancialinc.mintlify.app/_mintlify/api/og/v2?division=Accounts\u0026amp;title=Today%27s+Orders\u0026amp;description=Paginated+active+orders+for+an+account+from+the+trade+read+service%3A+open+orders+plus+today%27s+terminal+activity.+Default+source+is+the+v2+cache%3B+optional+Postgre\u0026amp;theme=d059c03e4782a17f3aeb5806\u0026amp;signature=d33da8e996dcf12e6c9d1d3427987b44f1577ad05bdfc92f17f2fd5c2a5ca2c6\">\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/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Aries API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0BAA5E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://finance.dev/api-reference/accounts/list-active-orders\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/accounts/list-active-orders.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://finance.dev/#organization\",\"name\":\"Aries API\",\"url\":\"https://finance.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ariesfinancialinc/RAN-JEltzDnib-_A/logo/light.svg?fit=max\u0026auto=format\u0026n=RAN-JEltzDnib-_A\u0026q=85\u0026s=4eae127cdf55bb09159d2b5a625690e3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://finance.dev#website\",\"name\":\"Aries API\",\"url\":\"https://finance.dev\",\"publisher\":{\"@id\":\"https://finance.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://finance.dev/api-reference/accounts/list-active-orders#webpage\",\"url\":\"https://finance.dev/api-reference/accounts/list-active-orders\",\"name\":\"Today's Orders\",\"description\":\"Paginated active orders for an account from the trade read service: open orders plus today's terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates. Use Case: Drive a live blotter or reconcile REST snapshots with accUpdates by merging on clOrdId.\",\"dateModified\":\"2026-10-21T15:46:21.325Z\",\"isPartOf\":{\"@id\":\"https://finance.dev#website\"},\"breadcrumb\":{\"@id\":\"https://finance.dev/api-reference/accounts/list-active-orders#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://finance.dev/api-reference/accounts/list-active-orders#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accounts\",\"item\":\"https://finance.dev/api-reference/accounts/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Today's Orders\",\"item\":\"https://finance.dev/api-reference/accounts/list-active-orders\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://finance.dev/api-reference/accounts/list-active-orders#apireference\",\"headline\":\"Today's Orders\",\"name\":\"Today's Orders\",\"description\":\"Paginated active orders for an account from the trade read service: open orders plus today's terminal activity. Default source is the v2 cache; optional PostgreSQL reads use the same domain order shape as WebSocket updates. Use Case: Drive a live blotter or reconcile REST snapshots with accUpdates by merging on clOrdId.\",\"url\":\"https://finance.dev/api-reference/accounts/list-active-orders\",\"mainEntityOfPage\":{\"@id\":\"https://finance.dev/api-reference/accounts/list-active-orders#webpage\"},\"dateModified\":\"2026-10-21T15:46:21.325Z\",\"publisher\":{\"@id\":\"https://finance.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://finance.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Aries API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Aries API","nav":{"global":null,"tabs":[{"tab":"Welcome","icon":"house","pages":[{"title":"Welcome","href":"/welcome"}]},{"tab":"Quick Start","icon":"rocket","pages":[{"title":"Quick Start","href":"/api-reference/quickstart"}]},{"tab":"Auth","icon":"shield-halved","pages":[{"title":"Auth","href":"/api-reference/oauth2/overview"}]},{"tab":"Core API","icon":"bolt","pages":[{"title":"API Reference","href":"/api-reference"},{"group":"Users","pages":[{"title":"Get User Info","openapi":"openapi.json GET /v1/users/info","href":"/api-reference/user/info"}]},{"group":"Accounts","pages":[{"group":"Guide","pages":[{"title":"Account Info","href":"/api-reference/accounts/overview"}]},{"title":"User Accounts","description":"Retrieve all trading accounts associated with the authenticated user. Each account includes a trading account ID (used in order requests), broker account ID, status, simulation flag, and account type and class. Users may have multiple accounts, such as a live margin account and a simulation account.\n\n**Use Case:** Display an account selector dropdown so users can switch between their live and simulation accounts before placing orders.\n","openapi":"openapi.json GET /v2/users/me/accounts","href":"/api-reference/accounts/user-accounts"},{"title":"Today's Orders","openapi":"openapi.json GET /v2/accounts/{id}/orders","href":"/api-reference/accounts/list-active-orders"},{"title":"List order history","description":"Paginated historical orders for an account from PostgreSQL within a date range (up to 90 days). Always reads from the database; filtering excludes superseded and failed rows. Optional `exclude_today` avoids overlap with the active-orders v2 endpoint.\n\n**Use Case:** Fill gaps before today's session or export fills for reporting without walking the live cache cursor.\n","openapi":"openapi.json GET /v2/accounts/{id}/orders/history","href":"/api-reference/accounts/list-orders-history"},{"title":"Account Positions","openapi":"openapi.json GET /v1/accounts/{id}/positions","href":"/api-reference/accounts/positions"},{"title":"Account Balance","openapi":"openapi.json GET /v2/accounts/{id}/balance","href":"/api-reference/accounts/balance"}]},{"group":"Orders","pages":[{"group":"Guide","pages":[{"title":"Order Flow","href":"/api-reference/orders/order-flow"},{"title":"Market Order","href":"/api-reference/orders/market-order"},{"title":"Limit Order","href":"/api-reference/orders/limit-order"},{"title":"Stop Order","href":"/api-reference/orders/stop-order"},{"title":"Stop-Limit Order","href":"/api-reference/orders/stop-limit-order"},{"title":"Single-Leg Option Order","href":"/api-reference/orders/single-leg-option"},{"title":"Multi-Leg Option Order","href":"/api-reference/orders/multi-leg-option"}]},{"title":"Place Order","openapi":"openapi.json POST /v1/orders","href":"/api-reference/orders/place-order"},{"title":"Replace Order","openapi":"openapi.json POST /v1/orders/replace","href":"/api-reference/orders/update-order"},{"title":"Cancel Order","openapi":"openapi.json POST /v1/orders/cancel","href":"/api-reference/orders/cancel-order"},{"title":"Preview Order","openapi":"openapi.json POST /v1/orders/preview","href":"/api-reference/orders/preview-order"}]},{"group":"Market Data","pages":[{"group":"Guide","pages":[{"title":"Market Data","href":"/api-reference/marketdata/overview"}]},{"title":"Search Symbols","openapi":"openapi.json GET /v1/marketdata/search","href":"/api-reference/marketdata/search"},{"title":"Equity Details","openapi":"openapi.json GET /v1/marketdata/equities/details","href":"/api-reference/marketdata/equity-details"},{"title":"Options Details","openapi":"openapi.json GET /v1/marketdata/options/details","href":"/api-reference/marketdata/options-details"},{"title":"Easy-to-Borrow List","openapi":"openapi.json GET /v1/etb","href":"/api-reference/marketdata/easy-to-borrow-list"},{"title":"Easy-to-Borrow Search","openapi":"openapi.json POST /v1/etb/search","href":"/api-reference/marketdata/easy-to-borrow-search"}]},{"group":"Watchlist","pages":[{"title":"Create Watchlist","openapi":"openapi.json POST /v1/config/watchlist","href":"/api-reference/watchlist/create-watchlist"},{"title":"List Watchlists","openapi":"openapi.json GET /v1/config/watchlist","href":"/api-reference/watchlist/list-watchlists"},{"title":"Get Watchlist","openapi":"openapi.json GET /v1/config/watchlist/{watchlist_id}","href":"/api-reference/watchlist/get-watchlist"},{"title":"Update Watchlist","openapi":"openapi.json PATCH /v1/config/watchlist/{watchlist_id}","href":"/api-reference/watchlist/update-watchlist"},{"title":"Delete Watchlist","openapi":"openapi.json DELETE /v1/config/watchlist/{watchlist_id}","href":"/api-reference/watchlist/delete-watchlist"},{"title":"Replace All Watchlists","openapi":"openapi.json PUT /v1/config/watchlist","href":"/api-reference/watchlist/replace-watchlists"}]},{"group":"Chart","pages":[{"title":"Chart Configuration","openapi":"openapi.json GET /v1/chart/config","href":"/api-reference/chart/get-config"},{"title":"Symbol Information","openapi":"openapi.json GET /v1/chart/symbols","href":"/api-reference/chart/get-symbol-info"},{"title":"Historical Bars","openapi":"openapi.json GET /v1/chart/history","href":"/api-reference/chart/get-historical-bars"},{"title":"Tick-Based Chart Data","openapi":"openapi.json GET /v1/chart/tick-history","href":"/api-reference/chart/get-tick-history"},{"title":"Server Time","openapi":"openapi.json GET /v1/chart/time","href":"/api-reference/chart/get-server-time"},{"title":"Search Symbols","openapi":"openapi.json GET /v1/chart/search","href":"/api-reference/chart/search-symbols"},{"title":"Quotes","openapi":"openapi.json GET /v1/chart/quotes","href":"/api-reference/chart/get-quotes"}]}]},{"tab":"Supplemental API","icon":"chart-mixed","pages":[{"title":"Supplemental API","href":"/supplemental-api/overview"}]},{"tab":"Prediction API","icon":"landmark","pages":[{"title":"Prediction API","href":"/prediction-api/overview"}]},{"tab":"Streaming API","icon":"satellite-dish","pages":[{"title":"Streaming API","href":"/websockets/overview"}]},{"tab":"AI Agents","icon":"robot","pages":[{"title":"AI Agents","href":"/ai-agents/add-skill"}]},{"tab":"MCP Auth","icon":"plug","pages":[{"title":"MCP Auth","href":"/mcp-auth"}]},{"tab":"SDKs","icon":"code","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"Changelog","icon":"newspaper","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Today's Orders - Aries API","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}