{"openapi":"3.0.0","info":{"title":"up-gateway v1","version":"2.0.0","contact":{}},"servers":[],"security":[{"bearerAuth":[]}],"paths":{"/v2/user":{"get":{"tags":["Accounts (v2)"],"summary":"","description":"","operationId":"user-deprecated","deprecated":true,"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"isGSLOAllowed":{"type":"boolean"}},"required":["id","server","fund"]}}},"required":["id","accounts"]}}}}}}},"/v3/user":{"get":{"tags":["Accounts (v3)"],"description":"","operationId":"user-v3","parameters":[{"name":"experimentalAccounts","in":"query","description":"Whether or not experimental accounts should be included. Currently these are \"oj\" and \"oj-demo\" accounts.","schema":{"type":"boolean"},"required":false}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"},"divisionName":{"type":"string","enum":["OC","CANADA","OAP","OEL","TEST","ECP","OAP_CFD","OCI","OJ_NON_CORPORATE","OJ_CORPORATE","OAU","OEM","OGM","OT","OTMS","OPUC"]},"accounts":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]},{"type":"object","properties":{"maintenanceWindows":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"]}}},"required":["maintenanceWindows"]}]}}},"required":["id","accounts"]}}}}}}},"/v2/user/extended":{"get":{"tags":["Accounts (v2)"],"summary":"","description":"","deprecated":true,"operationId":"user-extended-deprecated","responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"},"divisionName":{"type":"string","enum":["OC","CANADA","OAP","OEL","TEST","ECP","OAP_CFD","OCI","OJ_NON_CORPORATE","OJ_CORPORATE","OAU","OEM","OGM","OT","OTMS","OPUC"]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]}}},"required":["id","accounts"]}}}}}}},"/v2/user/{oneId}":{"get":{"tags":["Accounts (v2)"],"description":"","parameters":[{"name":"oneId","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false}],"operationId":"user","deprecated":true,"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"isGSLOAllowed":{"type":"boolean"}},"required":["id","server","fund"]}}},"required":["id","accounts"]}}}}}}},"/v3/user/{oneId}":{"get":{"tags":["Accounts (v3)"],"description":"","parameters":[{"name":"oneId","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false},{"name":"experimentalAccounts","in":"query","description":"Whether or not experimental accounts should be included. Currently these are \"oj\" and \"oj-demo\" accounts.","schema":{"type":"boolean"},"required":false}],"operationId":"user-v3-deprecated","deprecated":true,"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"},"divisionName":{"type":"string","enum":["OC","CANADA","OAP","OEL","TEST","ECP","OAP_CFD","OCI","OJ_NON_CORPORATE","OJ_CORPORATE","OAU","OEM","OGM","OT","OTMS","OPUC"]},"accounts":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]},{"type":"object","properties":{"maintenanceWindows":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"]}}},"required":["maintenanceWindows"]}]}}},"required":["id","accounts"]}}}}}}},"/v4/user":{"get":{"tags":["Accounts (v4)"],"description":"","operationId":"user-v4","responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"oneId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"divisions":{"type":"array","items":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"}},"accounts":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]},{"type":"object","properties":{"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"}},"required":["division"]}]}}},"required":["divisions","oneId","accounts"]}},"required":["data"]}}}}}}},"/v4/user/accounts/{server}/{accountId}":{"get":{"tags":["Accounts (v4)"],"summary":"Get account details","description":"Returns details for the specified account","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"get-account-details-v4","responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"balance":{"type":"number"},"bonus":{"type":"number"},"netAccountValue":{"type":"number"},"netAssetsValue":{"type":"number"},"realisedPL":{"type":"number"},"unrealisedPL":{"type":"number"},"disabled":{"type":"boolean"},"margin":{"type":"object","properties":{"marginUsed":{"type":"number"},"marginLevel":{"type":"number"},"marginAvailable":{"type":"number"},"marginCall":{"type":"string","enum":["NONE","WARNING","CLOSEOUT"]},"marginCloseoutPercent":{"type":"number"},"marginRate":{"type":"number"}}},"spot":{"type":"object","properties":{"freeEquity":{"type":"number"},"reservedAmount":{"type":"number"}}}},"required":["id","balance","netAccountValue","netAssetsValue","unrealisedPL","margin"]}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/user/{oneId}/extended":{"get":{"tags":["Accounts (v2)"],"summary":"","description":"","parameters":[{"name":"oneId","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false}],"operationId":"user-extended","deprecated":true,"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"},"divisionName":{"type":"string","enum":["OC","CANADA","OAP","OEL","TEST","ECP","OAP_CFD","OCI","OJ_NON_CORPORATE","OJ_CORPORATE","OAU","OEM","OGM","OT","OTMS","OPUC"]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]}}},"required":["id","accounts"]}}}}}}},"/v2/user/accounts/{server}/{accountId}/update/stream":{"get":{"tags":["Accounts (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"user-update-stream","responses":{"200":{"description":"Stream response","content":{"text/event-stream":{"schema":{"type":"object","properties":{"id":{"type":"string"},"balance":{"type":"number"},"bonus":{"type":"number"},"netAccountValue":{"type":"number"},"netAssetsValue":{"type":"number"},"realisedPL":{"type":"number"},"unrealisedPL":{"type":"number"},"disabled":{"type":"boolean"},"margin":{"type":"object","properties":{"marginUsed":{"type":"number"},"marginLevel":{"type":"number"},"marginAvailable":{"type":"number"},"marginCall":{"type":"string","enum":["NONE","WARNING","CLOSEOUT"]},"marginCloseoutPercent":{"type":"number"},"marginRate":{"type":"number"}}},"spot":{"type":"object","properties":{"freeEquity":{"type":"number"},"reservedAmount":{"type":"number"}}}},"required":["id","balance","netAccountValue","netAssetsValue","unrealisedPL","margin"]}}}}}}},"/v4/user/accounts/{server}/{accountId}/stream":{"get":{"tags":["Accounts (v4)"],"summary":"Get account update stream v4","description":"Returns a stream of account updates for the specified account id","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"user-update-stream-v4","responses":{"200":{"description":"Stream response","content":{"text/event-stream":{"schema":{"type":"object","properties":{"id":{"type":"string"},"balance":{"type":"number"},"bonus":{"type":"number"},"netAccountValue":{"type":"number"},"netAssetsValue":{"type":"number"},"realisedPL":{"type":"number"},"unrealisedPL":{"type":"number"},"disabled":{"type":"boolean"},"margin":{"type":"object","properties":{"marginUsed":{"type":"number"},"marginLevel":{"type":"number"},"marginAvailable":{"type":"number"},"marginCall":{"type":"string","enum":["NONE","WARNING","CLOSEOUT"]},"marginCloseoutPercent":{"type":"number"},"marginRate":{"type":"number"}}},"spot":{"type":"object","properties":{"freeEquity":{"type":"number"},"reservedAmount":{"type":"number"}}}},"required":["id","balance","netAccountValue","netAssetsValue","unrealisedPL","margin"]}}}}}}},"/v2/user/accounts/{server}/{accountId}/favorites":{"post":{"tags":["Favorites (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"}},"required":["instrument"]}}}},"operationId":"save-favorites","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"instruments":{"type":"array","items":{"type":"string"}}},"required":["instruments"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"get":{"tags":["Favorites (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"get-favorites","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"instruments":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/favourites":{"put":{"tags":["Favorites (v4)"],"summary":"Update the list of favorite instruments","description":"Replaces the entire list of favorite instruments with the provided list.","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"operationId":"update-favorites-v4","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"get":{"tags":["Favorites (v4)"],"summary":"Get the list of favorite instruments","description":"Retrieves the list of favorite instruments for the user","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"get-favorites-v4","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/favorites/{instrument}":{"delete":{"tags":["Favorites (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false}],"operationId":"delete-favorites","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"instruments":{"type":"array","items":{"type":"string"}}},"required":["instruments"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/lists":{"get":{"tags":["Instruments lists (v4)"],"summary":"Get available instrument asset classes lists","description":"Returns instrument lists.","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"get-instrument-lists-v4","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/lists/{id}":{"get":{"tags":["Instruments lists (v4)"],"summary":"Get detailed contents of a specific instrument list","description":"Returns the detailed contents of an instrument list identified by its ID, including all instruments belonging to that list.","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Instrument list identifier","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"operationId":"get-instrument-list-detail-v4","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["id","instruments"]}},"required":["data"]}}}},"404":{"description":"Not Found - List with specified ID does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/sentiments/{id}":{"get":{"tags":["Instruments lists (v4)"],"summary":"Get sentiment data for a topical instrument list","description":"Returns per-instrument sentiment data for a topical instrument list. Supported list IDs are POPULAR, HOT, VOLATILE, BULLISH, BEARISH (all servers) and MOST_ACTIVE, HOTTEST_MARKETS (otms server only). TOP_MOVERS and unrecognised list IDs return 404.","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Instrument list identifier","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"operationId":"get-instrument-list-sentiments-v4","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sentiment":{"type":"number","nullable":true,"description":"Ratio of traders long on this instrument (0–1), or null if sentiment data is unavailable"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","sentiment"]}}},"required":["id","instruments"]}},"required":["data"]}}}},"400":{"description":"Bad Request - Unsupported division","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404":{"description":"Not Found - List ID is not a recognised topical instrument list","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/base/{instrumentId}":{"get":{"tags":["Instruments (v4)"],"summary":"Get a single base instrument by ID","description":"Returns base instrument details for a single instrument.","operationId":"get-instrument-base-by-id-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrumentId","in":"path","description":"Instrument identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"}}}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/stream":{"get":{"tags":["Instruments (v4)"],"summary":"Stream updates for instruments","description":"Streams real-time updates for instruments. On connection, sends both MARKET_OPEN and MARKET_CLOSE messages with all instruments. \nAfter that, only sends updates for instruments that changed state. Ping messages are sent every 5 seconds to keep the connection alive.\n","security":[{"bearerAuth":[]}],"operationId":"user-instruments-stream-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stream response","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","required":["event","data"],"properties":{"event":{"type":"string","enum":["Ping"]},"data":{"type":"object","additionalProperties":false,"example":{}}},"additionalProperties":false},{"type":"object","required":["event","data"],"properties":{"event":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"]},"data":{"type":"array","items":{"type":"string"},"description":"Array of instrument identifiers","example":["EUR_USD","GBP_USD","USD_JPY"]}},"additionalProperties":false}],"discriminator":{"propertyName":"event","mapping":{"Ping":"#/components/schemas/PingEvent","MARKET_OPEN":"#/components/schemas/MarketHoursUpdateEvent","MARKET_CLOSE":"#/components/schemas/MarketHoursUpdateEvent"}}},"examples":{"ping":{"summary":"Ping message","value":{"event":"Ping","data":{}}},"marketOpen":{"summary":"Market open message","value":{"event":"MARKET_OPEN","data":["EUR_USD","GBP_USD","USD_JPY"]}},"marketClose":{"summary":"Market close message","value":{"event":"MARKET_CLOSE","data":["EUR_USD","GBP_USD"]}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/instruments/{instrumentId}/candles":{"get":{"tags":["Candles (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrumentId","in":"path","required":true,"schema":{"type":"string"},"description":"Requested Instrument ID","example":"EURUSD"},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d+$"},"description":"UTC timestamp in miliseconds"},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{13}$"},"description":"UTC timestamp in miliseconds"},{"name":"granularity","in":"query","required":true,"schema":{"type":"string","enum":["M1","M5","M15","H1","H4","D1"]}}],"operationId":"user-candles","responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"open":{"type":"number"},"close":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"time":{"type":"number"},"complete":{"type":"boolean"},"volume":{"type":"number"}},"required":["open","close","low","high","time","complete","volume"]}}}}}}}},"/v4/user/accounts/{server}/{accountId}/candles/{instrumentId}":{"get":{"tags":["Candles (v4)"],"summary":"Get historical candle data for a specific instrument","description":"Retrieves historical candle data for a specific instrument.","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrumentId","in":"path","required":true,"schema":{"type":"string"},"description":"Requested Instrument ID","example":"EURUSD"},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+$"},"description":"UTC timestamp in milliseconds. Required if countBack is not provided."},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{13}$"},"description":"UTC timestamp in miliseconds"},{"name":"granularity","in":"query","required":true,"schema":{"type":"string","enum":["M1","M5","M15","H1","H4","D1"]}},{"name":"countBack","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000},"description":"Number of candles to return ending at the 'to' timestamp. Takes precedence over 'from' when both are provided. Only supported for v20/v20-demo servers."}],"security":[{"bearerAuth":[]}],"operationId":"user-candles-v4","responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"open":{"type":"number"},"close":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"time":{"type":"number"},"complete":{"type":"boolean"},"volume":{"type":"number"}},"required":["open","close","low","high","time","complete","volume"]}}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/charts":{"post":{"tags":["Chart profiles (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"content":{"type":"string"}},"required":["name","symbol","resolution","content"]}}}},"operationId":"save-chart","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"get":{"tags":["Chart profiles (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"get-charts","responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","name","symbol","resolution"]}}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/charts/{id}":{"delete":{"tags":["Chart profiles (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false}],"operationId":"delete-chart","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"get":{"tags":["Chart profiles (v2)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false}],"operationId":"get-chart-content","responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"content":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","name","symbol","resolution"]}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/charts":{"post":{"tags":["Chart profiles (v4)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"content":{"type":"string"}},"required":["name","symbol","resolution","content"]}}}},"operationId":"save-chart-v4","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"get":{"tags":["Chart profiles (v4)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"get-charts-v4","responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","name","symbol","resolution"]}}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/charts/{id}":{"delete":{"tags":["Chart profiles (v4)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false}],"operationId":"delete-chart-v4","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"get":{"tags":["Chart profiles (v4)"],"summary":"","description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false}],"operationId":"get-chart-content-v4","responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"content":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","name","symbol","resolution"]}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/prices/stream":{"get":{"summary":"","tags":["Pricing (v2)"],"description":"","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"includeDepth","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeHomeConversions","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeDailyChanges","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"instruments","in":"query","required":true,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":200}},{"name":"includeLastPrice","in":"query","required":false,"schema":{"type":"boolean"}}],"operationId":"user-prices-stream","responses":{"200":{"description":"Stream response","content":{"text/event-stream":{"schema":{"type":"array","items":{"type":"object","properties":{"instrument":{"type":"string"},"bids":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"homeConversion":{"type":"object","properties":{"offer":{"type":"number","format":"float","deprecated":true},"bid":{"type":"number","format":"float","deprecated":true},"bidGain":{"type":"number","format":"float"},"bidLoss":{"type":"number","format":"float"},"offerGain":{"type":"number","format":"float"},"offerLoss":{"type":"number","format":"float"}},"required":["offer","bid"],"additionalProperties":false},"dailyChanges":{"type":"object","properties":{"highPrice":{"type":"number","format":"float"},"lowPrice":{"type":"number","format":"float"},"change":{"type":"object","properties":{"pips":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"},"movement":{"type":"string","enum":["UP","DOWN","NONE"]}},"required":["pips","percentage","movement"],"additionalProperties":false}},"required":["highPrice","lowPrice","change"],"additionalProperties":false},"timestamp":{"type":"integer"},"chartPrice":{"type":"number","format":"float"}},"required":["instrument","bids","offers","timestamp","chartPrice"],"additionalProperties":false}}}}}}}},"/v2/user/accounts/{server}/{accountId}/prices":{"get":{"summary":"","description":"","tags":["Pricing (v2)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"includeDepth","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeHomeConversions","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeDailyChanges","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"instruments","in":"query","required":true,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":200}}],"operationId":"user-prices","responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"instrument":{"type":"string"},"bids":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"homeConversion":{"type":"object","properties":{"offer":{"type":"number","format":"float","deprecated":true},"bid":{"type":"number","format":"float","deprecated":true},"bidGain":{"type":"number","format":"float"},"bidLoss":{"type":"number","format":"float"},"offerGain":{"type":"number","format":"float"},"offerLoss":{"type":"number","format":"float"}},"required":["offer","bid"],"additionalProperties":false},"dailyChanges":{"type":"object","properties":{"highPrice":{"type":"number","format":"float"},"lowPrice":{"type":"number","format":"float"},"change":{"type":"object","properties":{"pips":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"},"movement":{"type":"string","enum":["UP","DOWN","NONE"]}},"required":["pips","percentage","movement"],"additionalProperties":false}},"required":["highPrice","lowPrice","change"],"additionalProperties":false},"timestamp":{"type":"integer"},"chartPrice":{"type":"number","format":"float"}},"required":["instrument","bids","offers","timestamp","chartPrice"],"additionalProperties":false}}}}}}}},"/v4/user/accounts/{server}/{accountId}/prices/stream":{"get":{"summary":"","description":"","tags":["Pricing (v4)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instruments","in":"query","required":true,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":200}},{"name":"includeHomeConversions","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"includeDailyChanges","in":"query","required":false,"schema":{"type":"boolean"}}],"operationId":"user-prices-stream-v4","responses":{"200":{"description":"Stream response","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"instrument":{"type":"string"},"bids":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"dailyChanges":{"type":"object","properties":{"highPrice":{"type":"number","format":"float"},"lowPrice":{"type":"number","format":"float"},"change":{"type":"object","properties":{"pips":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"},"movement":{"type":"string","enum":["UP","DOWN","NONE"]}},"required":["pips","percentage","movement"],"additionalProperties":false}},"required":["highPrice","lowPrice","change"],"additionalProperties":false},"timestamp":{"type":"integer"},"chartPrice":{"type":"number","format":"float"},"priceServerTimestamp":{"type":"integer"}},"required":["instrument","bids","offers","timestamp","chartPrice","priceServerTimestamp"],"additionalProperties":false},{"type":"object","properties":{"Currency":{"type":"object","properties":{"Currency":{"type":"array","description":"An array of two conversion factors - [gainFactor, lossFactor] for V20 or [buyPositionFactor, sellPositionFactor] for MT5.","items":{"type":"number","minItems":2,"maxItems":2}}}}},"additionalProperties":false}]}}}}}}},"/v2/user/accounts/{server}/{accountId}/instruments/categories":{"get":{"summary":"Returns available instrument categories for account","description":"","tags":["Instruments categories (v2)"],"operationId":"user-instruments-categories","parameters":[{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}}}}}},"/v2/user/accounts/{server}/{accountId}/instruments":{"get":{"tags":["Instruments (v2)"],"summary":"Returns paginated instruments, sort alphabetically","operationId":"user-instruments","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"ids","in":"query","explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","schema":{"type":"number"},"required":true},{"name":"offset","in":"query","schema":{"type":"number"},"required":true}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"currency":{"type":"string","deprecated":true,"description":"Use baseCurrency instead"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}}},"required":["id","name","description","category","currency","pipLocation","displayPrecision","tradeMode","marketHours","type"]}}}}]}}}}}}},"/v2/user/accounts/{server}/{accountId}/instruments/extended":{"get":{"tags":["Instruments (v2)"],"summary":"Returns paginated instruments, sort alphabetically","operationId":"user-instruments-extended","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"ids","in":"query","explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","schema":{"type":"number"},"required":true},{"name":"offset","in":"query","schema":{"type":"number"},"required":true}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"currency":{"type":"string","deprecated":true,"description":"Use baseCurrency instead"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}}},"required":["id","name","description","category","currency","pipLocation","displayPrecision","tradeMode","marketHours","type"]},{"type":"object","properties":{"isin":{"type":"string"},"country":{"type":"string"},"minTradeSize":{"type":"number"},"maxTradeSize":{"type":"number"},"contractSize":{"type":"number"},"maxPositionSize":{"type":"number"},"step":{"type":"number"},"tickSize":{"type":"number"},"swapLong":{"type":"number"},"swapShort":{"type":"number"},"minStopDistance":{"type":"number"},"marginCurrency":{"type":"string","deprecated":true,"description":"Use profitCurrency instead"},"profitCurrency":{"type":"string"},"marginInitial":{"type":"number"},"marginRateBuy":{"type":"array","items":{"type":"number"}},"marginRateSell":{"type":"array","items":{"type":"number"}},"kidLink":{"type":"array","items":{"type":"object","properties":{"division":{"type":"string"},"kidLink":{"type":"string"}},"required":["division","kidLink"]}},"commission":{"type":"number"},"marginInitialSell":{"type":"number","minimum":0},"marginInitialBuy":{"type":"number","minimum":0},"exchange":{"type":"string","description":"Exchange where the instrument is listed","nullable":true}},"required":["minTradeSize","maxTradeSize","maxPositionSize","step","marginRateBuy","marginRateSell","profitCurrency"]}]}}}}]}}}}}}},"/v2/user/accounts/{server}/{accountId}/instruments/search":{"get":{"tags":["Instruments (v2)"],"summary":"Search for instruments","operationId":"user-instruments-search","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"division","in":"query","schema":{"type":"string"}},{"name":"phrase","in":"query","description":"Search phrase","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful search results","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"currency":{"type":"string","deprecated":true,"description":"Use baseCurrency instead"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}}},"required":["id","name","description","category","currency","pipLocation","displayPrecision","tradeMode","marketHours","type"]}}}}]}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/base":{"get":{"tags":["Instruments (v4)"],"summary":"Returns paginated base instruments, sorted alphabetically","operationId":"user-instruments-base","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"lists","in":"query","description":"Filter instruments by list IDs.","explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"}}},{"name":"ids","in":"query","explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","schema":{"type":"number"},"required":true},{"name":"offset","in":"query","schema":{"type":"number"},"required":true},{"name":"search","in":"query","required":false,"description":"Optional search query to filter instruments","schema":{"type":"string","minLength":3}},{"name":"sortBy","in":"query","required":false,"description":"Optional sort criterion for instrument collections. Sorts the returned instruments alphabetically by the chosen display-name type. When omitted the response keeps its default order.","schema":{"type":"string","description":"Display-name field by which a collection of instruments can be sorted.","enum":["SYMBOL","NAME","DESCRIPTION"],"example":"NAME"}}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"icons":{"type":"array","description":"A list of URLs for the instrument's icons.","items":{"type":"string"}}},"required":["id","name","description","category","pipLocation","displayPrecision"]}}}}]}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/extended":{"get":{"tags":["Instruments (v4)"],"summary":"Returns paginated instruments, sort alphabetically","operationId":"user-instruments-extended-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"ids","in":"query","explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","schema":{"type":"number"},"required":true},{"name":"offset","in":"query","schema":{"type":"number"},"required":true},{"name":"sortBy","in":"query","required":false,"description":"Optional sort criterion for instrument collections. Sorts the returned instruments alphabetically by the chosen display-name type. When omitted the response keeps its default order.","schema":{"type":"string","description":"Display-name field by which a collection of instruments can be sorted.","enum":["SYMBOL","NAME","DESCRIPTION"],"example":"NAME"}}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"icons":{"type":"array","description":"A list of URLs for the instrument's icons.","items":{"type":"string"}},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"marginCalcMode":{"type":"string","description":"Types of profit and margin calculation for a symbol (IMTConSymbol::EnCalcMode).","enum":["TRADE_MODE_FOREX","TRADE_MODE_FUTURES","TRADE_MODE_CFD","TRADE_MODE_CFDINDEX","TRADE_MODE_CFDLEVERAGE","TRADE_MODE_FOREX_NO_LEVERAGE","TRADE_MODE_EXCH_STOCKS","TRADE_MODE_EXCH_FUTURES","TRADE_MODE_EXCH_FORTS","TRADE_MODE_EXCH_OPTIONS","TRADE_MODE_EXCH_OPTIONS_MARGIN","TRADE_MODE_EXCH_BONDS","TRADE_MODE_EXCH_STOCKS_MOEX","TRADE_MODE_EXCH_BONDS_MOEX","TRADE_MODE_SERV_COLLATERAL"],"example":"TRADE_MODE_FOREX"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","deprecated":true,"description":"Deprecated: use tradeHours (order execution) or quoteHours (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"tradeHours":{"type":"array","description":"Sessions during which the instrument can be traded (order execution).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"quoteHours":{"type":"array","description":"Sessions during which the instrument is quoted (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"isin":{"type":"string"},"country":{"type":"string"},"minTradeSize":{"type":"number"},"maxTradeSize":{"type":"number"},"contractSize":{"type":"number"},"maxPositionSize":{"type":"number"},"step":{"type":"number"},"tickSize":{"type":"number"},"swapLong":{"type":"number"},"swapShort":{"type":"number"},"minStopDistance":{"type":"number"},"profitCurrency":{"type":"string"},"marginCurrency":{"type":"string","nullable":true,"description":"The currency in which margin is calculated, as a 3-letter ISO 4217 code.","pattern":"^[A-Z]{3}$","example":"USD"},"marginInitial":{"type":"number"},"marginRateBuy":{"type":"array","items":{"type":"number"}},"marginRateSell":{"type":"array","items":{"type":"number"}},"kidLink":{"type":"string"},"commission":{"type":"number"},"minimalCommission":{"type":"number","description":"The minimum commission charged for the instrument."},"marginInitialSell":{"type":"number","minimum":0},"marginInitialBuy":{"type":"number","minimum":0},"exchange":{"type":"string","description":"Exchange where the instrument is listed","nullable":true}},"required":["id","name","description","category","pipLocation","displayPrecision","tradeMode","marketHours","tradeHours","quoteHours","type","minTradeSize","maxTradeSize","maxPositionSize","step","marginRateBuy","marginRateSell","profitCurrency"]}}}}]}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/extended/{instrumentId}":{"get":{"tags":["Instruments (v4)"],"summary":"Returns a single extended instrument by id","operationId":"get-instrument-extended-by-id-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrumentId","in":"path","description":"Instrument identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"icons":{"type":"array","description":"A list of URLs for the instrument's icons.","items":{"type":"string"}},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"marginCalcMode":{"type":"string","description":"Types of profit and margin calculation for a symbol (IMTConSymbol::EnCalcMode).","enum":["TRADE_MODE_FOREX","TRADE_MODE_FUTURES","TRADE_MODE_CFD","TRADE_MODE_CFDINDEX","TRADE_MODE_CFDLEVERAGE","TRADE_MODE_FOREX_NO_LEVERAGE","TRADE_MODE_EXCH_STOCKS","TRADE_MODE_EXCH_FUTURES","TRADE_MODE_EXCH_FORTS","TRADE_MODE_EXCH_OPTIONS","TRADE_MODE_EXCH_OPTIONS_MARGIN","TRADE_MODE_EXCH_BONDS","TRADE_MODE_EXCH_STOCKS_MOEX","TRADE_MODE_EXCH_BONDS_MOEX","TRADE_MODE_SERV_COLLATERAL"],"example":"TRADE_MODE_FOREX"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","deprecated":true,"description":"Deprecated: use tradeHours (order execution) or quoteHours (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"tradeHours":{"type":"array","description":"Sessions during which the instrument can be traded (order execution).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"quoteHours":{"type":"array","description":"Sessions during which the instrument is quoted (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"isin":{"type":"string"},"country":{"type":"string"},"minTradeSize":{"type":"number"},"maxTradeSize":{"type":"number"},"contractSize":{"type":"number"},"maxPositionSize":{"type":"number"},"step":{"type":"number"},"tickSize":{"type":"number"},"swapLong":{"type":"number"},"swapShort":{"type":"number"},"minStopDistance":{"type":"number"},"profitCurrency":{"type":"string"},"marginCurrency":{"type":"string","nullable":true,"description":"The currency in which margin is calculated, as a 3-letter ISO 4217 code.","pattern":"^[A-Z]{3}$","example":"USD"},"marginInitial":{"type":"number"},"marginRateBuy":{"type":"array","items":{"type":"number"}},"marginRateSell":{"type":"array","items":{"type":"number"}},"kidLink":{"type":"string"},"commission":{"type":"number"},"minimalCommission":{"type":"number","description":"The minimum commission charged for the instrument."},"marginInitialSell":{"type":"number","minimum":0},"marginInitialBuy":{"type":"number","minimum":0},"exchange":{"type":"string","description":"Exchange where the instrument is listed","nullable":true}},"required":["id","name","description","category","pipLocation","displayPrecision","tradeMode","marketHours","tradeHours","quoteHours","type","minTradeSize","maxTradeSize","maxPositionSize","step","marginRateBuy","marginRateSell","profitCurrency"]}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/instruments/stocks/{instrumentId}":{"get":{"tags":["Instruments (v4)","Stocks"],"summary":"Returns a single extended stocks company details by id","operationId":"get-instrument-stocks-by-id-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrumentId","in":"path","description":"Instrument identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"company":{"type":"object","properties":{"industryCategory":{"type":"string"},"name":{"type":"string"},"sector":{"type":"string"},"ticker":{"type":"string"}},"required":["industryCategory","name","sector","ticker"]},"details":{"type":"object","properties":{"address":{"type":"string","nullable":true},"ceo":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"id":{"type":"string"},"industryCategory":{"type":"string"},"industryGroup":{"type":"string","nullable":true},"legalName":{"type":"string"},"longDescription":{"type":"string"},"shortDescription":{"type":"string"},"website":{"type":"string","nullable":true}},"required":["address","ceo","city","id","industryCategory","industryGroup","legalName","longDescription","shortDescription","website"]}},"required":["company","details"]}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/orders":{"post":{"operationId":"create-order","tags":["Trading (v2)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"price":{"type":"number"},"quantity":{"type":"number"},"expiryTime":{"description":"UTC timestamp in milliseconds","type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type. - `SPECIFIED_DAY`: The order expires at the specified day or the nearest trading time, as given in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","enum":["GTC","SPECIFIED","DAY","SPECIFIED_DAY"]},"stopLoss":{"type":"number"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"takeProfit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"priceBound":{"description":"Avaliable only for v20-* based accounts","type":"number"},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["instrument","quantity","direction","orderType","fillType"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/positions/{instrument}":{"delete":{"operationId":"close-position","tags":["Trading (v2)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string"},"description":"Resource instrument"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"number"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["quantity","direction","instrument"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/orders/{id}":{"put":{"operationId":"modify-order","tags":["Trading (v2)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"price":{"type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"expiryTime":{"description":"UTC timestamp in milliseconds","type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type. - `SPECIFIED_DAY`: The order expires at the specified day or the nearest trading time, as given in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","enum":["GTC","SPECIFIED","DAY","SPECIFIED_DAY"]},"stopLoss":{"type":"number"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"takeProfit":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"priceBound":{"description":"Avaliable only for v20-* based accounts","type":"number"},"quantity":{"type":"number"},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"modifyType":{"type":"string","enum":["EDIT","CLOSE_AND_CREATE"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["direction","instrument","orderType"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}},"delete":{"operationId":"cancel-order","tags":["Trading (v2)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"orderType":{"type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["direction","instrument","orderType"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v2/user/accounts/{server}/{accountId}/trades/{id}":{"put":{"operationId":"modify-trade","tags":["Trading (v2)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}},"delete":{"operationId":"close-trade","tags":["Trading (v2)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"number"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["quantity","direction","instrument"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v4/user/accounts/{server}/{accountId}/execution/orders":{"post":{"operationId":"create-order-v4","tags":["Trading (v4)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"price":{"type":"number"},"quantity":{"type":"number"},"expiryTime":{"description":"UTC timestamp in milliseconds","type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type. - `SPECIFIED_DAY`: The order expires at the specified day or the nearest trading time, as given in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","enum":["GTC","SPECIFIED","DAY","SPECIFIED_DAY"]},"stopLoss":{"type":"number"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"takeProfit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"priceBound":{"description":"Avaliable only for v20-* based accounts","type":"number"},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["instrument","quantity","direction","orderType","fillType"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]},"metadata":{"type":"object","properties":{"transactionId":{"type":"string"},"engineExecutionEndTime":{"description":"UTC timestamp in milliseconds when the engine finished executing the order","type":"number"},"engineExecutionStartTime":{"description":"UTC timestamp in milliseconds when the engine started executing the order","type":"number"},"apiExecutionStartTime":{"description":"UTC timestamp in milliseconds when the API started executing the order","type":"number"},"apiExecutionEndTime":{"description":"UTC timestamp in milliseconds when the API finished executing the order","type":"number"},"engineExecutionTime":{"description":"UTC timestamp in milliseconds when the engine executed the order","type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"instrument":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"orderId":{"type":"string"},"accountId":{"type":"string"},"takeProfit":{"type":"number"},"stopLoss":{"type":"number"},"price":{"type":"number"},"expiryDate":{"description":"UTC timestamp in milliseconds","type":"number"},"size":{"type":"number"}},"required":["transactionId","engineExecutionEndTime","engineExecutionStartTime","apiExecutionStartTime","apiExecutionEndTime","engineExecutionTime","division","server","event","isLiveAccount","orderId","accountId","price"]}},"required":["data","metadata"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/execution/orders/{id}":{"put":{"operationId":"modify-order-v4","tags":["Trading (v4)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"price":{"type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"expiryTime":{"description":"UTC timestamp in milliseconds","type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type. - `SPECIFIED_DAY`: The order expires at the specified day or the nearest trading time, as given in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","enum":["GTC","SPECIFIED","DAY","SPECIFIED_DAY"]},"stopLoss":{"type":"number"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"takeProfit":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"priceBound":{"description":"Avaliable only for v20-* based accounts","type":"number"},"quantity":{"type":"number"},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"modifyType":{"type":"string","enum":["EDIT","CLOSE_AND_CREATE"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["direction","instrument","orderType"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]},"metadata":{"type":"object","properties":{"transactionId":{"type":"string"},"engineExecutionEndTime":{"description":"UTC timestamp in milliseconds when the engine finished executing the order","type":"number"},"engineExecutionStartTime":{"description":"UTC timestamp in milliseconds when the engine started executing the order","type":"number"},"apiExecutionStartTime":{"description":"UTC timestamp in milliseconds when the API started executing the order","type":"number"},"apiExecutionEndTime":{"description":"UTC timestamp in milliseconds when the API finished executing the order","type":"number"},"engineExecutionTime":{"description":"UTC timestamp in milliseconds when the engine executed the order","type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"instrument":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"orderId":{"type":"string"},"accountId":{"type":"string"},"takeProfit":{"type":"number"},"stopLoss":{"type":"number"},"price":{"type":"number"},"expiryDate":{"description":"UTC timestamp in milliseconds","type":"number"},"size":{"type":"number"}},"required":["transactionId","engineExecutionEndTime","engineExecutionStartTime","apiExecutionStartTime","apiExecutionEndTime","engineExecutionTime","division","server","event","isLiveAccount","orderId","accountId","price"]}},"required":["data","metadata"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}}}}}}},"delete":{"operationId":"cancel-order-v4","tags":["Trading (v4)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"orderType":{"type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["direction","instrument","orderType"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]},"metadata":{"type":"object","properties":{"transactionId":{"type":"string"},"engineExecutionEndTime":{"description":"UTC timestamp in milliseconds when the engine finished executing the order","type":"number"},"engineExecutionStartTime":{"description":"UTC timestamp in milliseconds when the engine started executing the order","type":"number"},"apiExecutionStartTime":{"description":"UTC timestamp in milliseconds when the API started executing the order","type":"number"},"apiExecutionEndTime":{"description":"UTC timestamp in milliseconds when the API finished executing the order","type":"number"},"engineExecutionTime":{"description":"UTC timestamp in milliseconds when the engine executed the order","type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"instrument":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"orderId":{"type":"string"},"accountId":{"type":"string"},"takeProfit":{"type":"number"},"stopLoss":{"type":"number"},"price":{"type":"number"},"expiryDate":{"description":"UTC timestamp in milliseconds","type":"number"},"size":{"type":"number"}},"required":["transactionId","engineExecutionEndTime","engineExecutionStartTime","apiExecutionStartTime","apiExecutionEndTime","engineExecutionTime","division","server","event","isLiveAccount","orderId","accountId","price"]}},"required":["data","metadata"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/execution/trades/{id}":{"put":{"operationId":"modify-trade-v4","tags":["Trading (v4)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]},"metadata":{"type":"object","properties":{"transactionId":{"type":"string"},"engineExecutionEndTime":{"description":"UTC timestamp in milliseconds when the engine finished executing the order","type":"number"},"engineExecutionStartTime":{"description":"UTC timestamp in milliseconds when the engine started executing the order","type":"number"},"apiExecutionStartTime":{"description":"UTC timestamp in milliseconds when the API started executing the order","type":"number"},"apiExecutionEndTime":{"description":"UTC timestamp in milliseconds when the API finished executing the order","type":"number"},"engineExecutionTime":{"description":"UTC timestamp in milliseconds when the engine executed the order","type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"instrument":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"orderId":{"type":"string"},"accountId":{"type":"string"},"takeProfit":{"type":"number"},"stopLoss":{"type":"number"},"price":{"type":"number"},"expiryDate":{"description":"UTC timestamp in milliseconds","type":"number"},"size":{"type":"number"}},"required":["transactionId","engineExecutionEndTime","engineExecutionStartTime","apiExecutionStartTime","apiExecutionEndTime","engineExecutionTime","division","server","event","isLiveAccount","orderId","accountId","price"]}},"required":["data","metadata"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}}}}}}},"delete":{"operationId":"close-trade-v4","tags":["Trading (v4)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"number"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["quantity","direction","instrument"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]},"metadata":{"type":"object","properties":{"transactionId":{"type":"string"},"engineExecutionEndTime":{"description":"UTC timestamp in milliseconds when the engine finished executing the order","type":"number"},"engineExecutionStartTime":{"description":"UTC timestamp in milliseconds when the engine started executing the order","type":"number"},"apiExecutionStartTime":{"description":"UTC timestamp in milliseconds when the API started executing the order","type":"number"},"apiExecutionEndTime":{"description":"UTC timestamp in milliseconds when the API finished executing the order","type":"number"},"engineExecutionTime":{"description":"UTC timestamp in milliseconds when the engine executed the order","type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"instrument":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"orderId":{"type":"string"},"accountId":{"type":"string"},"takeProfit":{"type":"number"},"stopLoss":{"type":"number"},"price":{"type":"number"},"expiryDate":{"description":"UTC timestamp in milliseconds","type":"number"},"size":{"type":"number"}},"required":["transactionId","engineExecutionEndTime","engineExecutionStartTime","apiExecutionStartTime","apiExecutionEndTime","engineExecutionTime","division","server","event","isLiveAccount","orderId","accountId","price"]}},"required":["data","metadata"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}}}}}}}},"/v4/user/accounts/{server}/{accountId}/execution/positions/{instrument}":{"delete":{"operationId":"close-position-v4","tags":["Trading"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string"},"description":"Resource instrument"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"number"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["quantity","direction","instrument"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]},"metadata":{"type":"object","properties":{"transactionId":{"type":"string"},"engineExecutionEndTime":{"description":"UTC timestamp in milliseconds when the engine finished executing the order","type":"number"},"engineExecutionStartTime":{"description":"UTC timestamp in milliseconds when the engine started executing the order","type":"number"},"apiExecutionStartTime":{"description":"UTC timestamp in milliseconds when the API started executing the order","type":"number"},"apiExecutionEndTime":{"description":"UTC timestamp in milliseconds when the API finished executing the order","type":"number"},"engineExecutionTime":{"description":"UTC timestamp in milliseconds when the engine executed the order","type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"instrument":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"orderId":{"type":"string"},"accountId":{"type":"string"},"takeProfit":{"type":"number"},"stopLoss":{"type":"number"},"price":{"type":"number"},"expiryDate":{"description":"UTC timestamp in milliseconds","type":"number"},"size":{"type":"number"}},"required":["transactionId","engineExecutionEndTime","engineExecutionStartTime","apiExecutionStartTime","apiExecutionEndTime","engineExecutionTime","division","server","event","isLiveAccount","orderId","accountId","price"]}},"required":["data","metadata"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}}}}}}}},"/v2/user/accounts/{server}/{accountId}/portfolio/stream":{"get":{"summary":"","description":"Returns portfolio updates for specific account id","tags":["Portfolio (v2)"],"deprecated":true,"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"user-portfolio-stream","responses":{"200":{"description":"Stream response","content":{"text/event-stream":{"schema":{"allOf":[{"oneOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]},{"type":"object","description":"Payload for TradeDelete stream events.","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]}},"required":["accountId","id","instrument","direction"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]}]},{"type":"object","properties":{"timestamp":{"type":"integer"}},"required":["timestamp"]}]}}}}}}},"/v2/user/accounts/{server}/{accountId}/portfolio/orders":{"get":{"tags":["Portfolio (v2)"],"deprecated":true,"operationId":"user-orders","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"offset","in":"query","schema":{"type":"number"}},{"name":"type","in":"query","description":"Order status type.","schema":{"type":"string","enum":["HISTORY","PENDING"]},"required":false},{"name":"sort","in":"query","description":"Sort direction for ordering the results by date.","schema":{"type":"string","enum":["asc","desc"]},"required":false},{"name":"from","in":"query","description":"Filter results starting from this timestamp. UTC timestamp in milliseconds.","schema":{"type":"string","pattern":"^\\d+$"},"required":false},{"name":"to","in":"query","description":"Filter results up to this timestamp. UTC timestamp in milliseconds.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"status","in":"query","description":"filter historical orders by status.`PENDING`, `FILLED`, and `CANCELED` statuses are available for both MT5 and v20 orders. All other statuses are applicable to MT5 orders only.","schema":{"type":"string","enum":["FILLED","PENDING","CANCELED","PARTIALLY_FILLED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"]},"required":false},{"name":"direction","in":"query","description":"Direction of an order","schema":{"type":"string","enum":["LONG","SHORT"]},"required":false}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]}}}}}}}},"/v2/user/accounts/{server}/{accountId}/portfolio/positions":{"get":{"tags":["Portfolio (v2)"],"deprecated":true,"operationId":"user-positions","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"offset","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]}}}}}}}},"/v2/user/accounts/{server}/{accountId}/portfolio/positions/{instrument}":{"get":{"tags":["Portfolio (v2)"],"deprecated":true,"operationId":"user-position","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrument","in":"path","description":"Order identifier.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]}}}}}}},"/v2/user/accounts/{server}/{accountId}/portfolio/orders/{orderId}":{"get":{"tags":["Portfolio (v2)"],"description":"Find pending order by ID","deprecated":true,"operationId":"user-order-by-id","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"orderId","in":"path","description":"Order identifier.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]}}}}}}},"/v2/user/accounts/{server}/{accountId}/portfolio/trades":{"get":{"tags":["Portfolio (v2)"],"deprecated":true,"operationId":"user-trades","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"offset","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]}}}}}}}},"/v2/user/accounts/{server}/{accountId}/portfolio/trades/{tradeId}":{"get":{"tags":["Portfolio (v2)"],"deprecated":true,"operationId":"user-trade","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"tradeId","in":"path","description":"Trade identifier.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]}}}}}}},"/v2/user/accounts/{server}/{accountId}/portfolio/transactions":{"get":{"tags":["Portfolio (v2)"],"deprecated":true,"operationId":"user-transactions","parameters":[{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"offset","in":"query","schema":{"type":"number"}},{"name":"type","in":"query","description":"Transaction type.","explode":false,"style":"form","schema":{"type":"array","items":{"oneOf":[{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]}]}},"required":false},{"name":"orderId","in":"query","description":"Orders id.","schema":{"type":"string"},"required":false},{"name":"instrument","in":"query","description":"Instrument symbol.","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]}]}}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/stream":{"get":{"summary":"","description":"Returns portfolio updates for specific account id","tags":["Portfolio (v4)"],"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"user-portfolio-stream-v4","responses":{"200":{"description":"Stream response","content":{"text/event-stream":{"schema":{"type":"object","properties":{"event":{"type":"string","enum":["Ping","OrderAdd","OrderDelete","OrderModify","OrderReject","TradeAdd","TradeDelete","TradeModify","TransactionAdd","TransactionDelete","TransactionModify","PositionModify"]},"data":{"allOf":[{"oneOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]},{"type":"object","description":"Payload for TradeDelete stream events.","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]}},"required":["accountId","id","instrument","direction"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"quantity":{"type":"number"},"takeProfitOrderId":{"type":"string"},"stopLossOrderId":{"type":"string"},"trailingStopLossOrderId":{"type":"string"}},"required":["accountId","id","instrument","direction","quantity"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]}]},{"type":"object","properties":{"timestamp":{"type":"integer"}},"required":["timestamp"]}]}},"required":["event","data"]}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/orders":{"get":{"tags":["Portfolio (v4)"],"operationId":"user-orders-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"offset","in":"query","schema":{"type":"number"}},{"name":"type","in":"query","description":"Order status type.","schema":{"type":"string","enum":["HISTORY","PENDING"]},"required":false},{"name":"sort","in":"query","description":"Sort direction for ordering the results by date.","schema":{"type":"string","enum":["asc","desc"]},"required":false},{"name":"from","in":"query","description":"Filter results starting from this timestamp. UTC timestamp in milliseconds.","schema":{"type":"string","pattern":"^\\d+$"},"required":false},{"name":"to","in":"query","description":"Filter results up to this timestamp. UTC timestamp in milliseconds.","schema":{"type":"string","pattern":"^\\d+$"}},{"name":"status","in":"query","description":"filter historical orders by status.`PENDING`, `FILLED`, and `CANCELED` statuses are available for both MT5 and v20 orders. All other statuses are applicable to MT5 orders only.","schema":{"type":"string","enum":["FILLED","PENDING","CANCELED","PARTIALLY_FILLED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"]},"required":false},{"name":"direction","in":"query","description":"Direction of an order","schema":{"type":"string","enum":["LONG","SHORT"]},"required":false}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]}}}}]}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/positions":{"get":{"tags":["Portfolio (v4)"],"operationId":"user-positions-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"offset","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]}}}}]}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/positions/{instrument}":{"get":{"tags":["Portfolio (v4)"],"operationId":"user-position-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"instrument","in":"path","description":"Order identifier.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]}},"required":["data"]}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/orders/{orderId}":{"get":{"tags":["Portfolio (v4)"],"description":"Find pending order by ID","operationId":"user-order-by-id-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"orderId","in":"path","description":"Order identifier.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]}},"required":["data"]}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/trades":{"get":{"tags":["Portfolio (v4)"],"operationId":"user-trades-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"offset","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]}}}}]}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/trades/{tradeId}":{"get":{"tags":["Portfolio (v4)"],"operationId":"user-trade-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"tradeId","in":"path","description":"Trade identifier.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]}},"required":["data"]}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/transactions":{"get":{"tags":["Portfolio (v4)"],"operationId":"user-transactions-v4","parameters":[{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"limit","in":"query","schema":{"type":"number"}},{"name":"offset","in":"query","schema":{"type":"number"}},{"name":"type","in":"query","description":"Transaction type.","explode":false,"style":"form","schema":{"type":"array","items":{"oneOf":[{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]}]}},"required":false},{"name":"orderId","in":"query","description":"Orders id.","schema":{"type":"string"},"required":false},{"name":"instrument","in":"query","description":"Instrument symbol.","schema":{"type":"string"},"required":false}],"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]}]}}}}]}}}}}}},"/v4/user/accounts/{server}/{accountId}/portfolio/order/preview":{"post":{"tags":["Trading (v4)"],"summary":"Check margin requirement for a trade","description":"Prompts the service to calculate proper margin values for the trade to be executed correctly.","operationId":"user-order-preview-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instrument":{"type":"string"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"price":{"type":"number"},"quantity":{"type":"number"},"expiryTime":{"description":"UTC timestamp in milliseconds","type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type. - `SPECIFIED_DAY`: The order expires at the specified day or the nearest trading time, as given in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","enum":["GTC","SPECIFIED","DAY","SPECIFIED_DAY"]},"stopLoss":{"type":"number"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"takeProfit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"priceBound":{"description":"Avaliable only for v20-* based accounts","type":"number"},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["instrument","quantity","direction","orderType","fillType"]}}}},"responses":{"200":{"description":"response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"marginRequired":{"type":"number","description":"The margin required to open the previewed order.","example":123.45}}}}}}}}}}},"/v4/user/news":{"get":{"tags":["News (v4)"],"summary":"Get news articles","description":"Retrieves news articles based on the user's division.\nSupports pagination and historical news access with date range filtering.\nFor OJ divisions (9, 10), news is fetched from OJ news source.\nFor OTMS, news is fetched from TMS news source.\nFor all other divisions, news is fetched from OANDA news source.\n","operationId":"getNews","parameters":[{"name":"divisionId","in":"query","description":"The user's division identifier.","required":true,"schema":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"}},{"name":"offset","in":"query","description":"Pagination offset. The number of items to skip before starting to return results.\n","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","description":"Maximum number of news items to return per request.\n","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"dateSortDirection","in":"query","description":"Sort direction for news items by date.\n- desc: Most recent first (default)\n- asc: Oldest first\n","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"from","in":"query","description":"Filter news starting from this timestamp. UTC timestamp in milliseconds.","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"to","in":"query","description":"Filter news up to this timestamp. UTC timestamp in milliseconds.","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"language","in":"query","description":"Filter news by language code (ISO 639-1).\nFor non-OJ divisions: defaults to \"en\" if not specified.\nFor OJ divisions (9, 10): only \"ja\" is supported; other values will result in a 400 error.\n","required":false,"schema":{"type":"string","description":"ISO 639-1 language code","enum":["en","ar","de","ru","zh","ja","nl","fa","fr","el","it","ko","pt","es","tr","pl"]}}],"responses":{"200":{"description":"News articles retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","description":"A news article item","properties":{"id":{"type":"integer"},"title":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string","description":"The format of the news content","enum":["html","plaintext"]},"timestamp":{"type":"string","format":"date-time"},"country":{"type":"string","nullable":true},"language_code":{"type":"string","description":"ISO 639-1 language code","enum":["en","ar","de","ru","zh","ja","nl","fa","fr","el","it","ko","pt","es","tr","pl"]},"summary":{"type":"string"},"url_link":{"type":"string","format":"uri","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string","nullable":true}},"required":["id","title","content","contentType","timestamp"]}}},"required":["data"]}}}},"400":{"description":"Bad request - Invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing what went wrong"}},"required":["message"]}}}}}}},"/v4/user/calendar":{"get":{"tags":["Calendar (v4)"],"summary":"Get calendar events","description":"Get economic calendar events for the user","operationId":"getCalendar","parameters":[{"name":"divisionId","in":"query","description":"The user's division identifier.","required":true,"schema":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"}},{"name":"from","in":"query","description":"Filter news starting from this timestamp. UTC timestamp in milliseconds.","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"to","in":"query","description":"Filter news up to this timestamp. UTC timestamp in milliseconds.","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"language","in":"query","description":"Filter news by language code (ISO 639-1).\nFor non-OJ divisions: defaults to \"en\" if not specified.\nFor OJ divisions (9, 10): only \"ja\" is supported; other values will result in a 400 error.\n","required":false,"schema":{"type":"string","description":"ISO 639-1 language code","enum":["en","ar","de","ru","zh","ja","nl","fa","fr","el","it","ko","pt","es","tr","pl"]}}],"responses":{"200":{"description":"Calendar events retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","description":"A calendar event item","properties":{"id":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"event":{"type":"string"},"country":{"type":"string"},"priority":{"type":"number"},"period":{"type":"string"},"actual":{"type":"string"},"forecast":{"type":"string"},"previous":{"type":"string"},"icon":{"type":"string","description":"URL of the icon for the event"}},"required":["id","timestamp","event","country","priority","period","actual","forecast","previous","icon"]}}},"required":["data"]}}}},"400":{"description":"Bad request - Invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing what went wrong"}},"required":["message"]}}}}}}},"/v2/user/accounts/{server}/{accountId}/tracking/latency":{"post":{"tags":["Tracking (v2)"],"operationId":"post-latency","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientRoundTripDuration":{"type":"number","title":"Client round-trip duration","description":"Total time in **milliseconds** between submitting the order and receiving an order placement confirmation","example":150.5},"clientStartTime":{"type":"number","title":"Client start timestamp","description":"UTC timestamp in **milliseconds** when the client initiated the request.","example":1622547800123},"clientReceivedTime":{"type":"number","title":"Client received timestamp","description":"UTC timestamp in **milliseconds** when the client received the server’s response.","example":1622547800450},"platform":{"type":"string","title":"Platform name","description":"Name of the platform that client is running on.","example":"ios"},"requestedPrice":{"type":"number"},"orderId":{"type":"string"},"tradingAccountType":{"type":"string","enum":["OGM","V20","CRYPTO","OTMS","OEL","OJ"],"deprecated":true},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"userId":{"type":"string"},"oandaAgent":{"type":"string"},"engineAfterPreflightDuration":{"type":"number","title":"Engine post-preflight duration","description":"Time in **milliseconds** taken by the trading engine after preflight checks.","example":25.3},"apiVersion":{"type":"string"},"transactionId":{"type":"string"},"size":{"type":"number","title":"Order size","description":"Quantity or size of the order.","example":100},"instrument":{"type":"string"},"vwap":{"type":"string","title":"VWAP","description":"Volume-weighted average price at the time of the order.","example":"252.30","externalDocs":{"description":"VWAP calculation in the platforms-mono repo","url":"https://bitbucket.org/oandacorp/platforms-mono/src/5f05d02c480e54c108ca53963f85a17c3bb310ca/packages/mono-utils/src/computeVolumeWeightedAveragePrice.ts?at=master"}},"type":{"type":"string","enum":["MARKET","STOP","LIMIT"]}},"required":["clientRoundTripDuration","clientStartTime","requestedPrice","clientReceivedTime","event","userId","orderId","oandaAgent","engineAfterPreflightDuration","apiVersion","platform","vwap","instrument","transactionId"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v4/user/accounts/{server}/{accountId}/tracking/latency":{"post":{"tags":["Tracking (v4)"],"operationId":"post-latency-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientRoundTripDuration":{"type":"number","title":"Client round-trip duration","description":"Total time in **milliseconds** between submitting the order and receiving an order placement confirmation","example":150.5},"clientStartTime":{"type":"number","title":"Client start timestamp","description":"UTC timestamp in **milliseconds** when the client initiated the request.","example":1622547800123},"clientReceivedTime":{"type":"number","title":"Client received timestamp","description":"UTC timestamp in **milliseconds** when the client received the server’s response.","example":1622547800450},"platform":{"type":"string","title":"Platform name","description":"Name of the platform that client is running on.","example":"ios"},"requestedPrice":{"type":"number"},"orderId":{"type":"string"},"tradingAccountType":{"type":"string","enum":["OGM","V20","CRYPTO","OTMS","OEL","OJ"],"deprecated":true},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"userId":{"type":"string"},"oandaAgent":{"type":"string"},"engineAfterPreflightDuration":{"type":"number","title":"Engine post-preflight duration","description":"Time in **milliseconds** taken by the trading engine after preflight checks.","example":25.3},"apiVersion":{"type":"string"},"transactionId":{"type":"string"},"size":{"type":"number","title":"Order size","description":"Quantity or size of the order.","example":100},"instrument":{"type":"string"},"vwap":{"type":"string","title":"VWAP","description":"Volume-weighted average price at the time of the order.","example":"252.30","externalDocs":{"description":"VWAP calculation in the platforms-mono repo","url":"https://bitbucket.org/oandacorp/platforms-mono/src/5f05d02c480e54c108ca53963f85a17c3bb310ca/packages/mono-utils/src/computeVolumeWeightedAveragePrice.ts?at=master"}},"type":{"type":"string","enum":["MARKET","STOP","LIMIT"]}},"required":["clientRoundTripDuration","clientStartTime","requestedPrice","clientReceivedTime","event","userId","orderId","oandaAgent","engineAfterPreflightDuration","apiVersion","platform","vwap","instrument","transactionId"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v2/bounce/location":{"get":{"tags":["Tracking (v2)"],"description":"Returns ISO3166 Alpha-2 code. It is based on Cloudflare's CF-IPCountry header","externalDocs":{"url":"https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry"},"operationId":"get-country-code","responses":{"200":{"description":"Country code","content":{"application/json":{"schema":{"type":"object","required":["iso3166"],"properties":{"iso3166":{"type":"string"}}}}}},"404":{"description":"Location not found"}}}},"/v4/bounce/location":{"get":{"tags":["Tracking (v4)"],"description":"Returns ISO3166 Alpha-2 code. It is based on Cloudflare's CF-IPCountry header","externalDocs":{"url":"https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry"},"operationId":"get-country-code-v4","responses":{"200":{"description":"Country code","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["iso3166"],"properties":{"iso3166":{"type":"string"}}}}}}}},"404":{"description":"Location not found"}}}},"/v2/user/accounts/{server}/{accountId}/tracking/view":{"post":{"tags":["Tracking (v2)"],"operationId":"post-view","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string","enum":["View | Instruments Group","View | Orderbook Indicator","View | Account Balance"]},"agent":{"type":"string"},"ip":{"type":"string"},"userId":{"type":"string"},"oandaAgent":{"type":"string"},"engineType":{"type":"string"},"division":{"type":"string"},"accountFund":{"type":"string","enum":["LIVE","DEMO"]},"accountId":{"type":"string"},"tradingAccountType":{"type":"string","enum":["OGM","V20","CRYPTO","OTMS","OEL","OJ"],"deprecated":true},"properties":{"anyOf":[{"type":"object","properties":{"group":{"type":"string"},"tag":{"type":"string"},"platform":{"type":"string"}},"required":["group","tag","platform"]},{"type":"object","properties":{"version":{"type":"string"},"language":{"type":"string"},"platform":{"type":"string"},"server":{"type":"string"},"country":{"type":"string"}}}]}},"required":["event","agent","oandaAgent","engineType","division","properties","userId","ip"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v4/user/accounts/{server}/{accountId}/tracking/view":{"post":{"tags":["Tracking (v4)"],"operationId":"post-view-v4","parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string","enum":["View | Instruments Group","View | Orderbook Indicator","View | Account Balance"]},"agent":{"type":"string"},"ip":{"type":"string"},"userId":{"type":"string"},"oandaAgent":{"type":"string"},"engineType":{"type":"string"},"division":{"type":"string"},"accountFund":{"type":"string","enum":["LIVE","DEMO"]},"accountId":{"type":"string"},"tradingAccountType":{"type":"string","enum":["OGM","V20","CRYPTO","OTMS","OEL","OJ"],"deprecated":true},"properties":{"anyOf":[{"type":"object","properties":{"group":{"type":"string"},"tag":{"type":"string"},"platform":{"type":"string"}},"required":["group","tag","platform"]},{"type":"object","properties":{"version":{"type":"string"},"language":{"type":"string"},"platform":{"type":"string"},"server":{"type":"string"},"country":{"type":"string"}}}]}},"required":["event","agent","oandaAgent","engineType","division","properties","userId","ip"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v2/user/tracking/rendering":{"post":{"tags":["Tracking (v2)"],"operationId":"user-track-rendering","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"string","description":"Name of the UI component that will be tracked","enum":["OrderTicket","ChartInitiated","ChartReady"]},"durationMs":{"description":"Render time in milliseconds. It is up to the developer to decide when the rendering starts and when it ends","type":"number"}},"required":["component","durationMs"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v4/user/tracking/rendering":{"post":{"tags":["Tracking (v4)"],"operationId":"user-track-rendering-v4","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"string","description":"Name of the UI component that will be tracked","enum":["OrderTicket","ChartInitiated","ChartReady"]},"durationMs":{"description":"Render time in milliseconds. It is up to the developer to decide when the rendering starts and when it ends","type":"number"}},"required":["component","durationMs"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v2/user/tracking/event":{"post":{"tags":["Tracking (v2)"],"operationId":"post-event-tracking","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string"},"agent":{"type":"string"},"ip":{"type":"string"},"oandaAgent":{"type":"string"},"division":{"type":"string"},"properties":{"type":"object"}},"required":["event","properties"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v4/user/tracking/event":{"post":{"tags":["Tracking (v4)"],"operationId":"post-event-tracking-v4","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string"},"agent":{"type":"string"},"ip":{"type":"string"},"oandaAgent":{"type":"string"},"division":{"type":"string"},"properties":{"type":"object"}},"required":["event","properties"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"FAIL"}}}},"/v3/user/accounts/{server}/{accountId}/supportInfo":{"get":{"tags":["Support (v3)"],"summary":"Get support information","description":"Returns a list of support options like contact details and help guides.","deprecated":true,"parameters":[{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}}],"operationId":"get-support-info","responses":{"200":{"description":"Support information","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The type of support option (e.g., Email, Url).","example":"Email"},"value":{"type":"string","description":"The value associated with the support option (e.g., an email address or a URL).","example":"email@example.com"},"title":{"type":"string","nullable":true,"description":"An optional title for the support option.","example":"help_and_support"},"subtitle":{"type":"string","nullable":true,"description":"An optional subtitle for the support option."},"section":{"type":"string","description":"The section this support option belongs to.","example":"ContactOptions"},"order":{"type":"integer","description":"The display order of this option within its section.","example":1}},"required":["type","value","section","order"]}}},"required":["options"],"additionalProperties":false}},"required":["data"]}}}},"400":{"description":"FAIL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}},"/_meta/health":{"get":{"tags":["Meta"],"summary":"Check health of service","operationId":"getHealthCheck","description":"If service is up and running status will be OK","responses":{"200":{"description":"Service is up and running healthy","content":{"application/json":{"schema":{"type":"object","required":["name","status","startUpAt","current","dependencies"],"additionalProperties":false,"properties":{"name":{"type":"string"},"status":{"type":"string","enum":["OK"]},"startUpAt":{"type":"string","format":"date-time"},"current":{"type":"string","format":"date-time"},"dependencies":{"type":"array","items":{"type":"object"}}}}}}}}}},"/metrics":{"get":{"tags":["Metrics"],"summary":"Returns service metrics","operationId":"getMetrics","responses":{"200":{"description":"Service metrics","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"Server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"AccountInfo":{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"isGSLOAllowed":{"type":"boolean"}},"required":["id","server","fund"]},"User":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"isGSLOAllowed":{"type":"boolean"}},"required":["id","server","fund"]}}},"required":["id","accounts"]},"DivisionId":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"},"AccountInfoExtended":{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]},"MaintenanceWindowInfo":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"]},"AccountInfoExtendedV3":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]},{"type":"object","properties":{"maintenanceWindows":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"]}}},"required":["maintenanceWindows"]}]},"UserV3":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"},"divisionName":{"type":"string","enum":["OC","CANADA","OAP","OEL","TEST","ECP","OAP_CFD","OCI","OJ_NON_CORPORATE","OJ_CORPORATE","OAU","OEM","OGM","OT","OTMS","OPUC"]},"accounts":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]},{"type":"object","properties":{"maintenanceWindows":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"}},"required":["from","to"]}}},"required":["maintenanceWindows"]}]}}},"required":["id","accounts"]},"UserExtended":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"},"divisionName":{"type":"string","enum":["OC","CANADA","OAP","OEL","TEST","ECP","OAP_CFD","OCI","OJ_NON_CORPORATE","OJ_CORPORATE","OAU","OEM","OGM","OT","OTMS","OPUC"]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]}}},"required":["id","accounts"]},"AccountInfoExtendedV4":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]},{"type":"object","properties":{"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"}},"required":["division"]}]},"UserV4":{"type":"object","properties":{"oneId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"divisions":{"type":"array","items":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"}},"accounts":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"fund":{"type":"string","enum":["DEMO","LIVE"]},"currency":{"type":"string"},"displayName":{"type":"string"},"marginRate":{"type":"number","format":"float"},"tags":{"type":"array","items":{"enum":["OGM","V20","PAXOS","MT4","HEDGING","SPREAD_BETTING","LIMITED_RISK","CFD","PREMIUM","OANDA_ONE","ADMINISTRATORS","CONNECT","CONNECT_PREMIUM","CONNECT_PREMIUM_EXPERIENCED","CONNECT_PROFESSIONAL","DEALERS","OANDA","PRIME","STOCKS","TECH","TRADER","STOCK","DEMO","CURRENCY","INDEX","COMMODITY","TRADING_VIEW","PROP_TRADER_US","PROP_TRADER_US_TV","FTMO","TRADINGVIEW"]}},"experience":{"type":"string","enum":["MARGIN","SPOT"]},"disabled":{"type":"boolean"},"isGSLOAllowed":{"type":"boolean"},"closeOnly":{"type":"boolean"},"groupHash":{"type":"string"},"conversionGroupHash":{"type":"string"},"uplPriceTypeHash":{"type":"string","nullable":true,"description":"Hashed values - SIDED_VWAP, VWAP_MIDPOINT, SIDED_TOP_OF_BOOK"}},"required":["id","server","fund","currency","displayName","tags","experience","disabled","groupHash"]},{"type":"object","properties":{"division":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"}},"required":["division"]}]}}},"required":["divisions","oneId","accounts"]},"AccountMarginUpdate":{"type":"object","properties":{"marginUsed":{"type":"number"},"marginLevel":{"type":"number"},"marginAvailable":{"type":"number"},"marginCall":{"type":"string","enum":["NONE","WARNING","CLOSEOUT"]},"marginCloseoutPercent":{"type":"number"},"marginRate":{"type":"number"}}},"AccountSpotUpdate":{"type":"object","properties":{"freeEquity":{"type":"number"},"reservedAmount":{"type":"number"}}},"AccountUpdate":{"type":"object","properties":{"id":{"type":"string"},"balance":{"type":"number"},"bonus":{"type":"number"},"netAccountValue":{"type":"number"},"netAssetsValue":{"type":"number"},"realisedPL":{"type":"number"},"unrealisedPL":{"type":"number"},"disabled":{"type":"boolean"},"margin":{"type":"object","properties":{"marginUsed":{"type":"number"},"marginLevel":{"type":"number"},"marginAvailable":{"type":"number"},"marginCall":{"type":"string","enum":["NONE","WARNING","CLOSEOUT"]},"marginCloseoutPercent":{"type":"number"},"marginRate":{"type":"number"}}},"spot":{"type":"object","properties":{"freeEquity":{"type":"number"},"reservedAmount":{"type":"number"}}}},"required":["id","balance","netAccountValue","netAssetsValue","unrealisedPL","margin"]},"ResponseError":{"type":"object","properties":{"message":{"type":"string"}}},"FavoritesListResponse":{"type":"object","properties":{"instruments":{"type":"array","items":{"type":"string"}}}},"SaveFavoritesRequestBody":{"type":"object","properties":{"instrument":{"type":"string"}},"required":["instrument"]},"FavoritesResponseSuccess":{"type":"object","properties":{"instruments":{"type":"array","items":{"type":"string"}}},"required":["instruments"]},"FavouriteInstrumentV4":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"FavouritesListResponseV4":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["data"]},"UpdateFavouritesRequestBodyV4":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"InstrumentListItemV4":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"InstrumentListsResponseV4":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["data"]},"InstrumentListInstrumentV4":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"InstrumentListDetailV4":{"type":"object","properties":{"id":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["id","instruments"]},"InstrumentListDetailResponseV4":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["id","instruments"]}},"required":["data"]},"InstrumentSentimentItemV4":{"type":"object","properties":{"id":{"type":"string"},"sentiment":{"type":"number","nullable":true,"description":"Ratio of traders long on this instrument (0–1), or null if sentiment data is unavailable"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","sentiment"]},"InstrumentListSentimentsDetailV4":{"type":"object","properties":{"id":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sentiment":{"type":"number","nullable":true,"description":"Ratio of traders long on this instrument (0–1), or null if sentiment data is unavailable"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","sentiment"]}}},"required":["id","instruments"]},"InstrumentListSentimentsResponseV4":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"instruments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sentiment":{"type":"number","nullable":true,"description":"Ratio of traders long on this instrument (0–1), or null if sentiment data is unavailable"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","sentiment"]}}},"required":["id","instruments"]}},"required":["data"]},"InstrumentCategory":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"InstrumentBaseDetailV4":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"}}},"InstrumentBaseResponseV4":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"}}}},"required":["data"]},"PingData":{"type":"object","additionalProperties":false,"example":{}},"PingEvent":{"type":"object","required":["event","data"],"properties":{"event":{"type":"string","enum":["Ping"]},"data":{"type":"object","additionalProperties":false,"example":{}}},"additionalProperties":false},"MarketHoursData":{"type":"array","items":{"type":"string"},"description":"Array of instrument identifiers","example":["EUR_USD","GBP_USD","USD_JPY"]},"MarketHoursUpdateEvent":{"type":"object","required":["event","data"],"properties":{"event":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"]},"data":{"type":"array","items":{"type":"string"},"description":"Array of instrument identifiers","example":["EUR_USD","GBP_USD","USD_JPY"]}},"additionalProperties":false},"InstrumentsStreamEvent":{"oneOf":[{"type":"object","required":["event","data"],"properties":{"event":{"type":"string","enum":["Ping"]},"data":{"type":"object","additionalProperties":false,"example":{}}},"additionalProperties":false},{"type":"object","required":["event","data"],"properties":{"event":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"]},"data":{"type":"array","items":{"type":"string"},"description":"Array of instrument identifiers","example":["EUR_USD","GBP_USD","USD_JPY"]}},"additionalProperties":false}],"discriminator":{"propertyName":"event","mapping":{"Ping":"#/components/schemas/PingEvent","MARKET_OPEN":"#/components/schemas/MarketHoursUpdateEvent","MARKET_CLOSE":"#/components/schemas/MarketHoursUpdateEvent"}}},"Granularity":{"type":"string","enum":["M1","M5","M15","H1","H4","D1"]},"Candle":{"type":"object","properties":{"open":{"type":"number"},"close":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"time":{"type":"number"},"complete":{"type":"boolean"},"volume":{"type":"number"}},"required":["open","close","low","high","time","complete","volume"]},"CandlesResponse":{"type":"array","items":{"type":"object","properties":{"open":{"type":"number"},"close":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"time":{"type":"number"},"complete":{"type":"boolean"},"volume":{"type":"number"}},"required":["open","close","low","high","time","complete","volume"]}},"CandlesResponseV4":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"open":{"type":"number"},"close":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"time":{"type":"number"},"complete":{"type":"boolean"},"volume":{"type":"number"}},"required":["open","close","low","high","time","complete","volume"]}}}},"ChartLayoutIndex":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","name","symbol","resolution"]},"ChartLayoutIndexResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","name","symbol","resolution"]}}}},"SaveChartRequestBody":{"type":"object","properties":{"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"content":{"type":"string"}},"required":["name","symbol","resolution","content"]},"ResponseSuccess":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"ChartLayoutContent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"content":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","name","symbol","resolution"]},"ChartLayoutContentResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"resolution":{"type":"string"},"content":{"type":"string"},"timestamp":{"type":"number"}},"required":["id","name","symbol","resolution"]}}},"ResponseSuccessV4":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["data"]},"BidOffer":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false},"HomeConversion":{"type":"object","properties":{"offer":{"type":"number","format":"float","deprecated":true},"bid":{"type":"number","format":"float","deprecated":true},"bidGain":{"type":"number","format":"float"},"bidLoss":{"type":"number","format":"float"},"offerGain":{"type":"number","format":"float"},"offerLoss":{"type":"number","format":"float"}},"required":["offer","bid"],"additionalProperties":false},"PriceMovement":{"type":"string","enum":["UP","DOWN","NONE"]},"DailyChanges":{"type":"object","properties":{"highPrice":{"type":"number","format":"float"},"lowPrice":{"type":"number","format":"float"},"change":{"type":"object","properties":{"pips":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"},"movement":{"type":"string","enum":["UP","DOWN","NONE"]}},"required":["pips","percentage","movement"],"additionalProperties":false}},"required":["highPrice","lowPrice","change"],"additionalProperties":false},"Price":{"type":"object","properties":{"instrument":{"type":"string"},"bids":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"homeConversion":{"type":"object","properties":{"offer":{"type":"number","format":"float","deprecated":true},"bid":{"type":"number","format":"float","deprecated":true},"bidGain":{"type":"number","format":"float"},"bidLoss":{"type":"number","format":"float"},"offerGain":{"type":"number","format":"float"},"offerLoss":{"type":"number","format":"float"}},"required":["offer","bid"],"additionalProperties":false},"dailyChanges":{"type":"object","properties":{"highPrice":{"type":"number","format":"float"},"lowPrice":{"type":"number","format":"float"},"change":{"type":"object","properties":{"pips":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"},"movement":{"type":"string","enum":["UP","DOWN","NONE"]}},"required":["pips","percentage","movement"],"additionalProperties":false}},"required":["highPrice","lowPrice","change"],"additionalProperties":false},"timestamp":{"type":"integer"},"chartPrice":{"type":"number","format":"float"}},"required":["instrument","bids","offers","timestamp","chartPrice"],"additionalProperties":false},"PricesResponse":{"type":"array","items":{"type":"object","properties":{"instrument":{"type":"string"},"bids":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"homeConversion":{"type":"object","properties":{"offer":{"type":"number","format":"float","deprecated":true},"bid":{"type":"number","format":"float","deprecated":true},"bidGain":{"type":"number","format":"float"},"bidLoss":{"type":"number","format":"float"},"offerGain":{"type":"number","format":"float"},"offerLoss":{"type":"number","format":"float"}},"required":["offer","bid"],"additionalProperties":false},"dailyChanges":{"type":"object","properties":{"highPrice":{"type":"number","format":"float"},"lowPrice":{"type":"number","format":"float"},"change":{"type":"object","properties":{"pips":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"},"movement":{"type":"string","enum":["UP","DOWN","NONE"]}},"required":["pips","percentage","movement"],"additionalProperties":false}},"required":["highPrice","lowPrice","change"],"additionalProperties":false},"timestamp":{"type":"integer"},"chartPrice":{"type":"number","format":"float"}},"required":["instrument","bids","offers","timestamp","chartPrice"],"additionalProperties":false}},"PriceV4":{"type":"object","properties":{"instrument":{"type":"string"},"bids":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"price":{"type":"number","format":"float"},"liquidity":{"type":"number","format":"float"}},"required":["price"],"additionalProperties":false}},"dailyChanges":{"type":"object","properties":{"highPrice":{"type":"number","format":"float"},"lowPrice":{"type":"number","format":"float"},"change":{"type":"object","properties":{"pips":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"},"movement":{"type":"string","enum":["UP","DOWN","NONE"]}},"required":["pips","percentage","movement"],"additionalProperties":false}},"required":["highPrice","lowPrice","change"],"additionalProperties":false},"timestamp":{"type":"integer"},"chartPrice":{"type":"number","format":"float"},"priceServerTimestamp":{"type":"integer"}},"required":["instrument","bids","offers","timestamp","chartPrice","priceServerTimestamp"],"additionalProperties":false},"HomeConversionV4":{"type":"array","description":"An array of two conversion factors - [gainFactor, lossFactor] for V20 or [buyPositionFactor, sellPositionFactor] for MT5.","items":{"type":"number","minItems":2,"maxItems":2}},"CurrencyConversion":{"type":"object","properties":{"Currency":{"type":"object","properties":{"Currency":{"type":"array","description":"An array of two conversion factors - [gainFactor, lossFactor] for V20 or [buyPositionFactor, sellPositionFactor] for MT5.","items":{"type":"number","minItems":2,"maxItems":2}}}}},"additionalProperties":false},"Category":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"CategoriesResponse":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"limit":{"type":"number"},"offset":{"type":"number"},"PaginationMetadata":{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},"ExecutionMode":{"type":"string","enum":["MARKET","EXCHANGE"]},"TradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"ProfitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"Type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"FillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"MarketHourType":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"MarketHours":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]},"Instrument":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"currency":{"type":"string","deprecated":true,"description":"Use baseCurrency instead"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}}},"required":["id","name","description","category","currency","pipLocation","displayPrecision","tradeMode","marketHours","type"]},"InstrumentsResponse":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"currency":{"type":"string","deprecated":true,"description":"Use baseCurrency instead"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}}},"required":["id","name","description","category","currency","pipLocation","displayPrecision","tradeMode","marketHours","type"]}}}}]},"KidLink":{"type":"object","properties":{"division":{"type":"string"},"kidLink":{"type":"string"}},"required":["division","kidLink"]},"InstrumentExtended":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"currency":{"type":"string","deprecated":true,"description":"Use baseCurrency instead"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}}},"required":["id","name","description","category","currency","pipLocation","displayPrecision","tradeMode","marketHours","type"]},{"type":"object","properties":{"isin":{"type":"string"},"country":{"type":"string"},"minTradeSize":{"type":"number"},"maxTradeSize":{"type":"number"},"contractSize":{"type":"number"},"maxPositionSize":{"type":"number"},"step":{"type":"number"},"tickSize":{"type":"number"},"swapLong":{"type":"number"},"swapShort":{"type":"number"},"minStopDistance":{"type":"number"},"marginCurrency":{"type":"string","deprecated":true,"description":"Use profitCurrency instead"},"profitCurrency":{"type":"string"},"marginInitial":{"type":"number"},"marginRateBuy":{"type":"array","items":{"type":"number"}},"marginRateSell":{"type":"array","items":{"type":"number"}},"kidLink":{"type":"array","items":{"type":"object","properties":{"division":{"type":"string"},"kidLink":{"type":"string"}},"required":["division","kidLink"]}},"commission":{"type":"number"},"marginInitialSell":{"type":"number","minimum":0},"marginInitialBuy":{"type":"number","minimum":0},"exchange":{"type":"string","description":"Exchange where the instrument is listed","nullable":true}},"required":["minTradeSize","maxTradeSize","maxPositionSize","step","marginRateBuy","marginRateSell","profitCurrency"]}]},"InstrumentsExtendedResponse":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"currency":{"type":"string","deprecated":true,"description":"Use baseCurrency instead"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}}},"required":["id","name","description","category","currency","pipLocation","displayPrecision","tradeMode","marketHours","type"]},{"type":"object","properties":{"isin":{"type":"string"},"country":{"type":"string"},"minTradeSize":{"type":"number"},"maxTradeSize":{"type":"number"},"contractSize":{"type":"number"},"maxPositionSize":{"type":"number"},"step":{"type":"number"},"tickSize":{"type":"number"},"swapLong":{"type":"number"},"swapShort":{"type":"number"},"minStopDistance":{"type":"number"},"marginCurrency":{"type":"string","deprecated":true,"description":"Use profitCurrency instead"},"profitCurrency":{"type":"string"},"marginInitial":{"type":"number"},"marginRateBuy":{"type":"array","items":{"type":"number"}},"marginRateSell":{"type":"array","items":{"type":"number"}},"kidLink":{"type":"array","items":{"type":"object","properties":{"division":{"type":"string"},"kidLink":{"type":"string"}},"required":["division","kidLink"]}},"commission":{"type":"number"},"marginInitialSell":{"type":"number","minimum":0},"marginInitialBuy":{"type":"number","minimum":0},"exchange":{"type":"string","description":"Exchange where the instrument is listed","nullable":true}},"required":["minTradeSize","maxTradeSize","maxPositionSize","step","marginRateBuy","marginRateSell","profitCurrency"]}]}}}}]},"InstrumentSortBy":{"type":"string","description":"Display-name field by which a collection of instruments can be sorted.","enum":["SYMBOL","NAME","DESCRIPTION"],"example":"NAME"},"InstrumentBase":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"icons":{"type":"array","description":"A list of URLs for the instrument's icons.","items":{"type":"string"}}},"required":["id","name","description","category","pipLocation","displayPrecision"]},"InstrumentsBaseResponse":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"icons":{"type":"array","description":"A list of URLs for the instrument's icons.","items":{"type":"string"}}},"required":["id","name","description","category","pipLocation","displayPrecision"]}}}}]},"MarginCalcMode":{"type":"string","description":"Types of profit and margin calculation for a symbol (IMTConSymbol::EnCalcMode).","enum":["TRADE_MODE_FOREX","TRADE_MODE_FUTURES","TRADE_MODE_CFD","TRADE_MODE_CFDINDEX","TRADE_MODE_CFDLEVERAGE","TRADE_MODE_FOREX_NO_LEVERAGE","TRADE_MODE_EXCH_STOCKS","TRADE_MODE_EXCH_FUTURES","TRADE_MODE_EXCH_FORTS","TRADE_MODE_EXCH_OPTIONS","TRADE_MODE_EXCH_OPTIONS_MARGIN","TRADE_MODE_EXCH_BONDS","TRADE_MODE_EXCH_STOCKS_MOEX","TRADE_MODE_EXCH_BONDS_MOEX","TRADE_MODE_SERV_COLLATERAL"],"example":"TRADE_MODE_FOREX"},"InstrumentExtendedV4":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"icons":{"type":"array","description":"A list of URLs for the instrument's icons.","items":{"type":"string"}},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"marginCalcMode":{"type":"string","description":"Types of profit and margin calculation for a symbol (IMTConSymbol::EnCalcMode).","enum":["TRADE_MODE_FOREX","TRADE_MODE_FUTURES","TRADE_MODE_CFD","TRADE_MODE_CFDINDEX","TRADE_MODE_CFDLEVERAGE","TRADE_MODE_FOREX_NO_LEVERAGE","TRADE_MODE_EXCH_STOCKS","TRADE_MODE_EXCH_FUTURES","TRADE_MODE_EXCH_FORTS","TRADE_MODE_EXCH_OPTIONS","TRADE_MODE_EXCH_OPTIONS_MARGIN","TRADE_MODE_EXCH_BONDS","TRADE_MODE_EXCH_STOCKS_MOEX","TRADE_MODE_EXCH_BONDS_MOEX","TRADE_MODE_SERV_COLLATERAL"],"example":"TRADE_MODE_FOREX"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","deprecated":true,"description":"Deprecated: use tradeHours (order execution) or quoteHours (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"tradeHours":{"type":"array","description":"Sessions during which the instrument can be traded (order execution).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"quoteHours":{"type":"array","description":"Sessions during which the instrument is quoted (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"isin":{"type":"string"},"country":{"type":"string"},"minTradeSize":{"type":"number"},"maxTradeSize":{"type":"number"},"contractSize":{"type":"number"},"maxPositionSize":{"type":"number"},"step":{"type":"number"},"tickSize":{"type":"number"},"swapLong":{"type":"number"},"swapShort":{"type":"number"},"minStopDistance":{"type":"number"},"profitCurrency":{"type":"string"},"marginCurrency":{"type":"string","nullable":true,"description":"The currency in which margin is calculated, as a 3-letter ISO 4217 code.","pattern":"^[A-Z]{3}$","example":"USD"},"marginInitial":{"type":"number"},"marginRateBuy":{"type":"array","items":{"type":"number"}},"marginRateSell":{"type":"array","items":{"type":"number"}},"kidLink":{"type":"string"},"commission":{"type":"number"},"minimalCommission":{"type":"number","description":"The minimum commission charged for the instrument."},"marginInitialSell":{"type":"number","minimum":0},"marginInitialBuy":{"type":"number","minimum":0},"exchange":{"type":"string","description":"Exchange where the instrument is listed","nullable":true}},"required":["id","name","description","category","pipLocation","displayPrecision","tradeMode","marketHours","tradeHours","quoteHours","type","minTradeSize","maxTradeSize","maxPositionSize","step","marginRateBuy","marginRateSell","profitCurrency"]},"InstrumentsExtendedResponseV4":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"icons":{"type":"array","description":"A list of URLs for the instrument's icons.","items":{"type":"string"}},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"marginCalcMode":{"type":"string","description":"Types of profit and margin calculation for a symbol (IMTConSymbol::EnCalcMode).","enum":["TRADE_MODE_FOREX","TRADE_MODE_FUTURES","TRADE_MODE_CFD","TRADE_MODE_CFDINDEX","TRADE_MODE_CFDLEVERAGE","TRADE_MODE_FOREX_NO_LEVERAGE","TRADE_MODE_EXCH_STOCKS","TRADE_MODE_EXCH_FUTURES","TRADE_MODE_EXCH_FORTS","TRADE_MODE_EXCH_OPTIONS","TRADE_MODE_EXCH_OPTIONS_MARGIN","TRADE_MODE_EXCH_BONDS","TRADE_MODE_EXCH_STOCKS_MOEX","TRADE_MODE_EXCH_BONDS_MOEX","TRADE_MODE_SERV_COLLATERAL"],"example":"TRADE_MODE_FOREX"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","deprecated":true,"description":"Deprecated: use tradeHours (order execution) or quoteHours (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"tradeHours":{"type":"array","description":"Sessions during which the instrument can be traded (order execution).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"quoteHours":{"type":"array","description":"Sessions during which the instrument is quoted (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"isin":{"type":"string"},"country":{"type":"string"},"minTradeSize":{"type":"number"},"maxTradeSize":{"type":"number"},"contractSize":{"type":"number"},"maxPositionSize":{"type":"number"},"step":{"type":"number"},"tickSize":{"type":"number"},"swapLong":{"type":"number"},"swapShort":{"type":"number"},"minStopDistance":{"type":"number"},"profitCurrency":{"type":"string"},"marginCurrency":{"type":"string","nullable":true,"description":"The currency in which margin is calculated, as a 3-letter ISO 4217 code.","pattern":"^[A-Z]{3}$","example":"USD"},"marginInitial":{"type":"number"},"marginRateBuy":{"type":"array","items":{"type":"number"}},"marginRateSell":{"type":"array","items":{"type":"number"}},"kidLink":{"type":"string"},"commission":{"type":"number"},"minimalCommission":{"type":"number","description":"The minimum commission charged for the instrument."},"marginInitialSell":{"type":"number","minimum":0},"marginInitialBuy":{"type":"number","minimum":0},"exchange":{"type":"string","description":"Exchange where the instrument is listed","nullable":true}},"required":["id","name","description","category","pipLocation","displayPrecision","tradeMode","marketHours","tradeHours","quoteHours","type","minTradeSize","maxTradeSize","maxPositionSize","step","marginRateBuy","marginRateSell","profitCurrency"]}}}}]},"InstrumentDetailResponseV4":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["CURRENCY","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","EQUITY","EQUITY_CZ","EQUITY_UK","EQUITY_ES","EQUITY_PL","EQUITY_DE","EQUITY_NL","EQUITY_FR","EQUITY_BE","EQUITY_DK","EQUITY_FI","EQUITY_PT","EQUITY_SE","EQUITY_US","ETF"],"example":"INDEX"},"baseCurrency":{"type":"string"},"pipLocation":{"type":"number"},"displayPrecision":{"type":"number"},"icons":{"type":"array","description":"A list of URLs for the instrument's icons.","items":{"type":"string"}},"executionMode":{"description":"This property is for MT5 symbols only : It is of no use for v20.","type":"string","enum":["MARKET","EXCHANGE"]},"tradeMode":{"type":"string","enum":["TRADE_DISABLED","TRADE_LONGONLY","TRADE_SHORTONLY","TRADE_CLOSEONLY","TRADE_FULL"],"required":["status"],"example":"TRADE_FULL"},"marginCalcMode":{"type":"string","description":"Types of profit and margin calculation for a symbol (IMTConSymbol::EnCalcMode).","enum":["TRADE_MODE_FOREX","TRADE_MODE_FUTURES","TRADE_MODE_CFD","TRADE_MODE_CFDINDEX","TRADE_MODE_CFDLEVERAGE","TRADE_MODE_FOREX_NO_LEVERAGE","TRADE_MODE_EXCH_STOCKS","TRADE_MODE_EXCH_FUTURES","TRADE_MODE_EXCH_FORTS","TRADE_MODE_EXCH_OPTIONS","TRADE_MODE_EXCH_OPTIONS_MARGIN","TRADE_MODE_EXCH_BONDS","TRADE_MODE_EXCH_STOCKS_MOEX","TRADE_MODE_EXCH_BONDS_MOEX","TRADE_MODE_SERV_COLLATERAL"],"example":"TRADE_MODE_FOREX"},"profitConvert":{"type":"string","enum":["BY_MARKET","BY_DEAL"],"required":["status"],"example":"BY_MARKET"},"type":{"type":"string","enum":["CFD","FOREX","STOCK","FUTURES","CRYPTO","INDEX","BOND","COMMODITY","METAL","ETF","SIMULATED"],"example":"CFD"},"fillType":{"type":"array","items":{"type":"string","enum":["FOK","IOC","RETURN"]}},"marketHours":{"type":"array","deprecated":true,"description":"Deprecated: use tradeHours (order execution) or quoteHours (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"tradeHours":{"type":"array","description":"Sessions during which the instrument can be traded (order execution).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"quoteHours":{"type":"array","description":"Sessions during which the instrument is quoted (price streaming).","items":{"type":"object","properties":{"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE"],"required":["status"],"example":"MARKET_OPEN"},"timestamp":{"type":"number"}},"required":["type","timestamp"]}},"isin":{"type":"string"},"country":{"type":"string"},"minTradeSize":{"type":"number"},"maxTradeSize":{"type":"number"},"contractSize":{"type":"number"},"maxPositionSize":{"type":"number"},"step":{"type":"number"},"tickSize":{"type":"number"},"swapLong":{"type":"number"},"swapShort":{"type":"number"},"minStopDistance":{"type":"number"},"profitCurrency":{"type":"string"},"marginCurrency":{"type":"string","nullable":true,"description":"The currency in which margin is calculated, as a 3-letter ISO 4217 code.","pattern":"^[A-Z]{3}$","example":"USD"},"marginInitial":{"type":"number"},"marginRateBuy":{"type":"array","items":{"type":"number"}},"marginRateSell":{"type":"array","items":{"type":"number"}},"kidLink":{"type":"string"},"commission":{"type":"number"},"minimalCommission":{"type":"number","description":"The minimum commission charged for the instrument."},"marginInitialSell":{"type":"number","minimum":0},"marginInitialBuy":{"type":"number","minimum":0},"exchange":{"type":"string","description":"Exchange where the instrument is listed","nullable":true}},"required":["id","name","description","category","pipLocation","displayPrecision","tradeMode","marketHours","tradeHours","quoteHours","type","minTradeSize","maxTradeSize","maxPositionSize","step","marginRateBuy","marginRateSell","profitCurrency"]}},"required":["data"]},"StocksCompanyV4":{"type":"object","properties":{"industryCategory":{"type":"string"},"name":{"type":"string"},"sector":{"type":"string"},"ticker":{"type":"string"}},"required":["industryCategory","name","sector","ticker"]},"StocksCompanyDetailsV4":{"type":"object","properties":{"address":{"type":"string","nullable":true},"ceo":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"id":{"type":"string"},"industryCategory":{"type":"string"},"industryGroup":{"type":"string","nullable":true},"legalName":{"type":"string"},"longDescription":{"type":"string"},"shortDescription":{"type":"string"},"website":{"type":"string","nullable":true}},"required":["address","ceo","city","id","industryCategory","industryGroup","legalName","longDescription","shortDescription","website"]},"StocksCompanyDetailV4":{"type":"object","properties":{"company":{"type":"object","properties":{"industryCategory":{"type":"string"},"name":{"type":"string"},"sector":{"type":"string"},"ticker":{"type":"string"}},"required":["industryCategory","name","sector","ticker"]},"details":{"type":"object","properties":{"address":{"type":"string","nullable":true},"ceo":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"id":{"type":"string"},"industryCategory":{"type":"string"},"industryGroup":{"type":"string","nullable":true},"legalName":{"type":"string"},"longDescription":{"type":"string"},"shortDescription":{"type":"string"},"website":{"type":"string","nullable":true}},"required":["address","ceo","city","id","industryCategory","industryGroup","legalName","longDescription","shortDescription","website"]}},"required":["company","details"]},"StocksCompanyDetailResponseV4":{"type":"object","properties":{"data":{"type":"object","properties":{"company":{"type":"object","properties":{"industryCategory":{"type":"string"},"name":{"type":"string"},"sector":{"type":"string"},"ticker":{"type":"string"}},"required":["industryCategory","name","sector","ticker"]},"details":{"type":"object","properties":{"address":{"type":"string","nullable":true},"ceo":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"id":{"type":"string"},"industryCategory":{"type":"string"},"industryGroup":{"type":"string","nullable":true},"legalName":{"type":"string"},"longDescription":{"type":"string"},"shortDescription":{"type":"string"},"website":{"type":"string","nullable":true}},"required":["address","ceo","city","id","industryCategory","industryGroup","legalName","longDescription","shortDescription","website"]}},"required":["company","details"]}},"required":["data"]},"OrderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"ExpiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type. - `SPECIFIED_DAY`: The order expires at the specified day or the nearest trading time, as given in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","enum":["GTC","SPECIFIED","DAY","SPECIFIED_DAY"]},"StopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"Direction":{"type":"string","enum":["LONG","SHORT"]},"schemas-FillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"TrackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}},"CreateOrderRequestBody":{"type":"object","properties":{"instrument":{"type":"string"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"price":{"type":"number"},"quantity":{"type":"number"},"expiryTime":{"description":"UTC timestamp in milliseconds","type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type. - `SPECIFIED_DAY`: The order expires at the specified day or the nearest trading time, as given in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","enum":["GTC","SPECIFIED","DAY","SPECIFIED_DAY"]},"stopLoss":{"type":"number"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"takeProfit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"priceBound":{"description":"Avaliable only for v20-* based accounts","type":"number"},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["instrument","quantity","direction","orderType","fillType"]},"schemas-ResponseSuccess":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]},"schemas-ResponseError":{"type":"object","properties":{"message":{"type":"string","enum":["ACCOUNT_CLOSE_ONLY","ACCOUNT_CONDITIONAL_ALL_SHARES","ACCOUNT_CONDITIONAL_US_SHARES","AUTHENTICATION_ERROR","AUTOTRADING_DISABLED_CLIENT","AUTOTRADING_DISABLED_SERVER","CHART_LIMIT_REACHED","CLOSE_ORDER_EXIST","ERROR_NO_ACCOUNTS","ERROR_NO_CANDLE_DATA_AVAILABLE","ERROR_NO_SUPPORTED_ACCOUNTS","ERROR_TRADING_DISABLED","ERROR_UNABLE_TO_RETRIEVE_CANDLE_DATA","FUNCTION_DISABLED","HEDGE_PROHIBITED","INVALID_CLOSE_VOLUME","INVALID_EXPIRATION","INVALID_FILL","INVALID_ORDER_TYPE","INVALID_PRICE","INVALID_REQUEST","INVALID_STOPS","INVALID_VOLUME","LIMIT_ORDERS","LIMIT_POSITIONS","LIMIT_VOLUME","MARKET_CLOSED","NOT_AUTHENTICATED","NOT_FOUND","NO_ACCOUNT","NO_CHANGES","NO_CONNECTION","NO_MONEY","NO_PRICE","ONLY_CLOSE","ONLY_LONG","ONLY_REAL_ACCOUNTS","ONLY_SHORT","ORDER_CHANGED","ORDER_TOOK_LONGER_THAN_EXPECTED","POSITION_CLOSED","PRICE_CHANGED","PROHIBITED_BY_FIFO","REQUEST_CANCELED","REQUEST_FAILURE","REQUEST_FROZEN","REQUEST_LOCKED","REQUEST_REJECTED","REQUEST_TIMEOUT","REQUIRE_MT5_ACCOUNT","SERVER_ERROR","TOO_MANY_REQUESTS","TRADE_DISABLED","UNDERLYING_API_ERROR","ACCOUNT_CONFIGURATION_LOCKED","ACCOUNT_DEPOSIT_LOCKED","ACCOUNT_NOT_ACTIVE","ACCOUNT_ORDER_CANCEL_LOCKED","ACCOUNT_WITHDRAWAL_LOCKED","ADMIN_CONFIGURE_DATA_MISSING","ALIAS_INVALID","AMOUNT_INVALID","AMOUNT_MISSING","BOUNDS_VIOLATION","CLIENT_CONFIGURE_DATA_MISSING","CLIENT_EXTENSIONS_DATA_MISSING","CLIENT_ORDER_COMMENT_INVALID","CLIENT_ORDER_ID_ALREADY_EXISTS","CLIENT_ORDER_ID_INVALID","CLIENT_ORDER_TAG_INVALID","CLIENT_REQUEST","CLIENT_REQUEST_REPLACED","CLIENT_TRADE_COMMENT_INVALID","CLIENT_TRADE_ID_ALREADY_EXISTS","CLIENT_TRADE_ID_INVALID","CLIENT_TRADE_TAG_INVALID","CLOSEOUT_POSITION_DOESNT_EXIST","CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION","CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING","CLOSEOUT_POSITION_REJECT","CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE","CLOSE_TRADE_PARTIAL_UNITS_MISSING","CLOSE_TRADE_TYPE_MISSING","CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE","DIVIDEND_ADJUSTMENT_REPLACED","FUNDING_REASON_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_LOSS","GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED","GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS","GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED","GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET","GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED","GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE","GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD","GUARANTEED_STOP_LOSS_ORDER_REQUIRED","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION","GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","INSTRUMENT_ASK_HALTED","INSTRUMENT_ASK_REDUCE_ONLY","INSTRUMENT_BID_HALTED","INSTRUMENT_BID_REDUCE_ONLY","INSTRUMENT_MISSING","INSTRUMENT_NOT_TRADEABLE","INSTRUMENT_PRICE_UNKNOWN","INSTRUMENT_UNKNOWN","INSUFFICIENT_FUNDS","INSUFFICIENT_LIQUIDITY","INTERNAL_SERVER_ERROR","INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL","LOSING_TAKE_PROFIT","MARGIN_RATE_INVALID","MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT","MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL","MARKUP_GROUP_ID_INVALID","MIGRATION","OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED","ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT","ORDER_DOESNT_EXIST","ORDER_FILL_POSITION_ACTION_INVALID","ORDER_FILL_POSITION_ACTION_MISSING","ORDER_IDENTIFIER_INCONSISTENCY","ORDER_ID_UNSPECIFIED","ORDER_PARTIAL_FILL_OPTION_INVALID","ORDER_PARTIAL_FILL_OPTION_MISSING","POSITION_AGGREGATION_MODE_INVALID","PRICE_BOUND_INVALID","PRICE_BOUND_PRECISION_EXCEEDED","PRICE_DISTANCE_INVALID","PRICE_DISTANCE_MAXIMUM_EXCEEDED","PRICE_DISTANCE_MINIMUM_NOT_MET","PRICE_DISTANCE_MISSING","PRICE_DISTANCE_PRECISION_EXCEEDED","PRICE_INVALID","PRICE_MISSING","PRICE_PRECISION_EXCEEDED","REPLACING_ORDER_INVALID","REPLACING_TRADE_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","STOP_LOSS_ON_FILL_DISTANCE_INVALID","STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED","STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED","STOP_LOSS_ON_FILL_LOSS","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","STOP_LOSS_ON_FILL_PRICE_INVALID","STOP_LOSS_ON_FILL_PRICE_MISSING","STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED","STOP_LOSS_ON_FILL_REQUIRED","STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER","STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","STOP_LOSS_ORDER_ALREADY_EXISTS","STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION","STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED","STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET","STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED","STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD","STOP_LOSS_ORDER_GUARANTEED_REQUIRED","STOP_LOSS_ORDER_NOT_CANCELABLE","STOP_LOSS_ORDER_NOT_REPLACEABLE","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID","TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_INVALID","TAKE_PROFIT_ON_FILL_DISTANCE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST","TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING","TAKE_PROFIT_ON_FILL_LOSS","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TAKE_PROFIT_ON_FILL_PRICE_INVALID","TAKE_PROFIT_ON_FILL_PRICE_MISSING","TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID","TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID","TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING","TAKE_PROFIT_ORDER_ALREADY_EXISTS","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING","TAKE_PROFIT_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED","TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TIME_IN_FORCE_EXPIRED","TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST","TIME_IN_FORCE_GTD_TIMESTAMP_MISSING","TIME_IN_FORCE_INVALID","TIME_IN_FORCE_MISSING","TRADE_DOESNT_EXIST","TRADE_IDENTIFIER_INCONSISTENCY","TRADE_ID_UNSPECIFIED","TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID","TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST","TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID","TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID","TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING","TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED","TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION","TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION","TRAILING_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD","TRIGGER_CONDITION_INVALID","TRIGGER_CONDITION_MISSING","UNITS_INVALID","UNITS_LIMIT_EXCEEDED","UNITS_MINIMUM_NOT_MET","UNITS_MISSING","UNITS_PRECISION_EXCEEDED"]}}},"ReducePositionRequestBody":{"type":"object","properties":{"quantity":{"type":"number"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["quantity","direction","instrument"]},"ModifyType":{"type":"string","enum":["EDIT","CLOSE_AND_CREATE"]},"ModifyOrderRequestBody":{"type":"object","properties":{"instrument":{"type":"string"},"price":{"type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"expiryTime":{"description":"UTC timestamp in milliseconds","type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type. - `SPECIFIED_DAY`: The order expires at the specified day or the nearest trading time, as given in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","enum":["GTC","SPECIFIED","DAY","SPECIFIED_DAY"]},"stopLoss":{"type":"number"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"takeProfit":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"priceBound":{"description":"Avaliable only for v20-* based accounts","type":"number"},"quantity":{"type":"number"},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"modifyType":{"type":"string","enum":["EDIT","CLOSE_AND_CREATE"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["direction","instrument","orderType"]},"CancelOrderType":{"type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"CancelOrderRequestBody":{"type":"object","properties":{"instrument":{"type":"string"},"orderType":{"type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["direction","instrument","orderType"]},"ModifyTradeRequestBody":{"type":"object","properties":{"instrument":{"type":"string"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"stopLossType":{"description":"Avaliable only for v20-* based accounts","type":"string","enum":["NORMAL","GUARANTEED"]},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}}},"ReduceTradeRequestBody":{"type":"object","properties":{"quantity":{"type":"number"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"executionMode":{"description":"Exchange needs to be set for all mt5 symbols configured as exhange trade mode. It defaults to MARKET","type":"string","enum":["MARKET","EXCHANGE"]},"fillType":{"type":"string","description":"For v20-* based accounts FOK and IOC is used for MARKET orders, for STOP/LIMIT order only RETURN.","enum":["FOK","IOC","RETURN"]},"trackingData":{"type":"object","properties":{"instrumentCategory":{"type":"string"},"instrumentCategoryCountry":{"type":"string"},"isCFD":{"type":"boolean"}}}},"required":["quantity","direction","instrument"]},"Event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"Metadata":{"type":"object","properties":{"transactionId":{"type":"string"},"engineExecutionEndTime":{"description":"UTC timestamp in milliseconds when the engine finished executing the order","type":"number"},"engineExecutionStartTime":{"description":"UTC timestamp in milliseconds when the engine started executing the order","type":"number"},"apiExecutionStartTime":{"description":"UTC timestamp in milliseconds when the API started executing the order","type":"number"},"apiExecutionEndTime":{"description":"UTC timestamp in milliseconds when the API finished executing the order","type":"number"},"engineExecutionTime":{"description":"UTC timestamp in milliseconds when the engine executed the order","type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"instrument":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"orderId":{"type":"string"},"accountId":{"type":"string"},"takeProfit":{"type":"number"},"stopLoss":{"type":"number"},"price":{"type":"number"},"expiryDate":{"description":"UTC timestamp in milliseconds","type":"number"},"size":{"type":"number"}},"required":["transactionId","engineExecutionEndTime","engineExecutionStartTime","apiExecutionStartTime","apiExecutionEndTime","engineExecutionTime","division","server","event","isLiveAccount","orderId","accountId","price"]},"schemas-ResponseSuccessV4":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"}},"required":["id","transactionId"]},"metadata":{"type":"object","properties":{"transactionId":{"type":"string"},"engineExecutionEndTime":{"description":"UTC timestamp in milliseconds when the engine finished executing the order","type":"number"},"engineExecutionStartTime":{"description":"UTC timestamp in milliseconds when the engine started executing the order","type":"number"},"apiExecutionStartTime":{"description":"UTC timestamp in milliseconds when the API started executing the order","type":"number"},"apiExecutionEndTime":{"description":"UTC timestamp in milliseconds when the API finished executing the order","type":"number"},"engineExecutionTime":{"description":"UTC timestamp in milliseconds when the engine executed the order","type":"number"},"orderType":{"type":"string","enum":["MARKET","MARKET_IF_TOUCHED","STOP","LIMIT"]},"instrument":{"type":"string"},"server":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"direction":{"type":"string","enum":["LONG","SHORT"]},"orderId":{"type":"string"},"accountId":{"type":"string"},"takeProfit":{"type":"number"},"stopLoss":{"type":"number"},"price":{"type":"number"},"expiryDate":{"description":"UTC timestamp in milliseconds","type":"number"},"size":{"type":"number"}},"required":["transactionId","engineExecutionEndTime","engineExecutionStartTime","apiExecutionStartTime","apiExecutionEndTime","engineExecutionTime","division","server","event","isLiveAccount","orderId","accountId","price"]}},"required":["data","metadata"]},"schemas-ExpiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"OrderStatus":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"Order":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]},"Trade":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]},"TradeDelete":{"type":"object","description":"Payload for TradeDelete stream events.","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]}},"required":["accountId","id","instrument","direction"]},"PositionSide":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"Position":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]},"Transactions":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]},"AccountTransactionType":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"AccountTransaction":{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]},"TradingTransactionType":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"TradingTransaction":{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]},"StreamData":{"allOf":[{"oneOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]},{"type":"object","description":"Payload for TradeDelete stream events.","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]}},"required":["accountId","id","instrument","direction"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]}]},{"type":"object","properties":{"timestamp":{"type":"integer"}},"required":["timestamp"]}]},"OrdersResponse":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]}},"PositionsResponse":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]}},"TradesResponse":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]}},"TransactionsResponse":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]}]}},"StreamEvent":{"type":"string","enum":["Ping","OrderAdd","OrderDelete","OrderModify","OrderReject","TradeAdd","TradeDelete","TradeModify","TransactionAdd","TransactionDelete","TransactionModify","PositionModify"]},"ReduceTrade":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"quantity":{"type":"number"},"takeProfitOrderId":{"type":"string"},"stopLossOrderId":{"type":"string"},"trailingStopLossOrderId":{"type":"string"}},"required":["accountId","id","instrument","direction","quantity"]},"StreamDataV4":{"type":"object","properties":{"event":{"type":"string","enum":["Ping","OrderAdd","OrderDelete","OrderModify","OrderReject","TradeAdd","TradeDelete","TradeModify","TransactionAdd","TransactionDelete","TransactionModify","PositionModify"]},"data":{"allOf":[{"oneOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]},{"type":"object","description":"Payload for TradeDelete stream events.","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]}},"required":["accountId","id","instrument","direction"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]},{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"quantity":{"type":"number"},"takeProfitOrderId":{"type":"string"},"stopLossOrderId":{"type":"string"},"trailingStopLossOrderId":{"type":"string"}},"required":["accountId","id","instrument","direction","quantity"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]}]},{"type":"object","properties":{"timestamp":{"type":"integer"}},"required":["timestamp"]}]}},"required":["event","data"]},"OrdersResponseV4":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"parentId":{"type":"string"},"instrument":{"type":"string"},"type":{"description":"Current order type selected in the order ticket.","type":"string","enum":["MARKET","STOP","LIMIT","TAKE_PROFIT","STOP_LOSS","TRAILING_STOP_LOSS","GUARANTEED_STOP_LOSS","MARKET_IF_TOUCHED"]},"price":{"type":"number"},"quantity":{"type":"number"},"executionTime":{"type":"number"},"expiryTime":{"type":"number"},"expiryType":{"description":"- `GTC`: Good 'Til Canceled. The order remains active until canceled. Default value. - `DAY`: The order is active for the current trading day only. - `SPECIFIED`: The order expires at the time specified in `expiryTime`. The `expiryTime` field is required for this type.\n","type":"string","nullable":true,"enum":["GTC","SPECIFIED","DAY"]},"creationTime":{"type":"number"},"stopLoss":{"type":"number"},"takeProfit":{"type":"number"},"status":{"type":"string","enum":["PENDING","NEW","PARTIALLY_FILLED","FILLED","CANCELED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"],"required":["status"],"example":"PENDING"},"direction":{"type":"string","enum":["LONG","SHORT"]},"trailingStop":{"type":"number"},"trailingStopValue":{"type":"number"},"guaranteedStopLoss":{"type":"number"},"commission":{"type":"number"},"reason":{"type":"string"}},"required":["accountId","id","instrument","quantity","direction","orderType","price","status"]}}}}]},"PositionsResponseV4":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"commission":{"type":"number"},"swap":{"type":"number"},"long":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}},"short":{"type":"object","properties":{"quantity":{"type":"number"},"avgPrice":{"type":"number"},"swap":{"type":"number"}}}},"required":["accountId","id","instrument","long","short","commission"]}}}}]},"TradesResponseV4":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"instrument":{"type":"string"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"quantity":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"creationTime":{"type":"number"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"trailingStopValue":{"type":"number","description":"Trailing Stop price value"},"guaranteedStopLoss":{"type":"number"},"swap":{"type":"number","description":"The swap size for a position in deposit currency."}},"required":["accountId","id","instrument","quantity","creationTime","direction","status","price"]}}}}]},"TransactionsResponseV4":{"allOf":[{"type":"object","properties":{"count":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["count","limit","offset"]},{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"orderId":{"type":"string"},"tradeId":{"type":"string"},"ref":{"type":"string"},"instrument":{"type":"string"},"type":{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},"quantity":{"type":"number"},"profit":{"type":"number"},"direction":{"type":"string","enum":["LONG","SHORT"]},"price":{"type":"number"},"pricePosition":{"type":"number"},"stopLoss":{"type":"number","description":"Stop Loss price"},"takeProfit":{"type":"number","description":"Take profit price"},"trailingStop":{"type":"number","description":"Trailing Stop distance value"},"guaranteedStopLoss":{"type":"number"},"accountBallance":{"type":"number"},"halfSpreadCost":{"type":"number"},"commission":{"type":"number"},"guaranteedExecutionFee":{"type":"number"},"swap":{"type":"number"}},"required":["instrument","type","direction"]},{"allOf":[{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"creationTime":{"type":"number"}},"required":["id","creationTime","accountId"]}],"type":"object","properties":{"type":{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]},"accountBallanceChange":{"type":"number"},"accountBallance":{"type":"number"},"externalId":{"type":"string","nullable":true,"description":"External transaction reference from payment gateway (MT5 ExternalID)"},"gateway":{"type":"string","nullable":true,"description":"Payment method name — populated for DEPOSIT/WITHDRAWAL (MT5 Gateway)"},"comment":{"type":"string","nullable":true,"description":"Free-text description from MT5 (MT5 Comment)"},"symbol":{"type":"string","nullable":true,"description":"Instrument symbol — populated for DIVIDEND, FINANCING, COMMISSION, etc. (MT5 Symbol)"},"fee":{"type":"number","nullable":true,"description":"Separate fee amount in account currency, distinct from commission (MT5 Fee)"},"ref":{"type":"string"}},"required":["accountBallance"]}]}}}}]},"OrderPreviewResponseV4":{"type":"object","properties":{"data":{"type":"object","properties":{"marginRequired":{"type":"number","description":"The margin required to open the previewed order.","example":123.45}}}}},"LanguageCode":{"type":"string","description":"ISO 639-1 language code","enum":["en","ar","de","ru","zh","ja","nl","fa","fr","el","it","ko","pt","es","tr","pl"]},"ContentType":{"type":"string","description":"The format of the news content","enum":["html","plaintext"]},"NewsItem":{"type":"object","description":"A news article item","properties":{"id":{"type":"integer"},"title":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string","description":"The format of the news content","enum":["html","plaintext"]},"timestamp":{"type":"string","format":"date-time"},"country":{"type":"string","nullable":true},"language_code":{"type":"string","description":"ISO 639-1 language code","enum":["en","ar","de","ru","zh","ja","nl","fa","fr","el","it","ko","pt","es","tr","pl"]},"summary":{"type":"string"},"url_link":{"type":"string","format":"uri","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string","nullable":true}},"required":["id","title","content","contentType","timestamp"]},"NewsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","description":"A news article item","properties":{"id":{"type":"integer"},"title":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string","description":"The format of the news content","enum":["html","plaintext"]},"timestamp":{"type":"string","format":"date-time"},"country":{"type":"string","nullable":true},"language_code":{"type":"string","description":"ISO 639-1 language code","enum":["en","ar","de","ru","zh","ja","nl","fa","fr","el","it","ko","pt","es","tr","pl"]},"summary":{"type":"string"},"url_link":{"type":"string","format":"uri","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string","nullable":true}},"required":["id","title","content","contentType","timestamp"]}}},"required":["data"]},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string","description":"Error message describing what went wrong"}},"required":["message"]},"CalendarItem":{"type":"object","description":"A calendar event item","properties":{"id":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"event":{"type":"string"},"country":{"type":"string"},"priority":{"type":"number"},"period":{"type":"string"},"actual":{"type":"string"},"forecast":{"type":"string"},"previous":{"type":"string"},"icon":{"type":"string","description":"URL of the icon for the event"}},"required":["id","timestamp","event","country","priority","period","actual","forecast","previous","icon"]},"CalendarResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","description":"A calendar event item","properties":{"id":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"event":{"type":"string"},"country":{"type":"string"},"priority":{"type":"number"},"period":{"type":"string"},"actual":{"type":"string"},"forecast":{"type":"string"},"previous":{"type":"string"},"icon":{"type":"string","description":"URL of the icon for the event"}},"required":["id","timestamp","event","country","priority","period","actual","forecast","previous","icon"]}}},"required":["data"]},"AccountType":{"type":"string","enum":["OGM","V20","CRYPTO","OTMS","OEL","OJ"],"deprecated":true},"schemas-OrderType":{"type":"string","enum":["MARKET","STOP","LIMIT"]},"LatencyRequestBody":{"type":"object","properties":{"clientRoundTripDuration":{"type":"number","title":"Client round-trip duration","description":"Total time in **milliseconds** between submitting the order and receiving an order placement confirmation","example":150.5},"clientStartTime":{"type":"number","title":"Client start timestamp","description":"UTC timestamp in **milliseconds** when the client initiated the request.","example":1622547800123},"clientReceivedTime":{"type":"number","title":"Client received timestamp","description":"UTC timestamp in **milliseconds** when the client received the server’s response.","example":1622547800450},"platform":{"type":"string","title":"Platform name","description":"Name of the platform that client is running on.","example":"ios"},"requestedPrice":{"type":"number"},"orderId":{"type":"string"},"tradingAccountType":{"type":"string","enum":["OGM","V20","CRYPTO","OTMS","OEL","OJ"],"deprecated":true},"event":{"type":"string","enum":["SubmittedOrder","ModifyOrder","CancelOrder","ClosePosition","CloseNetPosition","ReducePosition","ReduceNetPosition","PushToFavourites","RemoveFromFavourites","SaveChartLayout","CreateChartLayout","CloseOrder","ReduceOrder"]},"userId":{"type":"string"},"oandaAgent":{"type":"string"},"engineAfterPreflightDuration":{"type":"number","title":"Engine post-preflight duration","description":"Time in **milliseconds** taken by the trading engine after preflight checks.","example":25.3},"apiVersion":{"type":"string"},"transactionId":{"type":"string"},"size":{"type":"number","title":"Order size","description":"Quantity or size of the order.","example":100},"instrument":{"type":"string"},"vwap":{"type":"string","title":"VWAP","description":"Volume-weighted average price at the time of the order.","example":"252.30","externalDocs":{"description":"VWAP calculation in the platforms-mono repo","url":"https://bitbucket.org/oandacorp/platforms-mono/src/5f05d02c480e54c108ca53963f85a17c3bb310ca/packages/mono-utils/src/computeVolumeWeightedAveragePrice.ts?at=master"}},"type":{"type":"string","enum":["MARKET","STOP","LIMIT"]}},"required":["clientRoundTripDuration","clientStartTime","requestedPrice","clientReceivedTime","event","userId","orderId","oandaAgent","engineAfterPreflightDuration","apiVersion","platform","vwap","instrument","transactionId"]},"CountryCodeResponse":{"type":"object","required":["iso3166"],"properties":{"iso3166":{"type":"string"}}},"CountryCodeResponseV4":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["iso3166"],"properties":{"iso3166":{"type":"string"}}}}},"ViewInstrumentGroupRequestProperties":{"type":"object","properties":{"group":{"type":"string"},"tag":{"type":"string"},"platform":{"type":"string"}},"required":["group","tag","platform"]},"ViewRequestProperties":{"type":"object","properties":{"version":{"type":"string"},"language":{"type":"string"},"platform":{"type":"string"},"server":{"type":"string"},"country":{"type":"string"}}},"TrackViewRequestBody":{"type":"object","properties":{"event":{"type":"string","enum":["View | Instruments Group","View | Orderbook Indicator","View | Account Balance"]},"agent":{"type":"string"},"ip":{"type":"string"},"userId":{"type":"string"},"oandaAgent":{"type":"string"},"engineType":{"type":"string"},"division":{"type":"string"},"accountFund":{"type":"string","enum":["LIVE","DEMO"]},"accountId":{"type":"string"},"tradingAccountType":{"type":"string","enum":["OGM","V20","CRYPTO","OTMS","OEL","OJ"],"deprecated":true},"properties":{"anyOf":[{"type":"object","properties":{"group":{"type":"string"},"tag":{"type":"string"},"platform":{"type":"string"}},"required":["group","tag","platform"]},{"type":"object","properties":{"version":{"type":"string"},"language":{"type":"string"},"platform":{"type":"string"},"server":{"type":"string"},"country":{"type":"string"}}}]}},"required":["event","agent","oandaAgent","engineType","division","properties","userId","ip"]},"RenderingBody":{"type":"object","properties":{"component":{"type":"string","description":"Name of the UI component that will be tracked","enum":["OrderTicket","ChartInitiated","ChartReady"]},"durationMs":{"description":"Render time in milliseconds. It is up to the developer to decide when the rendering starts and when it ends","type":"number"}},"required":["component","durationMs"]},"EventRequestBody":{"type":"object","properties":{"event":{"type":"string"},"agent":{"type":"string"},"ip":{"type":"string"},"oandaAgent":{"type":"string"},"division":{"type":"string"},"properties":{"type":"object"}},"required":["event","properties"]},"SupportOption":{"type":"object","properties":{"type":{"type":"string","description":"The type of support option (e.g., Email, Url).","example":"Email"},"value":{"type":"string","description":"The value associated with the support option (e.g., an email address or a URL).","example":"email@example.com"},"title":{"type":"string","nullable":true,"description":"An optional title for the support option.","example":"help_and_support"},"subtitle":{"type":"string","nullable":true,"description":"An optional subtitle for the support option."},"section":{"type":"string","description":"The section this support option belongs to.","example":"ContactOptions"},"order":{"type":"integer","description":"The display order of this option within its section.","example":1}},"required":["type","value","section","order"]},"SupportInfoResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The type of support option (e.g., Email, Url).","example":"Email"},"value":{"type":"string","description":"The value associated with the support option (e.g., an email address or a URL).","example":"email@example.com"},"title":{"type":"string","nullable":true,"description":"An optional title for the support option.","example":"help_and_support"},"subtitle":{"type":"string","nullable":true,"description":"An optional subtitle for the support option."},"section":{"type":"string","description":"The section this support option belongs to.","example":"ContactOptions"},"order":{"type":"integer","description":"The display order of this option within its section.","example":1}},"required":["type","value","section","order"]}}},"required":["options"],"additionalProperties":false}},"required":["data"]},"HealthCheckResponse":{"type":"object","required":["name","status","startUpAt","current","dependencies"],"additionalProperties":false,"properties":{"name":{"type":"string"},"status":{"type":"string","enum":["OK"]},"startUpAt":{"type":"string","format":"date-time"},"current":{"type":"string","format":"date-time"},"dependencies":{"type":"array","items":{"type":"object"}}}}},"links":{},"callbacks":{},"parameters":{"experimentalAccountsFlag":{"name":"experimentalAccounts","in":"query","description":"Whether or not experimental accounts should be included. Currently these are \"oj\" and \"oj-demo\" accounts.","schema":{"type":"boolean"},"required":false},"userIdPath":{"name":"oneId","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false},"pathServer":{"name":"server","in":"path","description":"Account trading server.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string","enum":["oanda","oanda-demo","otms","v20","v20-demo","oj","oj-demo","opt","ftmo-1"]}},"pathAccountId":{"name":"accountId","in":"path","description":"The user's account identifier.","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"}},"pathInstrument":{"name":"instrument","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false},"pathListId":{"name":"id","in":"path","description":"Instrument list identifier","required":true,"schema":{"type":"string"}},"pathInstrumentId":{"name":"instrumentId","in":"path","description":"Instrument identifier.","required":true,"schema":{"type":"string"}},"parameters-pathInstrumentId":{"name":"instrumentId","in":"path","required":true,"schema":{"type":"string"},"description":"Requested Instrument ID","example":"EURUSD"},"queryFrom":{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d+$"},"description":"UTC timestamp in miliseconds"},"queryTo":{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{13}$"},"description":"UTC timestamp in miliseconds"},"queryGranularity":{"name":"granularity","in":"query","required":true,"schema":{"type":"string","enum":["M1","M5","M15","H1","H4","D1"]}},"queryFromV4":{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+$"},"description":"UTC timestamp in milliseconds. Required if countBack is not provided."},"queryCountBack":{"name":"countBack","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000},"description":"Number of candles to return ending at the 'to' timestamp. Takes precedence over 'from' when both are provided. Only supported for v20/v20-demo servers."},"pathIndex":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"deprecated":false,"allowEmptyValue":false},"queryIncludeDepth":{"name":"includeDepth","in":"query","required":false,"schema":{"type":"boolean"}},"queryIncludeHomeConversions":{"name":"includeHomeConversions","in":"query","required":false,"schema":{"type":"boolean"}},"queryIncludeDailyChanges":{"name":"includeDailyChanges","in":"query","required":false,"schema":{"type":"boolean"}},"queryInstruments":{"name":"instruments","in":"query","required":true,"explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":200}},"queryIncludeLastPrice":{"name":"includeLastPrice","in":"query","required":false,"schema":{"type":"boolean"}},"category":{"name":"category","in":"query","schema":{"type":"string"}},"ids":{"name":"ids","in":"query","explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"}}},"limit":{"name":"limit","in":"query","schema":{"type":"number"},"required":true},"offset":{"name":"offset","in":"query","schema":{"type":"number"},"required":true},"division":{"name":"division","in":"query","schema":{"type":"string"}},"phrase":{"name":"phrase","in":"query","description":"Search phrase","required":true,"schema":{"type":"string"}},"lists":{"name":"lists","in":"query","description":"Filter instruments by list IDs.","explode":false,"style":"form","schema":{"type":"array","items":{"type":"string"}}},"search":{"name":"search","in":"query","required":false,"description":"Optional search query to filter instruments","schema":{"type":"string","minLength":3}},"instrumentSortBy":{"name":"sortBy","in":"query","required":false,"description":"Optional sort criterion for instrument collections. Sorts the returned instruments alphabetically by the chosen display-name type. When omitted the response keeps its default order.","schema":{"type":"string","description":"Display-name field by which a collection of instruments can be sorted.","enum":["SYMBOL","NAME","DESCRIPTION"],"example":"NAME"}},"parameters-pathInstrument":{"name":"instrument","in":"path","required":true,"schema":{"type":"string"},"description":"Resource instrument"},"pathId":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource Id"},"parameters-limit":{"name":"limit","in":"query","schema":{"type":"number"}},"parameters-offset":{"name":"offset","in":"query","schema":{"type":"number"}},"orderType":{"name":"type","in":"query","description":"Order status type.","schema":{"type":"string","enum":["HISTORY","PENDING"]},"required":false},"sort":{"name":"sort","in":"query","description":"Sort direction for ordering the results by date.","schema":{"type":"string","enum":["asc","desc"]},"required":false},"from":{"name":"from","in":"query","description":"Filter results starting from this timestamp. UTC timestamp in milliseconds.","schema":{"type":"string","pattern":"^\\d+$"},"required":false},"to":{"name":"to","in":"query","description":"Filter results up to this timestamp. UTC timestamp in milliseconds.","schema":{"type":"string","pattern":"^\\d+$"}},"status":{"name":"status","in":"query","description":"filter historical orders by status.`PENDING`, `FILLED`, and `CANCELED` statuses are available for both MT5 and v20 orders. All other statuses are applicable to MT5 orders only.","schema":{"type":"string","enum":["FILLED","PENDING","CANCELED","PARTIALLY_FILLED","REPLACED","REJECTED","EXPIRED","REQUEST_ADDED","REQUEST_MODIFY","REQUEST_CANCEL"]},"required":false},"direction":{"name":"direction","in":"query","description":"Direction of an order","schema":{"type":"string","enum":["LONG","SHORT"]},"required":false},"components-parameters-pathInstrument":{"name":"instrument","in":"path","description":"Order identifier.","schema":{"type":"string"},"required":true},"pathOrderId":{"name":"orderId","in":"path","description":"Order identifier.","schema":{"type":"string"},"required":true},"pathTradeId":{"name":"tradeId","in":"path","description":"Trade identifier.","schema":{"type":"string"},"required":true},"transactionType":{"name":"type","in":"query","description":"Transaction type.","explode":false,"style":"form","schema":{"type":"array","items":{"oneOf":[{"type":"string","enum":["MARKET_OPEN","MARKET_CLOSE","STOP_LOSS","TAKE_PROFIT","STOP_OUT","SPLIT"]},{"type":"string","enum":["INDEX_DIVIDEND","DEPOSIT","WITHDRAWAL","DIVIDEND","SPINOFF_ADJ","TAX","TAX_EQUIVALENT","RIGHTS_ADJ","ACQ_MERG_ADJ","BONUS_ADJ","STOCKDIV_ADJ","CREDIT","CORRECTION","BONUS","COMMISSION","FINANCING","SPLIT_ADJ"]}]}},"required":false},"orderIdQuery":{"name":"orderId","in":"query","description":"Orders id.","schema":{"type":"string"},"required":false},"instrumentQuery":{"name":"instrument","in":"query","description":"Instrument symbol.","schema":{"type":"string"},"required":false},"divisionId":{"name":"divisionId","in":"query","description":"The user's division identifier.","required":true,"schema":{"type":"number","description":"OC: 1,\nCANADA: 2,\nOAP: 3,\nOEL: 4,\nTEST: 5,\nECP: 6,\nOAP_CFD: 7,\nOCI: 8,\nOJ_NON_CORPORATE: 9,\nOJ_CORPORATE: 10,\nOAU: 11,\nOEM: 12,\nOGM: 13,\nOT: 14\nOPUC: 17\n"}},"components-parameters-offset":{"name":"offset","in":"query","description":"Pagination offset. The number of items to skip before starting to return results.\n","required":false,"schema":{"type":"integer","minimum":0,"default":0}},"components-parameters-limit":{"name":"limit","in":"query","description":"Maximum number of news items to return per request.\n","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},"dateSortDirection":{"name":"dateSortDirection","in":"query","description":"Sort direction for news items by date.\n- desc: Most recent first (default)\n- asc: Oldest first\n","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},"parameters-from":{"name":"from","in":"query","description":"Filter news starting from this timestamp. UTC timestamp in milliseconds.","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},"parameters-to":{"name":"to","in":"query","description":"Filter news up to this timestamp. UTC timestamp in milliseconds.","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},"language":{"name":"language","in":"query","description":"Filter news by language code (ISO 639-1).\nFor non-OJ divisions: defaults to \"en\" if not specified.\nFor OJ divisions (9, 10): only \"ja\" is supported; other values will result in a 400 error.\n","required":false,"schema":{"type":"string","description":"ISO 639-1 language code","enum":["en","ar","de","ru","zh","ja","nl","fa","fr","el","it","ko","pt","es","tr","pl"]}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}