[{"data":1,"prerenderedAt":668},["ShallowReactive",2],{"\u002Fdocs\u002Fapi\u002Fconventions":3,"docs-api-navigation":576,"\u002Fdocs\u002Fapi\u002Fconventions-surround":663},{"id":4,"title":5,"body":6,"description":567,"extension":568,"meta":569,"navigation":570,"path":572,"seo":573,"stem":574,"__hash__":575},"docs\u002F1.docs\u002F2.api\u002F3.conventions.md","Conventions",{"type":7,"value":8,"toc":556},"minimark",[9,13,18,102,119,124,127,152,161,165,175,211,214,218,225,241,247,254,258,261,288,299,303,306,436,477,481,488,510,525,529,540,543,552],[10,11,12],"p",{},"These rules hold across every endpoint, without exception. They are worth two minutes now\nbecause they are the things that quietly corrupt a report six months later.",[14,15,17],"h2",{"id":16},"numbers","Numbers",[19,20,21,43,61,71,88],"field-group",{},[22,23,26],"field",{"name":24,"type":25},"Percentages","number",[10,27,28,29,33,34,38,39,42],{},"Expressed ",[30,31,32],"strong",{},"in percent",", never as a fraction. ",[35,36,37],"code",{},"5.96"," means 5.96%, not 596% and not 0.0596.\nAny field whose name ends in ",[35,40,41],{},"_percent"," follows this rule.",[22,44,46],{"name":45,"type":25},"Drawdown",[10,47,48,49,52,53,56,57,60],{},"Always ",[30,50,51],{},"positive",". A 15% drawdown is ",[35,54,55],{},"15",", not ",[35,58,59],{},"-15",". It is a magnitude, and the field\nname already says which direction it goes.",[22,62,64],{"name":63,"type":25},"Money",[10,65,66,67,70],{},"A JSON number, never a string. The account's ",[35,68,69],{},"currency"," is a separate field — never assume\nUSD, and never infer it from the broker.",[22,72,74],{"name":73,"type":25},"Costs",[10,75,76,79,80,83,84,87],{},[35,77,78],{},"commission"," and ",[35,81,82],{},"swap"," keep their natural sign: a cost is ",[30,85,86],{},"negative",", a credit is\npositive. A swap you were paid is a positive number.",[22,89,92],{"name":90,"type":91},"Missing values","null",[10,93,94,95,97,98,101],{},"Always an explicit ",[35,96,91],{},", never an omitted key and never ",[35,99,100],{},"0",". You should never have to\nguess whether the value is zero or unknown.",[103,104,105],"caution",{},[10,106,107,112,113,115,116,118],{},[30,108,109,111],{},[35,110,100],{}," is a real value, so we never use it to mean \"not set\"."," A stop loss of ",[35,114,100],{}," would be a\nprice. When there is no stop loss, the field is ",[35,117,91],{},".",[120,121,123],"h3",{"id":122},"which-number-is-the-return","Which number is \"the return\"?",[10,125,126],{},"There are two, they answer different questions, and both are returned:",[19,128,129,139],{},[22,130,132],{"name":131,"type":25},"twr_percent",[10,133,134,135,138],{},"Time-weighted return. Neutralises deposits and withdrawals, so it measures ",[30,136,137],{},"the strategy",".\nThis is the number shown on the public page and the one to use when comparing accounts.",[22,140,142],{"name":141,"type":25},"absolute_gain_percent",[10,143,144,145,148,149,151],{},"Plain return on the money that went in. Measures ",[30,146,147],{},"the account",". Deposit halfway through a\ngood month and this number moves; ",[35,150,131],{}," does not.",[10,153,154,155,79,157,160],{},"On the example account below they read ",[35,156,37],{},[35,158,159],{},"5.89",". When they disagree sharply, the\naccount has had deposits or withdrawals — that is the whole difference between them.",[14,162,164],{"id":163},"dates-and-times","Dates and times",[10,166,48,167,170,171,174],{},[30,168,169],{},"ISO 8601 in UTC",", with a trailing ",[35,172,173],{},"Z",":",[176,177,182],"pre",{"className":178,"code":179,"language":180,"meta":181,"style":181},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\"opened_at\": \"2026-08-10T23:00:00Z\"\n","json","",[35,183,184],{"__ignoreMap":181},[185,186,189,193,197,199,203,205,208],"span",{"class":187,"line":188},"line",1,[185,190,192],{"class":191},"sMK4o","\"",[185,194,196],{"class":195},"sfazB","opened_at",[185,198,192],{"class":191},[185,200,202],{"class":201},"sTEyZ",": ",[185,204,192],{"class":191},[185,206,207],{"class":195},"2026-08-10T23:00:00Z",[185,209,210],{"class":191},"\"\n",[10,212,213],{},"Never a local time, never a broker's server time, never a Unix timestamp. Broker server time\nis a common source of off-by-a-few-hours bugs; converting to your own timezone is your call,\nand you have an unambiguous instant to do it from.",[14,215,217],{"id":216},"identifiers","Identifiers",[10,219,220,221,224],{},"Objects are addressed by their ",[30,222,223],{},"slug"," — the same one in the public URL:",[176,226,230],{"className":227,"code":228,"language":229,"meta":181,"style":181},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","GET \u002Fapi\u002Fv1\u002Faccounts\u002Fdark-algo\n","bash",[35,231,232],{"__ignoreMap":181},[185,233,234,238],{"class":187,"line":188},[185,235,237],{"class":236},"sBMFI","GET",[185,239,240],{"class":195}," \u002Fapi\u002Fv1\u002Faccounts\u002Fdark-algo\n",[242,243,244],"note",{},[10,245,246],{},"Slugs can be changed by their owner. When that happens the old slug keeps working through a\nredirect, so existing integrations do not break. If you store a reference long-term, store\nthe slug and be ready to follow a redirect.",[10,248,249,250,253],{},"The internal composite id (",[35,251,252],{},"mt4-26613005-…",") is deliberately not part of this API. It encodes\nthe broker account number and the owner's user id, and we are not making that a permanent\npart of a public contract.",[14,255,257],{"id":256},"accounts-and-portfolios","Accounts and portfolios",[10,259,260],{},"A portfolio behaves exactly like an account: same endpoints, same shape, same statistics.\nThey are distinguished by one field:",[176,262,264],{"className":178,"code":263,"language":180,"meta":181,"style":181},"\"type\": \"account\"    \u002F\u002F or \"portfolio\"\n",[35,265,266],{"__ignoreMap":181},[185,267,268,270,273,275,277,279,282,284],{"class":187,"line":188},[185,269,192],{"class":191},[185,271,272],{"class":195},"type",[185,274,192],{"class":191},[185,276,202],{"class":201},[185,278,192],{"class":191},[185,280,281],{"class":195},"account",[185,283,192],{"class":191},[185,285,287],{"class":286},"sHwdD","    \u002F\u002F or \"portfolio\"\n",[10,289,290,291,294,295,298],{},"Filter a listing with ",[35,292,293],{},"?type=account"," or ",[35,296,297],{},"?type=portfolio"," when you only want one kind.",[14,300,302],{"id":301},"lists-and-pagination","Lists and pagination",[10,304,305],{},"Every endpoint that returns a list uses the same envelope:",[176,307,310],{"className":178,"code":308,"filename":309,"language":180,"meta":181,"style":181},"{\n  \"data\": [ \u002F* … *\u002F ],\n  \"pagination\": {\n    \"page\": 1,\n    \"limit\": 50,\n    \"total\": 16,\n    \"has_more\": false\n  }\n}\n","Response",[35,311,312,317,340,355,375,392,409,424,430],{"__ignoreMap":181},[185,313,314],{"class":187,"line":188},[185,315,316],{"class":191},"{\n",[185,318,320,323,327,329,331,334,337],{"class":187,"line":319},2,[185,321,322],{"class":191},"  \"",[185,324,326],{"class":325},"spNyl","data",[185,328,192],{"class":191},[185,330,174],{"class":191},[185,332,333],{"class":191}," [",[185,335,336],{"class":286}," \u002F* … *\u002F",[185,338,339],{"class":191}," ],\n",[185,341,343,345,348,350,352],{"class":187,"line":342},3,[185,344,322],{"class":191},[185,346,347],{"class":325},"pagination",[185,349,192],{"class":191},[185,351,174],{"class":191},[185,353,354],{"class":191}," {\n",[185,356,358,361,364,366,368,372],{"class":187,"line":357},4,[185,359,360],{"class":191},"    \"",[185,362,363],{"class":236},"page",[185,365,192],{"class":191},[185,367,174],{"class":191},[185,369,371],{"class":370},"sbssI"," 1",[185,373,374],{"class":191},",\n",[185,376,378,380,383,385,387,390],{"class":187,"line":377},5,[185,379,360],{"class":191},[185,381,382],{"class":236},"limit",[185,384,192],{"class":191},[185,386,174],{"class":191},[185,388,389],{"class":370}," 50",[185,391,374],{"class":191},[185,393,395,397,400,402,404,407],{"class":187,"line":394},6,[185,396,360],{"class":191},[185,398,399],{"class":236},"total",[185,401,192],{"class":191},[185,403,174],{"class":191},[185,405,406],{"class":370}," 16",[185,408,374],{"class":191},[185,410,412,414,417,419,421],{"class":187,"line":411},7,[185,413,360],{"class":191},[185,415,416],{"class":236},"has_more",[185,418,192],{"class":191},[185,420,174],{"class":191},[185,422,423],{"class":191}," false\n",[185,425,427],{"class":187,"line":426},8,[185,428,429],{"class":191},"  }\n",[185,431,433],{"class":187,"line":432},9,[185,434,435],{"class":191},"}\n",[19,437,438,447,459,464],{},[22,439,441],{"name":363,"type":440},"integer",[10,442,443,444,118],{},"1-based. Defaults to ",[35,445,446],{},"1",[22,448,449],{"name":382,"type":440},[10,450,451,452,455,456,118],{},"Items per page. Defaults to ",[35,453,454],{},"50",", maximum ",[35,457,458],{},"200",[22,460,461],{"name":399,"type":440},[10,462,463],{},"Total items matching the request, across all pages.",[22,465,467],{"name":416,"type":466},"boolean",[10,468,469,470,473,474,476],{},"Whether another page exists. ",[30,471,472],{},"Loop on this",", not on arithmetic over ",[35,475,399],{}," — it stays\ncorrect if items are added while you are paging.",[14,478,480],{"id":479},"rate-limits","Rate limits",[10,482,483,484,487],{},"Limits are counted ",[30,485,486],{},"per key",", not per IP, so a colleague on the same office network cannot\neat your quota. Every response carries your current standing:",[176,489,493],{"className":490,"code":491,"language":492,"meta":181,"style":181},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","X-RateLimit-Limit: 120\nX-RateLimit-Remaining: 118\nX-RateLimit-Reset: 1755864000\n","http",[35,494,495,500,505],{"__ignoreMap":181},[185,496,497],{"class":187,"line":188},[185,498,499],{},"X-RateLimit-Limit: 120\n",[185,501,502],{"class":187,"line":319},[185,503,504],{},"X-RateLimit-Remaining: 118\n",[185,506,507],{"class":187,"line":342},[185,508,509],{},"X-RateLimit-Reset: 1755864000\n",[10,511,512,513,520,521,524],{},"Over the limit you get a ",[514,515,517],"a",{"href":516},"\u002Fdocs\u002Fapi\u002Ferrors",[35,518,519],{},"429"," with a ",[35,522,523],{},"Retry-After"," header in seconds.\nBack off on that header rather than a fixed sleep.",[14,526,528],{"id":527},"versioning","Versioning",[10,530,531,532,535,536,539],{},"The version is in the path (",[35,533,534],{},"\u002Fapi\u002Fv1\u002F","). Within a version we will ",[30,537,538],{},"add"," fields but never\nremove or repurpose one, and never change the meaning or the unit of an existing field.",[10,541,542],{},"Treat unknown fields as harmless: a parser that rejects them will break the first time we add\nsomething.",[544,545,546],"warning",{},[10,547,548,549,551],{},"The rest of the site's endpoints — anything not under ",[35,550,534],{}," — are internal. They power\nthe website, they change shape whenever the interface changes, and they carry no guarantee\nwhatsoever. They are reachable, but building on them is building on sand.",[553,554,555],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":181,"searchDepth":319,"depth":319,"links":557},[558,561,562,563,564,565,566],{"id":16,"depth":319,"text":17,"children":559},[560],{"id":122,"depth":342,"text":123},{"id":163,"depth":319,"text":164},{"id":216,"depth":319,"text":217},{"id":256,"depth":319,"text":257},{"id":301,"depth":319,"text":302},{"id":479,"depth":319,"text":480},{"id":527,"depth":319,"text":528},"Units, signs, dates, identifiers and pagination — what every number in a response actually means.","md",{},{"icon":571},"i-lucide-ruler","\u002Fdocs\u002Fapi\u002Fconventions",{"title":5,"description":567},"1.docs\u002F2.api\u002F3.conventions","YCiTq7BHa530SMJvuCOtstBOIl4FNrqqRJ1OwroMQyQ",[577],{"title":578,"path":579,"stem":580,"children":581,"page":600},"Docs","\u002Fdocs","1.docs",[582,601,639],{"title":583,"path":584,"stem":585,"children":586,"icon":600},"Getting Started","\u002Fdocs\u002Fgetting-started","1.docs\u002F1.getting-started\u002F1.index",[587,590,595],{"title":588,"path":584,"stem":585,"icon":589},"Introduction","i-lucide-house",{"title":591,"path":592,"stem":593,"icon":594},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","1.docs\u002F1.getting-started\u002F2.installation","i-lucide-download",{"title":596,"path":597,"stem":598,"icon":599},"Usage","\u002Fdocs\u002Fgetting-started\u002Fusage","1.docs\u002F1.getting-started\u002F3.usage","i-lucide-sliders",false,{"title":602,"path":603,"stem":604,"children":605,"icon":638},"API Reference","\u002Fdocs\u002Fapi","1.docs\u002F2.api\u002F1.index",[606,608,613,614,619,624,629,634],{"title":588,"path":603,"stem":604,"icon":607},"i-lucide-book-open",{"title":609,"path":610,"stem":611,"icon":612},"Authentication","\u002Fdocs\u002Fapi\u002Fauthentication","1.docs\u002F2.api\u002F2.authentication","i-lucide-key",{"title":5,"path":572,"stem":574,"icon":571},{"title":615,"path":616,"stem":617,"icon":618},"Accounts","\u002Fdocs\u002Fapi\u002Faccounts","1.docs\u002F2.api\u002F4.accounts","i-lucide-wallet",{"title":620,"path":621,"stem":622,"icon":623},"Trades & positions","\u002Fdocs\u002Fapi\u002Ftrades","1.docs\u002F2.api\u002F5.trades","i-lucide-arrow-left-right",{"title":625,"path":626,"stem":627,"icon":628},"Search","\u002Fdocs\u002Fapi\u002Fsearch","1.docs\u002F2.api\u002F6.search","i-lucide-search",{"title":630,"path":631,"stem":632,"icon":633},"MCP server","\u002Fdocs\u002Fapi\u002Fmcp","1.docs\u002F2.api\u002F7.mcp","i-lucide-sparkles",{"title":635,"path":516,"stem":636,"icon":637},"Errors","1.docs\u002F2.api\u002F8.errors","i-lucide-triangle-alert","i-lucide-code-xml",{"title":640,"path":641,"stem":642,"children":643,"page":600},"Essentials","\u002Fdocs\u002Fessentials","1.docs\u002F2.essentials",[644,649,653,658],{"title":645,"path":646,"stem":647,"icon":648},"Markdown Syntax","\u002Fdocs\u002Fessentials\u002Fmarkdown-syntax","1.docs\u002F2.essentials\u002F1.markdown-syntax","i-lucide-heading-1",{"title":650,"path":651,"stem":652,"icon":638},"Code Blocks","\u002Fdocs\u002Fessentials\u002Fcode-blocks","1.docs\u002F2.essentials\u002F2.code-blocks",{"title":654,"path":655,"stem":656,"icon":657},"Prose Components","\u002Fdocs\u002Fessentials\u002Fprose-components","1.docs\u002F2.essentials\u002F3.prose-components","i-lucide-component",{"title":659,"path":660,"stem":661,"icon":662},"Images and Embeds","\u002Fdocs\u002Fessentials\u002Fimages-embeds","1.docs\u002F2.essentials\u002F4.images-embeds","i-lucide-image",[664,666],{"title":609,"path":610,"stem":611,"description":665,"icon":612,"children":-1},"Create a Developer API Key and send it as a Bearer token on every request.",{"title":615,"path":616,"stem":617,"description":667,"icon":618,"children":-1},"List your accounts, retrieve one, and expand it with equity curve, monthly returns and per-symbol breakdowns.",1788228306687]