POST accounts/:id/orders/preview{.format}

Description

This call will allow you to preview an order prior to actually placing it. This does not place the order.

Authentication Required
Yes OAuth 1.0a
URI Parameters
id a valid account number
format a response format, default is xml (See Response Structure)
Example URL
https://api.tradeking.com/v1/accounts/12345678/orders/preview.xml

Special Considerations

The request for order preview must be FIXML format submitted within the message body. Please visit the FIXML and Trading pages for more information on how to place orders.

Data Fields

In addition to quote information relating to the order, you may receive fields outlined in the table below.

Data Tag Description
estcommission Estimated commission for this order
marginrequirement Estimated margin requirement for trade (for margin accounts)
principal Estimated total cost (positive) or proceeds (negative) from order.
secfee Estimate of any SEC sale fee to be assessed on the order.
warningtext Description of a possible error in the order

Request Example

POST /v1/accounts/123456878/orders/preview.xml HTTP/1.1
Authorization: OAuth
  oauth_consumer_key="672e71387c0a126f4e13296ecfb2b7bc",
  oauth_nonce="cfdb7f42de425d94fbc24c11a920c33e",
  oauth_signature="Vfm148kAgBZ6azEHqds43aY2UsEg3D",
  oauth_signature_method="HMAC-SHA1",
  oauth_timestamp="1306871932",
  oauth_token="819682555b63ab8bd90a4138138e7365",
  oauth_version="1.0"
Connection: close
Host: api.tradeking.com

<?xml version="1.0" encoding="UTF-8"?>
<FIXML xmlns="http://www.fixprotocol.org/FIXML-5-0-SP2">
  <Order TmInForce="0" Typ="1" Side="1" Acct="12345678">
    <Instrmt SecTyp="CS" Sym="GE"/>
    <OrdQty Qty="1"/>
  </Order>
</FIXML>

Response Example

<?xml version="1.0" encoding="UTF-8"?>
<response id="77cf30da:12e0091b2c0:-56c9">
  <estcommission>4.95</estcommission>
  <marginrequirement>0.0</marginrequirement>
  <principal>1.64</principal>
  <quotes>
    <instrumentquote>
      <displaydata>
        <askprice>1.79</askprice>
        <asksize>6,814</asksize>
        <bidprice>1.78</bidprice>
        <bidsize>3,375</bidsize>
        <change>0.04</change>
        <contracthigh/>
        <contractlow/>
        <contractsize/>
        <delta/>
        <desc>SIRIUS XM RADIO INC</desc>
        <dividendamount>0.00</dividendamount>
        <dividendexdate>2005-06-01</dividendexdate>
        <dividendpaydate/>
        <dividendyield>0.00%</dividendyield>
        <earningspershare>-0.03</earningspershare>
        <exch>NSD</exch>
        <expiry/>
        <gamma/>
        <high52price>1.80</high52price>
        <highprice>1.80</highprice>
        <impvolatility/>
        <lastclosingprice>1.75</lastclosingprice>
        <lastprice>1.78</lastprice>
        <low52price>0.79</low52price>
        <lowprice>1.76</lowprice>
        <nav/>
        <openinterest/>
        <openprice>1.77</openprice>
        <optval/>
        <optiontype/>
        <pctchange>2.00%</pctchange>
        <priceearningsratio>0.00</priceearningsratio>
        <rho/>
        <sessionvolume>20,845,145</sessionvolume>
        <strike/>
        <symbol>SIRI</symbol>
        <theta/>
        <unknownsymbol>false</unknownsymbol>
        <vega/>
        <volatility/>
        <volume>21,261,045</volume>
      </displaydata>
      <greeks/>
      <instrument>
        <desc>SIRIUS XM RADIO INC</desc>
        <exch>NSD</exch>
        <sectyp>CS</sectyp>
        <sym>SIRI</sym>
      </instrument>
      <quote>
        <askprice>1.79</askprice>
        <bidprice>1.78</bidprice>
        <change>0.035</change>
        <extendedquote>
          <asksize>6814</asksize>
          <bidsize>3375</bidsize>
          <dividenddata>
            <amt>0.0</amt>
            <exdate>2005-06-01T00:00:00-04:00</exdate>
            <yield>4.9E-324</yield>
          </dividenddata>
          <earningspershare>-0.03</earningspershare>
          <high52price>1.8</high52price>
          <highprice>1.8</highprice>
          <low52price>0.79</low52price>
          <lowprice>1.76</lowprice>
          <openprice>1.77</openprice>
          <prevclose>1.75</prevclose>
          <priceearningsratio>0.0</priceearningsratio>
          <sessionvolume>20845145</sessionvolume>
          <volume>21261045</volume>
        </extendedquote>
        <lastprice>1.785</lastprice>
        <pctchange>2.0</pctchange>
      </quote>
      <unknownsymbol>false</unknownsymbol>
    </instrumentquote>
  </quotes>
  <secfee>0.0</secfee>
</response>
Disclaimer: 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, TradeKing 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. TradeKing 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. TradeKing did not engage in market making in the securities mentioned here.