This endpoint returns an order whether it is still open or was closed within roughly the last hour, and wraps it in an order key. It is the only single-order lookup that reports an order already filled, cancelled, rejected, or modified. Beyond that one-hour window the response is 404.See Polling Order Status.
Unique identifier of the order. Example value: 01J4MD3R7N4HH4G76PT47VG3QC. You can get this value from the create order response. Provide either order-id or client-request-id, not both.
Client-generated UUID for correlation. Example value: 0835bf3e-4a20-41f0-908d-8213f2b7a285. This is the same value as the clientRequestId field in the create order request. Provide either order-id or client-request-id, not both.
Order object containing all details for the requested order.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rails Trading Developer API Documentation","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/railsxyz/XTasO28fw_2bd6Tp/logo/light.svg?fit=max\u0026auto=format\u0026n=XTasO28fw_2bd6Tp\u0026q=85\u0026s=562d1517f28bb695fb280b18dd4310a4","dark":"https://mintcdn.com/railsxyz/XTasO28fw_2bd6Tp/logo/dark.svg?fit=max\u0026auto=format\u0026n=XTasO28fw_2bd6Tp\u0026q=85\u0026s=2dc52a8a93c85cb2edae7edc4f009831"},"favicon":"https://mintcdn.com/railsxyz/XTasO28fw_2bd6Tp/favicon.svg?fit=max\u0026auto=format\u0026n=XTasO28fw_2bd6Tp\u0026q=85\u0026s=508a9eb467ddd29d6d1034598ada1654","api":{"openapi":["latest/openapi/auth.json","latest/perps/openapi/account.json","latest/perps/openapi/order.json","latest/perps/openapi/market.json","latest/options/openapi/options.json","latest/options/openapi/matching.json"],"asyncapi":["latest/perps/asyncapi/perps-ws.yaml","latest/perps/asyncapi/test-public-stream.yaml","latest/perps/asyncapi/test-authenticated-stream.yaml","latest/options/asyncapi/options-ws.yaml"]},"navbar":{"links":[{"href":"https://help.rails.xyz/","label":"Support"}]},"footer":{"socials":{"website":"https://rails.xyz/","twitter":"https://twitter.com/rails_xyz","linkedin":"https://www.linkedin.com/company/railsxyz"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"railsxyz","hasAudioNarration":false,"actualSubdomain":"railsxyz","customDomains":["docs.rails.xyz"],"gitSource":{"type":"github","owner":"rails-xyz","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aea549f2e37211236f3db90","collectionId":"05092de5-fa9b-44af-8f36-f8874c5a6aa2","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aea549f2e37211236f3db90"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aea549f2e37211236f3db90","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Options","count":44},{"language":"default","tag":"Perpetuals","count":42},{"language":"default","tag":"HTTP API Reference","count":29},{"language":"default","tag":"Get Started","count":25},{"language":"default","tag":"Guides","count":24},{"language":"default","tag":"WebSocket API Reference","count":18},{"language":"default","tag":"User Account","count":10},{"language":"default","tag":"Go SDK","count":9},{"language":"default","tag":"Formulas","count":9},{"language":"default","tag":"Market Data","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":".flex.flex-col.gap-8:not(.isolate)+#pagination{margin-top:3.5rem}.bindings-schema [title=\"expiration\"] [data-component-part=\"field-required-pill\"],.bindings-schema [title=\"strike\"] [data-component-part=\"field-required-pill\"],.bindings-schema [title=\"type\"] [data-component-part=\"field-required-pill\"],.bindings-schema [title=\"sessionId\"] [data-component-part=\"field-required-pill\"]{display:none!important}[data-testid=\"api-playground-modal\"] [title=\"expiration\"] [data-component-part=\"field-required-pill\"],[data-testid=\"api-playground-modal\"] [title=\"strike\"] [data-component-part=\"field-required-pill\"],[data-testid=\"api-playground-modal\"] [title=\"type\"] [data-component-part=\"field-required-pill\"],[data-testid=\"api-playground-modal\"] [title=\"sessionId\"] [data-component-part=\"field-required-pill\"]{display:none!important}@media (prefers-color-scheme: dark){[data-main-title]{color:#f0f0f0!important}[data-subtitle]{color:#d0d0d0!important}[data-quickstart-title]{color:#f0f0f0!important}[data-card]{background:#1f1f1f!important;border-color:#3f3f3f!important;color:#f0f0f0!important}[data-card]:hover{border-color:#0D9373!important;box-shadow:0 4px 16px rgba(13,147,115,0.3)!important}[data-card-title]{color:#f0f0f0!important}[data-card-desc]{color:#d0d0d0!important}[data-card-icon]{background:#1f1f1f!important}}.dark [data-main-title]{color:#f0f0f0!important}.dark [data-subtitle]{color:#d0d0d0!important}.dark [data-quickstart-title]{color:#f0f0f0!important}.dark [data-card]{background:#1f1f1f!important;border-color:#3f3f3f!important;color:#f0f0f0!important}.dark [data-card]:hover{border-color:#0D9373!important;box-shadow:0 4px 16px rgba(13,147,115,0.3)!important}.dark [data-card-title]{color:#f0f0f0!important}.dark [data-card-desc]{color:#d0d0d0!important}.dark [data-card-icon]{background:#1f1f1f!important}.dark [data-install]{background:#1f1f1f!important;border-color:#3f3f3f!important;color:#f0f0f0!important}.dark [data-install-copy]{background:#2a2a2a!important;border-color:#3f3f3f!important;color:#f0f0f0!important}.dark [data-install] a{color:#07C983!important}"}],"page":{"pagePath":"latest/perps/rest-api/get-order-by-id","slug":"/latest/perps/rest-api/get-order-by-id","pageMetadata":{"title":"Get Order By ID","description":"This endpoint retrieves a single open or recently closed order by order ID or client request ID.","openapi":"GET /api/v1/order","href":"/latest/perps/rest-api/get-order-by-id"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"This endpoint retrieves a single open or recently closed order by order ID or client request ID.\"\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{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,..._provideComponents(),...props.components},{Note}=_components;if(!Note)_missingMdxReference(`Note`,true);return _jsxs(Note,{children:[_jsxs(_components.p,{children:[`This endpoint returns an order whether it is still open or was closed within roughly the last hour, and wraps it in an `,_jsx(_components.code,{children:`order`}),` key. It is the only single-order lookup that reports an order already `,_jsx(_components.code,{children:`filled`}),`, `,_jsx(_components.code,{children:`cancelled`}),`, `,_jsx(_components.code,{children:`rejected`}),`, or `,_jsx(_components.code,{children:`modified`}),`. Beyond that one-hour window the response is `,_jsx(_components.code,{children:`404`}),`.`]}),_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/latest/perps/guides/open-orders#polling-order-status`,children:`Polling Order Status`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Order By ID","description":"This endpoint retrieves a single open or recently closed order by order ID or client request ID.","openapi":"GET /api/v1/order","href":"/latest/perps/rest-api/get-order-by-id"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Get Order By ID","operationId":"getOrderById","parameters":["a18041cd-25ad-4e11-9cc9-30cab059501b","a6d5aecd-0bff-4964-9dc3-08b31f7a7346","3ada9e3c-572f-44ea-95d7-2b76b018b4d8"],"security":["b56853da-609f-4b08-a063-015fbb7dcda3"],"responses":{"200":"f220d9d9-5e47-4f40-8fca-83bddf62ea17","400":"e3e104bb-9a89-4458-8094-b7e091287403","401":"1b883d0b-e345-476d-8c44-c89c3f202c7c","404":"f13f60e2-d60c-4445-975d-d81d8ca80a0f","429":"339bfbb2-a9f6-4b23-a31d-3440996f51f2"},"method":"get","type":"path","servers":["2f2521a1-17a0-4beb-b14d-8d73b0a87679"],"path":"/api/v1/order","baseUrlOptions":["https://order.sandbox.rails.xyz"],"title":"Get Order By ID","description":"This endpoint retrieves a single open or recently closed order by order ID or client request ID.","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"a18041cd-25ad-4e11-9cc9-30cab059501b":{"name":"market","in":"query","description":"Market name. Example value: `ETH-USDT`. To get all supported markets, call [/api/v1/markets](/latest/perps/rest-api/get-supported-markets) endpoint.","required":true,"schema":{"type":"string","isRequired":true,"description":"Market name. Example value: `ETH-USDT`. To get all supported markets, call [/api/v1/markets](/latest/perps/rest-api/get-supported-markets) endpoint.","uniqueKey":"","typeLabel":"string"}},"a6d5aecd-0bff-4964-9dc3-08b31f7a7346":{"name":"order-id","in":"query","description":"Unique identifier of the order. Example value: `01J4MD3R7N4HH4G76PT47VG3QC`. You can get this value from the create order response. Provide either `order-id` or `client-request-id`, not both.","required":false,"schema":{"type":"string","isRequired":false,"description":"Unique identifier of the order. Example value: `01J4MD3R7N4HH4G76PT47VG3QC`. You can get this value from the create order response. Provide either `order-id` or `client-request-id`, not both.","uniqueKey":"","typeLabel":"string"}},"3ada9e3c-572f-44ea-95d7-2b76b018b4d8":{"name":"client-request-id","in":"query","description":"Client-generated UUID for correlation. Example value: `0835bf3e-4a20-41f0-908d-8213f2b7a285`. This is the same value as the `clientRequestId` field in the create order request. Provide either `order-id` or `client-request-id`, not both.","required":false,"schema":{"type":"string","isRequired":false,"description":"Client-generated UUID for correlation. Example value: `0835bf3e-4a20-41f0-908d-8213f2b7a285`. This is the same value as the `clientRequestId` field in the create order request. Provide either `order-id` or `client-request-id`, not both.","uniqueKey":"","typeLabel":"string"}}},"responses":{"f220d9d9-5e47-4f40-8fca-83bddf62ea17":{"description":"","headers":{"X-Api-Quota-Used":{"description":"The number of requests you have made in the current rate limit window","schema":{"type":"integer"}},"X-Api-Quota-Limit":{"description":"Your current rate limit (requests per minute)","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"object","properties":{"market":{"type":"string","description":"Market name. Example: 'ETH-USDT'.","isRequired":true,"uniqueKey":"order.market","typeLabel":"string"},"orderId":{"type":"string","description":"Unique identifier for the order.","isRequired":true,"uniqueKey":"order.orderId","typeLabel":"string"},"orderType":{"type":"string","description":"Order side.","enum":["buy","sell"],"isRequired":true,"uniqueKey":"order.orderType","typeLabel":"enum\u003cstring>"},"tradeType":{"type":"string","description":"Order type.","enum":["limit","market"],"isRequired":true,"uniqueKey":"order.tradeType","typeLabel":"enum\u003cstring>"},"price":{"type":"string","description":"Price used.","isRequired":true,"uniqueKey":"order.price","typeLabel":"string"},"quantity":{"type":"string","description":"Remaining quantity.","isRequired":true,"uniqueKey":"order.quantity","typeLabel":"string"},"filledQuantity":{"type":"string","description":"Filled quantity.","isRequired":true,"uniqueKey":"order.filledQuantity","typeLabel":"string"},"leverage":{"type":"string","description":"Leverage used at order creation.","isRequired":true,"uniqueKey":"order.leverage","typeLabel":"string"},"createdAt":{"type":"integer","format":"int64","description":"Order creation timestamp (milliseconds since epoch).","isRequired":true,"uniqueKey":"order.createdAt","typeLabel":"integer\u003cint64>"},"updatedAt":{"type":"integer","format":"int64","description":"Order last update timestamp (milliseconds since epoch).","isRequired":true,"uniqueKey":"order.updatedAt","typeLabel":"integer\u003cint64>"},"orderStatus":{"type":"string","description":"Order status.","enum":["active","pending","cancelling","cancelled","modifying","modified","rejected","filled"],"isRequired":true,"uniqueKey":"order.orderStatus","typeLabel":"enum\u003cstring>"},"reduceOnly":{"type":"boolean","description":"Reduce-only flag. When `true`, the order can only reduce an existing position.","isRequired":true,"uniqueKey":"order.reduceOnly","typeLabel":"boolean"},"postOnly":{"type":"boolean","description":"Maker-only creation flag.","isRequired":true,"uniqueKey":"order.postOnly","typeLabel":"boolean"},"clientRequestId":{"type":"string","description":"Client-generated UUID for correlation.","uniqueKey":"order.clientRequestId","typeLabel":"string"},"avgFillPrice":{"type":"string","description":"Average price across fills.","uniqueKey":"order.avgFillPrice","typeLabel":"string"}},"required":["market","orderId","orderType","tradeType","price","quantity","filledQuantity","leverage","createdAt","updatedAt","orderStatus","reduceOnly","postOnly"],"description":"Order object containing all details for the requested order.","isRequired":true,"uniqueKey":"order","typeLabel":"object"}},"required":["order"],"uniqueKey":"","typeLabel":"object"},"example":{"order":{"market":"ETH-USDT","orderId":"01HZ36SYBP4Z80GRX30P49XHB5","orderType":"sell","tradeType":"limit","price":"3772.272138","quantity":"1","filledQuantity":"0.5","leverage":"1","createdAt":1717020981622,"updatedAt":1717020982756,"orderStatus":"active","clientRequestId":"0835bf3e-4a20-41f0-908d-8213f2b7a285","reduceOnly":false,"postOnly":false,"avgFillPrice":"3772.272138"}},"examples":{"Example":{"title":"Example","value":{"order":{"market":"ETH-USDT","orderId":"01HZ36SYBP4Z80GRX30P49XHB5","orderType":"sell","tradeType":"limit","price":"3772.272138","quantity":"1","filledQuantity":"0.5","leverage":"1","createdAt":1717020981622,"updatedAt":1717020982756,"orderStatus":"active","clientRequestId":"0835bf3e-4a20-41f0-908d-8213f2b7a285","reduceOnly":false,"postOnly":false,"avgFillPrice":"3772.272138"}}}},"exampleType":"examples"}},"exampleType":"examples"},"e3e104bb-9a89-4458-8094-b7e091287403":{"description":"A required parameter is missing or a parameter value is invalid. The `message` field names the offending parameter.","headers":{"X-Api-Quota-Used":{"description":"The number of requests you have made in the current rate limit window","schema":{"type":"integer"}},"X-Api-Quota-Limit":{"description":"Your current rate limit (requests per minute)","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"An object containing error details.","properties":{"slug":{"type":"string","description":"A short string identifier for the error type.","isRequired":true,"uniqueKey":"error.slug","typeLabel":"string"},"code":{"type":"string","description":"A string code representing the error.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"}},"required":["slug","code"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"message":{"type":"string","description":"A human-readable message describing the error.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["error","message"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"slug":"BAD_REQUEST","code":"SYS-0006"},"message":"either client-request-id or order-id must be provided."},"examples":{"Example":{"title":"Example","value":{"error":{"slug":"BAD_REQUEST","code":"SYS-0006"},"message":"either client-request-id or order-id must be provided."}}},"exampleType":"examples"}},"exampleType":"examples"},"1b883d0b-e345-476d-8c44-c89c3f202c7c":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A human-readable message describing the error.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["message"],"uniqueKey":"","typeLabel":"object"},"example":{"message":"Unauthorized"},"examples":{"Example":{"title":"Example","value":{"message":"Unauthorized"}}},"exampleType":"examples"}},"exampleType":"examples"},"f13f60e2-d60c-4445-975d-d81d8ca80a0f":{"description":"","headers":{"X-Api-Quota-Used":{"description":"The number of requests you have made in the current rate limit window","schema":{"type":"integer"}},"X-Api-Quota-Limit":{"description":"Your current rate limit (requests per minute)","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"An object containing error details.","properties":{"slug":{"type":"string","description":"A short string identifier for the error type.","isRequired":true,"uniqueKey":"error.slug","typeLabel":"string"},"code":{"type":"string","description":"A string code representing the error.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"}},"required":["slug","code"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"message":{"type":"string","description":"A human-readable message describing the error.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["error","message"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"slug":"NOT_FOUND","code":"SYS-0007"},"message":"order not found"},"examples":{"Example":{"title":"Example","value":{"error":{"slug":"NOT_FOUND","code":"SYS-0007"},"message":"order not found"}}},"exampleType":"examples"}},"exampleType":"examples"},"339bfbb2-a9f6-4b23-a31d-3440996f51f2":{"description":"","headers":{"X-Api-Quota-Used":{"description":"The number of requests you have made in the current rate limit window","schema":{"type":"integer"}},"X-Api-Quota-Limit":{"description":"Your current rate limit (requests per minute)","schema":{"type":"integer"}},"Retry-After":{"description":"Number of seconds to wait before making another request (429 responses only)","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"An object containing error details.","properties":{"slug":{"type":"string","description":"A short string identifier for the error type.","isRequired":true,"uniqueKey":"error.slug","typeLabel":"string"},"code":{"type":"string","description":"A string code representing the error.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"}},"required":["slug","code"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"message":{"type":"string","description":"A human-readable message describing the error.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["error","message"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"slug":"TOO_MANY_REQUESTS","code":"SYS-0003"},"message":"api rate limit exceeded"},"examples":{"Example":{"title":"Example","value":{"error":{"slug":"TOO_MANY_REQUESTS","code":"SYS-0003"},"message":"api rate limit exceeded"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"b56853da-609f-4b08-a063-015fbb7dcda3":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"2f2521a1-17a0-4beb-b14d-8d73b0a87679":{"url":"https://order.sandbox.rails.xyz"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"latest/perps/openapi/order.json"},"subdomain":"railsxyz","siteName":"Rails Trading Developer API Documentation","title":"Get Order By ID - Rails Trading Developer API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-16T18:54:43.091Z","originalFileLocation":"latest/perps/rest-api/get-order-by-id.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=\"This endpoint retrieves a single open or recently closed order by order ID or client request ID.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Rails Trading Developer API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_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/railsxyz/uzRYRjCG6Wh2I4zS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Order By ID - Rails Trading Developer API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"This endpoint retrieves a single open or recently closed order by order ID or client request ID.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rails Trading Developer API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://railsxyz.mintlify.site/_mintlify/api/og/v2?division=Margin%2C+Leverage+%26+Orders\u0026amp;title=Get+Order+By+ID\u0026amp;description=This+endpoint+retrieves+a+single+open+or+recently+closed+order+by+order+ID+or+client+request+ID.\u0026amp;theme=328cc55faa8e33363fe01ff9\u0026amp;signature=1647574f7f2ad1d0d52bb6982488519179abd381dd5904296699b42400ca3d61\">\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=\"Get Order By ID - Rails Trading Developer API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"This endpoint retrieves a single open or recently closed order by order ID or client request ID.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://railsxyz.mintlify.site/_mintlify/api/og/v2?division=Margin%2C+Leverage+%26+Orders\u0026amp;title=Get+Order+By+ID\u0026amp;description=This+endpoint+retrieves+a+single+open+or+recently+closed+order+by+order+ID+or+client+request+ID.\u0026amp;theme=328cc55faa8e33363fe01ff9\u0026amp;signature=1647574f7f2ad1d0d52bb6982488519179abd381dd5904296699b42400ca3d61\">\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/railsxyz/uzRYRjCG6Wh2I4zS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rails Trading Developer API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/latest/perps/rest-api/get-order-by-id.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.rails.xyz/#organization\",\"name\":\"Rails Trading Developer API Documentation\",\"url\":\"https://docs.rails.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/railsxyz/XTasO28fw_2bd6Tp/logo/light.svg?fit=max\u0026auto=format\u0026n=XTasO28fw_2bd6Tp\u0026q=85\u0026s=562d1517f28bb695fb280b18dd4310a4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.rails.xyz#website\",\"name\":\"Rails Trading Developer API Documentation\",\"url\":\"https://docs.rails.xyz\",\"publisher\":{\"@id\":\"https://docs.rails.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id#webpage\",\"url\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id\",\"name\":\"Get Order By ID\",\"description\":\"This endpoint retrieves a single open or recently closed order by order ID or client request ID.\",\"dateModified\":\"2026-09-16T18:54:43.091Z\",\"isPartOf\":{\"@id\":\"https://docs.rails.xyz#website\"},\"breadcrumb\":{\"@id\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HTTP API Reference\",\"item\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-book\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Margin, Leverage \u0026 Orders\",\"item\":\"https://docs.rails.xyz/latest/perps/rest-api/update-margin-mode\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Get Order By ID\",\"item\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id#apireference\",\"headline\":\"Get Order By ID\",\"name\":\"Get Order By ID\",\"description\":\"This endpoint retrieves a single open or recently closed order by order ID or client request ID.\",\"url\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id\",\"mainEntityOfPage\":{\"@id\":\"https://docs.rails.xyz/latest/perps/rest-api/get-order-by-id#webpage\"},\"dateModified\":\"2026-09-16T18:54:43.091Z\",\"publisher\":{\"@id\":\"https://docs.rails.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.rails.xyz#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Rails Trading Developer API Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Rails Trading Developer API Documentation","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":""}]},{"tab":"Get Started","icon":"rocket","pages":[{"title":"Get Started","href":"/latest/introduction"}]},{"tab":"Perpetuals","icon":"chart-line","groups":[{"group":"Guides","pages":[{"title":"Overview","href":"/latest/perps/guides/overview"},{"title":"Market Data","href":"/latest/perps/guides/market-data"},{"title":"Order Book","href":"/latest/perps/guides/order-book"},{"title":"Order Creation","href":"/latest/perps/guides/order-creation"},{"title":"Order Modification","href":"/latest/perps/guides/order-modification"},{"title":"Order Cancellation","href":"/latest/perps/guides/order-cancellation"},{"title":"Open Orders","href":"/latest/perps/guides/open-orders"},{"title":"Account Information","href":"/latest/perps/guides/account-info"},{"title":"Recent Trades","href":"/latest/perps/guides/recent-trades"},{"title":"Risk Management","href":"/latest/perps/guides/risk-management"},{"title":"Rate Limits","href":"/latest/perps/guides/rate-limits"},{"title":"Error Codes","href":"/latest/perps/guides/error-codes"},{"title":"FAQs","href":"/latest/perps/guides/faqs"}]},{"group":"Formulas","pages":[{"title":"Mark Price","href":"/latest/perps/formulas/mark-price"},{"title":"Position Metrics, Margin \u0026 Liquidation Price","href":"/latest/perps/formulas/position-metrics"},{"title":"Account Equity \u0026 Balances","href":"/latest/perps/formulas/account-balance"},{"title":"Funding","href":"/latest/perps/formulas/funding"}]},{"group":"Go SDK","pages":[{"title":"Quickstart","href":"/latest/perps/go-sdk/quickstart"},{"title":"Orders","href":"/latest/perps/go-sdk/orders"},{"title":"Streams \u0026 Account","href":"/latest/perps/go-sdk/streams-and-account"}]},{"group":"WebSocket API Reference","pages":[{"title":"Overview","href":"/latest/perps/websocket-api/overview"},{"title":"Common Requests","asyncapi":"latest/perps/asyncapi/perps-ws.yaml commonRequests","href":"/latest/perps/websocket-api/common-requests"},{"title":"Order Creation Stream","asyncapi":"latest/perps/asyncapi/perps-ws.yaml orderCreationStream","href":"/latest/perps/websocket-api/order-creation-stream"},{"title":"Account Trades Stream","asyncapi":"latest/perps/asyncapi/perps-ws.yaml accountTradesStream","href":"/latest/perps/websocket-api/account-trades-stream"},{"title":"Public Trades Stream","asyncapi":"latest/perps/asyncapi/perps-ws.yaml publicTradesStream","href":"/latest/perps/websocket-api/public-trades-stream"},{"title":"Order Book Stream","asyncapi":"latest/perps/asyncapi/perps-ws.yaml publicOrderBookStream","href":"/latest/perps/websocket-api/order-book-stream"}]},{"group":"HTTP API Reference","pages":[{"group":"Market Data","pages":[{"title":"Get Order Book","openapi":"GET /api/v1/order-book","href":"/latest/perps/rest-api/get-order-book"},{"title":"Get Market Data","openapi":"GET /api/v1/market-data","href":"/latest/perps/rest-api/get-market-data"},{"title":"Get Supported Markets","openapi":"GET /api/v1/markets","href":"/latest/perps/rest-api/get-supported-markets"},{"title":"Get Product Specifications","openapi":"GET /api/v1/product-specifications","href":"/latest/perps/rest-api/get-product-specifications"},{"title":"Get Contract Specifications","openapi":"GET /api/v1/contract-specifications","href":"/latest/perps/rest-api/get-contract-specifications"}]},{"group":"Margin, Leverage \u0026 Orders","pages":[{"title":"Update Margin Mode","openapi":"POST /api/v1/update-margin-mode","href":"/latest/perps/rest-api/update-margin-mode"},{"title":"Update Leverage","description":"This endpoint updates the leverage for a given market.","openapi":"POST /api/v1/update-leverage","href":"/latest/perps/rest-api/update-leverage"},{"title":"Get Order By ID","openapi":"GET /api/v1/order","href":"/latest/perps/rest-api/get-order-by-id"},{"title":"Get Open Orders","description":"This endpoint retrieves the open orders of your account, optionally filtered by market.","openapi":"GET /api/v1/open-orders","href":"/latest/perps/rest-api/get-open-orders"},{"title":"Get Completed Orders","openapi":"GET /api/v1/completed-orders","href":"/latest/perps/rest-api/get-completed-orders"},{"title":"Cancel Orders","openapi":"DELETE /api/v1/orders","href":"/latest/perps/rest-api/cancel-orders"}]},{"group":"User Account","pages":[{"title":"Get Account Balances","openapi":"GET /api/v1/balances","href":"/latest/perps/rest-api/get-account-balances"},{"title":"Get Account Positions","openapi":"GET /api/v1/positions","href":"/latest/perps/rest-api/get-account-positions"},{"title":"Get Account Fundings","openapi":"GET /api/v1/fundings","href":"/latest/perps/rest-api/get-account-fundings"},{"title":"Get Account Deposits","openapi":"GET /api/v1/deposits","href":"/latest/perps/rest-api/get-account-deposits"},{"title":"Get Account Withdrawals","openapi":"GET /api/v1/withdrawals","href":"/latest/perps/rest-api/get-account-withdrawals"}]}]}]},{"tab":"Options","icon":"layer-group","pages":[{"title":"Options","href":"/latest/options/guides/overview"}]}]},"basePath":"","title":"Get Order By ID - Rails Trading Developer API Documentation","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}