Build your application to connect to our investment platform and the 250,000 traders connected to it.
This page contains FIXML examples of trades that can be made through the Credence Global Bank Invest API. Currently OTO and OCO orders are unsupported by the API. You can use accounts/:id/orders/preview to preview orders and accounts/:id/orders to check the status and place orders.
Common stock actions are delimited by the FIXML attribute Side.
Example Place a day order to buy 1 share of F at market price on account 12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="1" Side="1" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Example Place a day order to sell 1 share of F at market price on account 12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="1" Side="2" Acct="12345678">
<Instrmt SecTyp="CS" Sym="IBM"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Example Place a day order to sell short 1 share of F at $22.00 on account 12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="2" Side="5" Px="22" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Example Place a day order to buy to cover 1 share of F at $13 on account 12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="2" Side="1" AcctTyp="5" Px="13" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
You can cancel/replace any open order.
Example Place a new day order to buy 1 share of F at a limit price of $15 on account 12345678 replacing the original order number SVI-12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<OrdCxlRplcReq TmInForce="0" Typ="2" Side="1" Px="15" Acct="12345678" OrigID="SVI-12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</OrdCxlRplcReq>
</FIXML>
Example Cancel the order SVI-12345678 on account 12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<OrdCxlReq TmInForce="0" Typ="2" Side="1" OrigID="SVI-12345678" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</OrdCxlReq>
</FIXML>
With option actions the FIXML attribute Side and PosEfct are the key differentiators.
Example Place a limit order buying to open 4 contracts of IBM Jan 18, 2014 $190 Call at a limit of 21.00 on account 12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="2" Side="1" Px="21.00" PosEfct="O" Acct="12345678">
<Instrmt CFI="OC" SecTyp="OPT" MatDt="2014-01-18T00:00:00.000-05:00" StrkPx="190" Sym="IBM"/>
<OrdQty Qty="4"/>
</Order>
</FIXML>
Example Place a 5.10 limit order to sell to open 7 contracts of the COST Jan 19, 2013 $90.00 Call on account 12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="1" Typ="2" Side="2" Px="5.10" PosEfct="O" Acct="12345678">
<Instrmt CFI="OC" SecTyp="OPT" MatDt="2013-01-19T00:00:00.000-05:00" StrkPx="90.00" Sym="COST"/>
<OrdQty Qty="7"/>
</Order>
</FIXML>
Example Place a market order buying to close 1 contract of F at a limit of .19 with strike price $16, expiring Feb. 11th 2011 on account 12345678
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="2" Side="1" Px=".19" PosEfct="C" Acct="12345678">
<Instrmt CFI="OC" SecTyp="OPT" MatDt="2011-02-11T00:00:00.000-05:00" StrkPx="16" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Example Place a market order selling to close 1 contract of F at a limit of .19 with strike price $16, expiring Feb. 11th 2011 on account 12345678
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="2" Side="2" Px=".19" PosEfct="C" Acct="12345678">
<Instrmt CFI="OC" SecTyp="OPT" MatDt="2011-02-11T00:00:00.000-05:00" StrkPx="16" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Example Place a change order buying to open 4 contracts of IBM Jan 18, 2014 $190 Call at a limit of 21.20 on account 12345678 for order id SVI-56657005.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<OrdCxlRplcReq TmInForce="0" Typ="2" Side="1" Px="21.20" PosEfct="O"
Acct="12345678" OrigID="SVI-56657005">
<Instrmt CFI="OC" SecTyp="OPT" MatDt="2014-01-18T00:00:00.000-05:00" StrkPx="190" Sym="IBM"/>
<OrdQty Qty="4"/>
</OrdCxlRplcReq>
</FIXML>
Example Place a cancel request on order that is buying to open 4 contracts of IBM Jan 18, 2014 $190 Call at a limit of 21.20 on account 12345678 for order id SVI-56657005/2.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<OrdCxlReq TmInForce="0" Typ="2" Side="1" OrigID="SVI-56657005/2" Acct="12345678">
<Instrmt CFI="OC" SecTyp="OPT" MatDt="2014-01-18T00:00:00.000-05:00" StrkPx="190" Sym="IBM"/>
<OrdQty Qty="4"/>
</OrdCxlReq>
</FIXML>
For multi-leg orders, leg information is repeated for each leg of the order (see example below). Note: Multi-leg orders can be placed as:
Example Place an IBM Call spread order, buying 4 contracts to open the Jan 18, 2014 $190 Call and selling 4 contracts to open the Jan 18, 2014 $200 Call at a 3.10 debit good for the day.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<NewOrdMleg TmInForce="0" Px="-3.10" OrdTyp="2" Acct="12345678">
<Ord OrdQty="4" PosEfct="O">
<Leg Side="1" Strk="190" Mat="2014-01-18T00:00:00.000-05:00" MMY="201401" SecTyp="OPT" CFI="OC" Sym="IBM"/>
</Ord>
<Ord OrdQty="4" PosEfct="O">
<Leg Side="2" Strk="200" Mat="2014-01-18T00:00:00.000-05:00" MMY="201401" SecTyp="OPT" CFI="OC" Sym="IBM"/>
</Ord>
</NewOrdMleg>
</FIXML>
Example Request to change the IBM call spread (from the new order example above).
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<MlegOrdCxlRplc TmInForce="0" Px="-3.60" OrdTyp="2" Acct="12345678" OrigClOrdID="SVI-56656615">
<Ord OrdQty="4" PosEfct="O">
<Leg Side="1" Strk="190" Mat="2014-01-18T00:00:00.000-05:00" MMY="201401" SecTyp="OPT" CFI="OC" Sym="IBM"/>
</Ord>
<Ord OrdQty="4" PosEfct="O">
<Leg Side="2" Strk="200" Mat="2014-01-18T00:00:00.000-05:00" MMY="201401" SecTyp="OPT" CFI="OC" Sym="IBM"/>
</Ord>
</MlegOrdCxlRplc>
</FIXML>
Example Request to cancel the IBM call spread (from the new order example above).
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<OrdCxlReq OrigID="SVI-56656487" Acct="12345678">
<Instrmt SecTyp="MLEG" Sym="IBM"/>
</OrdCxlReq>
</FIXML>
A stop-loss order set at a price or percentage level below or above the current market price. The trailing stop price is dynamically adjusted as the price fluctuates, triggering when the price moves enough to trigger the trailing price that was specified.
Example Place a .50 buy trailing stop on 1 share of IBM (market order will trigger if current price of IBM rises by .50 for current price. If IBM moves down, trigger price will also move down.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="P" Side="1" Acct="12345678" ExecInst="a">
<PegInstr OfstTyp="0" PegPxTyp="1" OfstVal=".50"/>
<Instrmt SecTyp="CS" Sym="IBM"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Example Place a 5% buy trailing stop on 1 share of COST (Note: OfstTyp="1" for percentage trailing stop vs. OfstTyp="0" for price value trailing stop).
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="1" Typ="P" Side="1" Acct="12345678" ExecInst="a">
<PegInstr OfstTyp="1" PegPxTyp="1" OfstVal="5"/>
<Instrmt SecTyp="CS" Sym="COST"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Example Place a 2.00 sell trailing stop on 1 share of F.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="P" Side="2" Acct="12345678" ExecInst="a">
<PegInstr OfstTyp="0" PegPxTyp="1" OfstVal="-2"/>
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Example Place cancel request on buy trailing stop order.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<OrdCxlRplcReq TmInForce="1" Typ="P" Side="1" OrigID="SVI-56687280"
Acct="12345678" ExecInst="a">
<PegInstr OfstTyp="0" PegPxTyp="1" OfstVal="1.40"/>
<Instrmt SecTyp="CS" Sym="COST"/>
<OrdQty Qty="1"/>
</OrdCxlRplcReq>
</FIXML>
Example Place cancel request on buy trailing stop order.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<OrdCxlReq TmInForce="1" Typ="P" Side="1" OrigID="SVI-56686870" Acct="12345678">
<PegInstr OfstTyp="0" PegPxTyp="1" OfstVal="2"/>
<Instrmt SecTyp="CS" Sym="COST"/>
<OrdQty Qty="1"/>
</OrdCxlReq>
</FIXML>
Different trade price types are delimited by FIXML attribute Typ. (or OrdTyp for multi-leg option orders).
An order to buy or sell an investment immediately at the best available current price.
Example Place a day order to buy 1 share of F at market price on account 12345678
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="1" Side="1" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
An order placed with a brokerage to buy or sell a set number of shares at a specified price or better.
Example Place a day order to buy 1 share of F at a limit price of $15 on account 12345678
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="2" Side="1" Px="15" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/> </Order>
</FIXML>
An order to buy or sell a security when its price surpasses a particular point, thus ensuring a greater probability of achieving a predetermined entry or exit price. Once the price surpasses the predefined entry/exit point, the stop order becomes a market order.
Example Place a day order to buy 1 share of F with a stop price of $18 on account 12345678
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="3" Side="1" StopPx="18" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
A stop-limit order will be executed at a specified price (or better) after a given stop price has been reached. Once the stop price is reached, the stop-limit order becomes a limit order to buy (or sell) at the limit price or better.
Example Place a day order to buy 1 share of F with a stop price of $18 and a limit price of $19 on account 12345678.
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="4" Side="1" Px="19" StopPx="18" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
Trade terms are delimited by the FIXML attribute TmInForce.
Any order to buy or sell a security that automatically expires if not executed on the day the order is placed.
Example Place a day order to buy 1 share of F at market price on account 12345678
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="0" Typ="1" Side="1" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
A market order to be executed as near to the end of the exchange day as possible. This is only possible on common stock orders.
Example Place market on close order to buy 1 share of F on account 12345678
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="7" Typ="1" Side="1" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/>
<OrdQty Qty="1"/>
</Order>
</FIXML>
An order to buy or sell that remains open in your account for 60 calendar days from the original date placed, unless executed or canceled. Changes or edits to a GTC order will not affect the original order date.
Example Place a good 'til canceled order to buy 1 share of F at a limit price of $18 on account 12345678
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
<Order TmInForce="1" Typ="2" Side="1" Px="18" Acct="12345678">
<Instrmt SecTyp="CS" Sym="F"/> <OrdQty Qty="1"/>
</Order>
</FIXML>
Any mention of actual symbols are to be used for coding purposes only and do not imply a recommendation or solicitation to buy or sell a particular security or to engage in any particular investment strategy.
At the time of publication and in the preceding month, Credence Global Bank Invest did not have ownership greater than 1% in any stocks mentioned here and does not have any other actual, material conflict of interest known at the time of publication.
Credence Global Bank Invest did not receive compensation from a public offering or from investment banking services related to any companies mentioned here within the past 12 months, or expects to receive any in the next 3 months. Credence Global Bank Invest did not engage in market making in the securities mentioned here.
Credence Global Bank Invest Securities' background can be found at FINRA's BrokerCheck. Options involve risk and are not suitable for all investors.
Review the Characteristics and Risks of Standardized Options brochure before you begin trading options. Options investors may lose the entire amount of their investment in a relatively short period of time.