{"id":106106,"date":"2021-10-08T10:16:00","date_gmt":"2021-10-08T14:16:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=106106"},"modified":"2025-02-12T16:45:57","modified_gmt":"2025-02-12T21:45:57","slug":"how-to-code-a-currency-conversion-order-in-the-web-api","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/","title":{"rendered":"How to Code a Currency Conversion Order in the Web API"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"900\" height=\"506\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg\" alt=\"How to Code a Currency Conversion Order in the Web API\" class=\"wp-image-106317 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg 900w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map-700x394.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map-300x169.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map-768x432.jpg 768w\" data-sizes=\"(max-width: 900px) 100vw, 900px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 900px; aspect-ratio: 900\/506;\" \/><\/figure>\n\n\n\n<p>A Currency Conversion Order lets you convert cash from one currency to another. You would send a buy market order and either specify the amount of currency you want to convert from or the amount of currency you want to convert to. Please note Currency Conversion Orders express size using a monetary value (cash quantity) which are provided on a non-guaranteed basis. The system simulates the order by submitting a larger order size and cancelling it once the specified amount is spent (for buy orders) or collected (for sell orders). The system uses the maximum size that is calculated using the Cash Quantity Estimated Factor, which can be modified in Order Presets from Desktop TWS or IBKR Mobile.<\/p>\n\n\n\n<p>The endpoint <strong>\/portfolio\/{accountId}\/ledger<\/strong> can be used to determine the amount of <strong>settledcash <\/strong>available for each currency in your account. This is the maximum amount of cash to transfer from.<\/p>\n\n\n\n<p>The endpoint&nbsp;<strong>\/iserver\/account\/{accountId}\/orders<\/strong>&nbsp;can be used to send a Currency Conversion Order by sending a BUY order using <strong>orderType<\/strong>: MKT, setting <strong>isCcyConv<\/strong> to true and either specifying the amount of currency transfer from or to. You do not specify the cash quantity for both.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To specify the amount of currency you want to transfer FROM use <strong>fxQty<\/strong>. The estimated amount of cash currency received will be automatically calculated.<\/li>\n\n\n\n<li>To specify the amount of currency you want to transfer TO use <strong>quantity<\/strong>. The estimated amount of cash currency used will be automatically calculated.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-background\" style=\"background-color:#a8efb3; font-size:16px\"><em>Please be sure to authenticate first in order to resolve the below URLs.<\/em><br><em>For authentication details, visit&nbsp;<a href=\"https:\/\/interactivebrokers.github.io\/cpwebapi\/index.html#login\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/interactivebrokers.github.io\/cpwebapi\/index.html#login<\/a><\/em><\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#e4eee5\"><strong>POST<br><\/strong>https:\/\/localhost:5000\/v1\/api\/iserver\/account\/{accountId}\/orders<\/strong><\/p>\n\n\n\n<strong>Request Body:<\/strong><br><br>\n<p>Array () [<\/p>\u202f<ul><li><strong>acctId<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The specified Account order is placed for.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This should be one of the accounts returned by \/iserver\/accounts<\/li>\u202f<li><strong>conid<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contract identifier of the security you want to trade.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You can find the conid with \/iserver\/secdef\/search \u202f<\/li>\u202f<li><strong>secType<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;asset class formatted as conid:type, for example 265598:STK \u202f<\/li>\u202f<li><strong>cOID<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Customer Order Id. Arbitrary string that can be used to identify the order,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.g &#8220;my-fb-order&#8221;.Value must be unique for 24h<\/li>\u202f<li><strong>parentId<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When placing brack orders, specify with the child order.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Must be equal to the cOID of the parent \u202f<\/li>\u202f<li><strong>orderType<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The type of order, example MKT (Market), LMT (Limit).<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use the endpoint \/portal\/iserver\/contract\/{conid}\/info, to determine <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;valid_exchange \u202f<\/li>\u202f<li><strong>listingExchange<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br><strong><span class=\"has-vivid-red-color has-text-color\">required\u202f: false<\/span><\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;By default we use &#8220;SMART&#8221; routing.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use the endpoint: \/portal\/iserver\/contract\/{conid}\/info, to determine<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>valid_exchange<\/strong> \u202f<\/li>\u202f<li><strong>outsideRTH<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>boolean<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set to true if the order can be executed outside regular trading hours<\/li>\u202f<li><strong>price<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>number<\/i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For LMT this is the limit price. For STP this is the stop price<\/li>\u202f<li>\u202f<strong>auxPrice<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>number<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For STOP_LIMIT orders this is the Stop Price \u202f<\/li>\u202f<li><strong>side&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SELL or BUY \u202f<\/li>\u202f<li><strong>ticker<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contract Symbol<\/li>\u202f<li>\u202f <strong>tif<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The time-in-force of an order, example DAY.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use the endpoint \/info-and-rules to determine <strong>tifTypes<\/strong> \u202f<\/li>\u202f<li><strong>referrer<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Order reference<\/li>\u202f<li><strong>quantity<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>number<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the amount or shares of the order. Usually integer, for some special cases<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;can be float numbers \u202f<\/li>\u202f<li><strong>cashQty <\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>number<\/i><br>\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cash Quantity \u2013 used to specify the monetary value of an order instead <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of the number of shares.<\/li>\n  \u202f<li><strong>fxQty<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>number<\/i><br>\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double number, this is the cash quantity field used for  Currency conversion <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orders \u202f<\/li>\u202f<li><strong>useAdaptive<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>boolean<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If true, system will use Adaptive Algo to submit the order,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ref:\u202f<a href=\"https:\/\/www.interactivebrokers.com\/en\/index.php?f=19091\">https:\/\/www.interactivebrokers.com\/en\/index.php?f=19091<\/a><\/li>\u202f<li><strong>isCcyConv<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>boolean<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set to true for a FX conversion order<\/li>\u202f<li><strong>allocationMethod<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the allocation method when placing an order using an FA account<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for a group<\/li>\u202f<li><strong>isClose<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>boolean<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set to true if order is closing an existing position<\/li>\u202f<li><strong>isSingleGroup<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>boolean<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set to true for each order assigned to the same OCA Group. \u202f<\/li>\u202f<\/ul>]\n\n\n\n<p>&nbsp;&nbsp;<\/p>\n\n\n\n<p><strong>Response:<\/strong><br>\n<br>\nArray () [<\/p>\u202f<ul><li><strong>Id<\/strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>string<\/i><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;order_id = system generated order Id(s) for each order. local_order_id =  cOID. <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent_order_id = order_Id of the parent order.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/li>\u202f<li><strong>message&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/strong><em>Array of strings<\/em><br>\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the message is a question, you must use the endpoint \/iserver\/reply\/{replyid} to <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;confirm the message and submit the order.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u202f<\/li>\n\u202f<\/ul>]\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#a8efb3; font-size:16px\"><em>Please be sure to authenticate first in order to resolve the below URLs.<\/em><br><em>For authentication details, visit&nbsp;<a href=\"https:\/\/interactivebrokers.github.io\/cpwebapi\/index.html#login\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/interactivebrokers.github.io\/cpwebapi\/index.html#login<\/a><\/em><\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<p>Use the endpoint <strong>\/portfolio\/{accountId}\/ledger<\/strong> to see how much <strong>settledCash<\/strong> is available.<\/p>\n\n\n\n<p><strong>Request:<\/strong><\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#e4eee5\"><strong>POST<br>https:\/\/localhost:5000\/v1\/api\/portfolio\/DU***14\/ledger<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Response:\n{\n  \"EUR\": {\n    \"commoditymarketvalue\": 0,\n    \"futuremarketvalue\": 0,\n    \"settledcash\": -51518.95,\n    \"exchangerate\": 1.155175,\n    \"sessionid\": 2,\n    \"cashbalance\": -51518.95,\n    \"corporatebondsmarketvalue\": 0,\n    \"warrantsmarketvalue\": 0,\n    \"netliquidationvalue\": 50828.85,\n    \"interest\": 0,\n    \"unrealizedpnl\": 7352.49,\n    \"stockmarketvalue\": 102347.8,\n    \"moneyfunds\": 0,\n    \"currency\": \"EUR\",\n    \"realizedpnl\": 0,\n    \"funds\": 0,\n    \"acctcode\": \"DU***14\",\n    \"issueroptionsmarketvalue\": 0,\n    \"key\": \"LedgerList\",\n    \"timestamp\": 1633634484,\n    \"severity\": 0,\n    \"stockoptionmarketvalue\": 0,\n    \"tbondsmarketvalue\": 0,\n    \"futureoptionmarketvalue\": 0,\n    \"cashbalancefxsegment\": 0,\n    \"secondkey\": \"EUR\",\n    \"tbillsmarketvalue\": 0,\n    \"dividends\": 0\n  },\n  \"USD\": {\n    \"commoditymarketvalue\": 0,\n    \"futuremarketvalue\": 0,\n    \"settledcash\": 8877099,\n    \"exchangerate\": 1,\n    \"sessionid\": 2,\n    \"cashbalance\": 8877099,\n    \"corporatebondsmarketvalue\": 1040.03,\n    \"warrantsmarketvalue\": 0,\n    \"netliquidationvalue\": 10503973,\n    \"interest\": 0,\n    \"unrealizedpnl\": 623677.25,\n    \"stockmarketvalue\": 1622525.2,\n    \"moneyfunds\": 0,\n    \"currency\": \"USD\",\n    \"realizedpnl\": 805.78,\n    \"funds\": 0,\n    \"acctcode\": \"DU***14\",\n    \"issueroptionsmarketvalue\": 0,\n    \"key\": \"LedgerList\",\n    \"timestamp\": 1633634484,\n    \"severity\": 0,\n    \"stockoptionmarketvalue\": 0,\n    \"tbondsmarketvalue\": 1181.9,\n    \"futureoptionmarketvalue\": 0,\n    \"cashbalancefxsegment\": 0,\n    \"secondkey\": \"USD\",\n    \"tbillsmarketvalue\": 0,\n    \"dividends\": 0\n  },\n  \"BASE\": {\n    \"commoditymarketvalue\": 0,\n    \"futuremarketvalue\": 0,\n    \"settledcash\": 8712214,\n    \"exchangerate\": 1,\n    \"sessionid\": 2,\n    \"cashbalance\": 8712214,\n    \"corporatebondsmarketvalue\": 1040.03,\n    \"warrantsmarketvalue\": 0,\n    \"netliquidationvalue\": 10458676,\n    \"interest\": -182.53033,\n    \"unrealizedpnl\": 629821.7,\n    \"stockmarketvalue\": 1742298.2,\n    \"moneyfunds\": 0,\n    \"currency\": \"BASE\",\n    \"realizedpnl\": 805.78,\n    \"funds\": 0,\n    \"acctcode\": \"DU***14\",\n    \"issueroptionsmarketvalue\": 0,\n    \"key\": \"LedgerList\",\n    \"timestamp\": 1633634484,\n    \"severity\": 0,\n    \"stockoptionmarketvalue\": 0,\n    \"tbondsmarketvalue\": 1181.9,\n    \"futureoptionmarketvalue\": 0,\n    \"cashbalancefxsegment\": 0,\n    \"secondkey\": \"BASE\",\n    \"tbillsmarketvalue\": 0,\n    \"dividends\": 0\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>Submitting a Currency Conversion Order to transfer USD to EUR by specifying <strong>fxQty = USD<\/strong>. The amount of EUR received will be calculated.<\/p>\n\n\n\n<p><strong>Request:<\/strong><\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#e4eee5\"><strong>POST<\/strong> <br>https:\/\/localhost:5000\/v1\/api\/iserver\/account\/DU***14\/orders<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Request Body: \n{ \n\u202f\u202f\u201corders\u201d: &#91; \n\u202f\u202f{ \n\u202f\u202f\u202f\u202f \u201cacctId\u201d: \u201cDU***14\u201d, \n\u202f\u202f\u202f\u202f \u201ccOID\u201d: \u201c66827401\u201d, \n\u202f\u202f\u202f\u202f \u201cconid\u201d: 12087792, \n\u202f\u202f\u202f\u202f \u201cfxQty\u201d: 10000, \n     \u201cisCcyConv\u201d: true \n\u202f\u202f\u202f\u202f \u201corderType\u201d: \u201cMKT\u201d, \n\u202f\u202f\u202f\u202f \u201cside\u201d: \u201cBUY\u201d, \n\u202f\u202f\u202f\u202f \u201cticker\u201d: \u201cEUR.USD\u201d, \n\u202f\u202f\u202f\u202f \u201ctif\u201d: \u201cDAY\u201d, \n\u202f\u202f\u202f\u202f \u201creferrer\u201d: \u201ctestCcy1\u201d \n\u202f\u202f} \n\u202f] \n} \n \nResponse: \n&#91; \n\u202f\u202f{ \n\u202f\u202f\u202f\u202f\u201corder_id\u201d: \u201c194938080\u201d, \n\u202f\u202f\u202f\u202f\u201corder_status\u201d: \u201cFilled\u201d, \n\u202f\u202f\u202f\u202f\u201clocal_order_id\u201d: \u201c66827401\u201d \n\u202f\u202f\u202f\u202f\u201cwarning_message\u201d: \u201c399\u201d \n    \u201ctext\u201d: \u201cOrder Message:SELL 10K USD EUR.USD ForexWarning: Your order size is below the EUR 20000 IdealPro minimum and will be routed as an odd lot order\u201d \n    \u201cencrypt_message\":\"1\u201d \n\u202f\u202f} \n] <\/code><\/pre>\n\n\n\n<p>Submitting a Currency Conversion Order to transfer USD to EUR by specifying&nbsp;<strong>quantity<\/strong>&nbsp;=&nbsp;EUR.&nbsp;The amount of USD needed will be calculated.<\/p>\n\n\n\n<p><strong>Request:<\/strong>&nbsp;<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#e4eee5\"><strong>POST<\/strong>&nbsp;<br>https:\/\/localhost:5000\/v1\/api\/iserver\/account\/DU***14\/orders<\/strong>&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Request Body: \n{ \n\u202f\u202f\u201corders\u201d: &#91; \n\u202f\u202f{ \n\u202f\u202f\u202f\u202f \u201cacctId\u201d: \u201cDU***14\u201d, \n\u202f\u202f\u202f\u202f \u201ccOID\u201d: \u201c66827402\u201d, \n\u202f\u202f\u202f\u202f \u201cconid\u201d: 12087792, \n     \u201cisCcyConv\u201d: true \n\u202f\u202f\u202f\u202f \u201corderType\u201d: \u201cMKT\u201d, \n\u202f\u202f\u202f\u202f \u201cquantity\u201d: 10000, \n\u202f\u202f\u202f\u202f \u201cside\u201d: \u201cBUY\u201d, \n\u202f\u202f\u202f\u202f \u201cticker\u201d: \u201cEUR.USD\u201d, \n\u202f\u202f\u202f\u202f \u201ctif\u201d: \u201cDAY\u201d, \n\u202f\u202f\u202f\u202f \u201creferrer\u201d: \u201ctestCcy2\u201d \n\u202f\u202f} \n\u202f] \n} \n \nResponse: \n&#91; \n\u202f\u202f{ \n\u202f\u202f\u202f\u202f\u201corder_id\u201d: \u201c194938091\u201d, \n\u202f\u202f\u202f\u202f\u201corder_status\u201d: \u201cFilled\u201d, \n\u202f\u202f\u202f\u202f\u201clocal_order_id\u201d: \u201c66827402\u201d \n\u202f\u202f\u202f\u202f\u201cwarning_message\u201d: \u201c399\u201d \n    \u201ctext\u201d: \u201cOrder Message:\\nBUY 10K USD EUR.USD ForexWarning: Your order size is below the EUR 20000 IdealPro minimum and will be routed as an odd lot order\u201d \n    \u201cencrypt_message\":\"1\u201d \n\u202f\u202f} \n] \n\n \n\n<\/code><\/pre>\n\n\n\n<p>Once&nbsp;order&nbsp;is filled use the endpoint&nbsp;<strong>\/portfolio\/{accountId}\/ledger<\/strong>&nbsp;to see the&nbsp;updated&nbsp;<strong>settledCash<\/strong>&nbsp;for&nbsp;each&nbsp;corresponding currency.&nbsp;<\/p>\n\n\n\n<p><strong>Request:<\/strong>&nbsp;<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#e4eee5\"><strong>POST<\/strong>&nbsp;<br><strong>https:\/\/localhost:5000\/v1\/api\/portfolio\/DU***14\/ledger<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Response: \n\n{ \n\n  \"EUR\": { \n\n    \"commoditymarketvalue\": 0, \n\n    \"futuremarketvalue\": 0, \n\n    \"settledcash\": -32863.95, \n\n    \"exchangerate\": 1.155135, \n\n    \"sessionid\": 24, \n\n    \"cashbalance\": -32863.95, \n\n    \"corporatebondsmarketvalue\": 0, \n\n    \"warrantsmarketvalue\": 0, \n\n    \"netliquidationvalue\": 69471.78, \n\n    \"interest\": 0, \n\n    \"unrealizedpnl\": 7340.42, \n\n    \"stockmarketvalue\": 102335.73, \n\n    \"moneyfunds\": 0, \n\n    \"currency\": \"EUR\", \n\n    \"realizedpnl\": 0, \n\n    \"funds\": 0, \n\n    \"acctcode\": \"DU***14\", \n\n    \"issueroptionsmarketvalue\": 0, \n\n    \"key\": \"LedgerList\", \n\n    \"timestamp\": 1633636630, \n\n    \"severity\": 0, \n\n    \"stockoptionmarketvalue\": 0, \n\n    \"tbondsmarketvalue\": 0, \n\n    \"futureoptionmarketvalue\": 0, \n\n    \"cashbalancefxsegment\": 0, \n\n    \"secondkey\": \"EUR\", \n\n    \"tbillsmarketvalue\": 0, \n\n    \"dividends\": 0 \n\n  }, \n\n  \"USD\": { \n\n    \"commoditymarketvalue\": 0, \n\n    \"futuremarketvalue\": 0, \n\n    \"settledcash\": 8855543, \n\n    \"exchangerate\": 1, \n\n    \"sessionid\": 24, \n\n    \"cashbalance\": 8855543, \n\n    \"corporatebondsmarketvalue\": 1040.03, \n\n    \"warrantsmarketvalue\": 0, \n\n    \"netliquidationvalue\": 10478366, \n\n    \"interest\": 0, \n\n    \"unrealizedpnl\": 619627.5, \n\n    \"stockmarketvalue\": 1618474.2, \n\n    \"moneyfunds\": 0, \n\n    \"currency\": \"USD\", \n\n    \"realizedpnl\": 805.78, \n\n    \"funds\": 0, \n\n    \"acctcode\": \"DU***14\", \n\n    \"issueroptionsmarketvalue\": 0, \n\n    \"key\": \"LedgerList\", \n\n    \"timestamp\": 1633636630, \n\n    \"severity\": 0, \n\n    \"stockoptionmarketvalue\": 0, \n\n    \"tbondsmarketvalue\": 1183.05, \n\n    \"futureoptionmarketvalue\": 0, \n\n    \"cashbalancefxsegment\": 0, \n\n    \"secondkey\": \"USD\", \n\n    \"tbillsmarketvalue\": 0, \n\n    \"dividends\": 0 \n\n  }, \n\n  \"BASE\": { \n\n    \"commoditymarketvalue\": 0, \n\n    \"futuremarketvalue\": 0, \n\n    \"settledcash\": 8712207, \n\n    \"exchangerate\": 1, \n\n    \"sessionid\": 24, \n\n    \"cashbalance\": 8712207, \n\n    \"corporatebondsmarketvalue\": 1040.03, \n\n    \"warrantsmarketvalue\": 0, \n\n    \"netliquidationvalue\": 10454584, \n\n    \"interest\": -182.44173, \n\n    \"unrealizedpnl\": 625750.2, \n\n    \"stockmarketvalue\": 1738211.8, \n\n    \"moneyfunds\": 0, \n\n    \"currency\": \"BASE\", \n\n    \"realizedpnl\": 805.78, \n\n    \"funds\": 0, \n\n    \"acctcode\": \"DU***14\", \n\n    \"issueroptionsmarketvalue\": 0, \n\n    \"key\": \"LedgerList\", \n\n    \"timestamp\": 1633636630, \n\n    \"severity\": 0, \n\n    \"stockoptionmarketvalue\": 0, \n\n    \"tbondsmarketvalue\": 1183.05, \n\n    \"futureoptionmarketvalue\": 0, \n\n    \"cashbalancefxsegment\": 0, \n\n    \"secondkey\": \"BASE\", \n\n    \"tbillsmarketvalue\": 0, \n\n    \"dividends\": 0 \n\n  } \n\n} \n\n <\/code><\/pre>\n\n\n\n<p>If you have any further questions or issues creating OCA orders, please reach out to the API Group, ref:&nbsp;<a href=\"https:\/\/www.interactivebrokers.com\/en\/index.php?f=47047\">https:\/\/www.interactivebrokers.com\/en\/index.php?f=47047<\/a>.<\/p>\n\n\n\n<p>Visit the IBKR API Center for Downloads, Resources, and Technical Details:<br><a href=\"https:\/\/www.interactivebrokers.com\/en\/trading\/ib-api.php\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>https:\/\/www.interactivebrokers.com\/en\/trading\/ib-api.php<\/strong><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Currency Conversion Order lets you convert cash from one currency to another. You would send a buy market order and either specify the amount of currency you want to convert from or the amount of currency you want to convert to.<\/p>\n","protected":false},"author":614,"featured_media":106317,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,340,343,338,341,352,344,9763],"tags":[851,10477,865,575,9821,9552],"contributors-categories":[13576],"class_list":{"0":"post-106106","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-api-development","9":"category-programing-languages","10":"category-ibkr-quant-news","11":"category-quant-development","12":"category-quant-north-america","13":"category-quant-regions","14":"category-rest-development","15":"tag-algo-trading","16":"tag-code-a-currency-conversion-order","17":"tag-github","18":"tag-ibkr-api","19":"tag-rest-development","20":"tag-web-api","21":"contributors-categories-interactive-brokers"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Code a Currency Conversion Order in the Web API<\/title>\n<meta name=\"description\" content=\"A Currency Conversion Order lets you convert cash from one currency to another. You would send a buy market order and either specify the amount of...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/106106\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Code a Currency Conversion Order in the Web API | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"A Currency Conversion Order lets you convert cash from one currency to another. You would send a buy market order and either specify the amount of currency you want to convert from or the amount of currency you want to convert to.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-08T14:16:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-12T21:45:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"IBKR API\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"IBKR API\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"IBKR API\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/a70292c923c6262ec34ebe59e937f0cc\"\n\t            },\n\t            \"headline\": \"How to Code a Currency Conversion Order in the Web API\",\n\t            \"datePublished\": \"2021-10-08T14:16:00+00:00\",\n\t            \"dateModified\": \"2025-02-12T21:45:57+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/\"\n\t            },\n\t            \"wordCount\": 3272,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/10\\\/digital-map.jpg\",\n\t            \"keywords\": [\n\t                \"Algo Trading\",\n\t                \"Code a Currency Conversion Order\",\n\t                \"GitHub\",\n\t                \"IBKR API\",\n\t                \"REST Development\",\n\t                \"Web API\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"IBKR API Development\",\n\t                \"Programming Languages\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant North America\",\n\t                \"Quant Regions\",\n\t                \"REST Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/\",\n\t            \"name\": \"How to Code a Currency Conversion Order in the Web API | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/10\\\/digital-map.jpg\",\n\t            \"datePublished\": \"2021-10-08T14:16:00+00:00\",\n\t            \"dateModified\": \"2025-02-12T21:45:57+00:00\",\n\t            \"description\": \"A Currency Conversion Order lets you convert cash from one currency to another. You would send a buy market order and either specify the amount of currency you want to convert from or the amount of currency you want to convert to.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/how-to-code-a-currency-conversion-order-in-the-web-api\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/10\\\/digital-map.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/10\\\/digital-map.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 506,\n\t            \"caption\": \"Currency\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/a70292c923c6262ec34ebe59e937f0cc\",\n\t            \"name\": \"IBKR API\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/ibkrapi\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Code a Currency Conversion Order in the Web API","description":"A Currency Conversion Order lets you convert cash from one currency to another. You would send a buy market order and either specify the amount of...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/106106\/","og_locale":"en_US","og_type":"article","og_title":"How to Code a Currency Conversion Order in the Web API | IBKR Quant Blog","og_description":"A Currency Conversion Order lets you convert cash from one currency to another. You would send a buy market order and either specify the amount of currency you want to convert from or the amount of currency you want to convert to.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/","og_site_name":"IBKR Campus US","article_published_time":"2021-10-08T14:16:00+00:00","article_modified_time":"2025-02-12T21:45:57+00:00","og_image":[{"width":900,"height":506,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg","type":"image\/jpeg"}],"author":"IBKR API","twitter_card":"summary_large_image","twitter_misc":{"Written by":"IBKR API","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/#article","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/"},"author":{"name":"IBKR API","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/a70292c923c6262ec34ebe59e937f0cc"},"headline":"How to Code a Currency Conversion Order in the Web API","datePublished":"2021-10-08T14:16:00+00:00","dateModified":"2025-02-12T21:45:57+00:00","mainEntityOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/"},"wordCount":3272,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg","keywords":["Algo Trading","Code a Currency Conversion Order","GitHub","IBKR API","REST Development","Web API"],"articleSection":["Data Science","IBKR API Development","Programming Languages","Quant","Quant Development","Quant North America","Quant Regions","REST Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/","url":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/","name":"How to Code a Currency Conversion Order in the Web API | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/#primaryimage"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg","datePublished":"2021-10-08T14:16:00+00:00","dateModified":"2025-02-12T21:45:57+00:00","description":"A Currency Conversion Order lets you convert cash from one currency to another. You would send a buy market order and either specify the amount of currency you want to convert from or the amount of currency you want to convert to.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/how-to-code-a-currency-conversion-order-in-the-web-api\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg","width":900,"height":506,"caption":"Currency"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/a70292c923c6262ec34ebe59e937f0cc","name":"IBKR API","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/ibkrapi\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/digital-map.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/106106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/614"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=106106"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/106106\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/106317"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=106106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=106106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=106106"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=106106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}