Depending on applicable regulations or business limitations, specific API requests may not be available for your use.

Get a Folio Order

This request returns the details of a single folio order for a folio.

Request URL

Syntax GET /restapi/accounts/{accountnumber}/folios/{folionumber}/orders/{folioorderoid}
Example URL https://testapi.foliofn.com/restapi/accounts/RA1234ABCD/folios/RA1234ABCD03/orders/6917529027779555108

Response Data Fields

Field Description
folioOrderOid A unique ID for a folio order.
folioOrderId A readable ID for the folio order.
folioOid A unique ID for a folio.
folioNumber The number(id) of the folio to place the order in. This field is option since the URI determines which folio the order will be placed in. A folioNumber here that does not match the URI will result in a rejected order.
accountNumber The number(id) of the account to place the order in. This field is also optional since the URI determines the account to place the trade in. An accountNumber here that does not match the URI will result in a rejected order.
dollarShareBasedIndicator “S” – Share-based. Place this trade by specifying the amount of shares to buy/sell. This order type is only available for custom modify or direct orders and requires the usage of securityOrders.requestedShareAmount.
“D” – Dollar-based. Place this trade by specifying the amount of dollars to buy/sell. Not available for direct orders.
orderType “W” – Window. Place a window order.
“D” – Direct. Place an order for immediate execution.
orderSubType See Order Subtypes for further details.
term

Only allowed for direct limit, direct stop, direct stop-limit orders.

“0” – Day. The order is good only for the day.
“1” – GTC. The order is good until canceled (with a 90 day maximum on average).

requestedBuyDollarAmount The requested dollar amount to buy. This field should only be used with non-custom modify window orders and not used in conjunction with requestedSellDollarAmount.
requestedSellDollarAmount The requested dollar amount to sell. This field should only be used with non-custom modify window orders and not used in conjunction with requestedBuyDollarAmount.
commission Commission charged to a specific security in an order.
totalComission The sum total of the commissions applied at the security level for the dependent security orders generated when a folio-level order is placed, such as a rebalance order for a folio.
state The current state of the folio order. See Order States for the various order states and their meaning.
creationDate The date the order was created.
executionDate The date the order was executed.
buyLimitPercent The amount the security prices are allowed to move before being canceled for buy security orders.
sellLimitPercent The amount the security prices are allowed to move before being canceled for sell security orders.
taxlotReliefMethod See Tax Lot Relief Methods for available methods and explanations. AVGC is the only option for non-taxable accounts and not available for taxable accounts. Not specifying a value here will cause the trade to default to the accounts setting.
longTermTaxRate Long-term tax rate of the owner of the account. This is an input when using the “WLFS” or “WGFS” strategies.
shortTermTaxRate Short-term tax rate of the owner of the account. This is an input when using the “WLFS” or “WGFS” strategies.
discretionary “true” or “false”. An order giving the investment representative the ability to determine execution parameters for a trade. This discretion can be exercised through control over the side (buy/sell), timing (time of placement of a market order, for instance), price (through use of a limit or stop price), or life (Day versus Good ’Til Canceled/GTC) of the order. If such ability was granted to the investment representative, the order should be marked as having discretion exercised. If the investment professional is entering the order on behalf of the client according to the client’s explicit instruction, or the client is entering the order directly, no discretion has been exercised.
solicited “true” or “false”. An order should be marked as solicited if the investment representative has initiated contact with the client to recommend and affect a security transaction within their account. An order should be marked as unsolicited if the security transaction has been initiated by the client directly. This could be the order being placed by the client, or contact made by the client to the investment professional to affect an order on their behalf within their account.
reasonForTrade “ADJUSTMENT_TO_GUIDELINES”, “CLIENT_REQUEST”, “NOT_SPECIFIED”, “RAISE_CASH”, “STRATEGY_CHANGE”, “TAX_LOSS_SELLING”. See Reasons For Trade for a full explanation.
securityOrders A list of individual securities to buy/sell. This should only be used for direct or custom modify orders.
securityOrders A list of individual securities to buy/sell. This should only be used for direct or custom modify orders.
securityOrders.side “1” – Buy
“2” – Sell
“Z” – Sell all or liquidate
securityOrders.security The security to buy or sell.
securityOrders.security.ticker The ticker of the security to buy or sell.
securityOrders.security.cusip The CUSIP of the security to buy or sell.
securityOrders.estimatedPrice The estimated execution price just prior to execution.
securityOrders.filledPrice The price used to fill the order (execution price).
securityOrders.requestedPrice The price at the time the order was placed.
securityOrders.secFee
securityOrders.commission Commission for this security order.
securityOrders.state The current state of the security order.
“C” for cancelled;
“2” for kicked out for insufficient funds;
“3” for kicked out for insufficient inventory;
“4” for kicked out for price movement exceeded;
“I” for initial state;
“S” for order has passed evaluation and is ready to send to market;
“G” for order has been executed and is ready for posting to GPS;
“F” for final state, order has been fully processed.
securityOrders.modificationTimestamp The last time this security order was updated.
securityOrders.creationTimestamp The timestamp the security order was created.
securityOrders.executionTimestamp The timestamp the security order was executed.
securityOrders.quoteTimestamp
securityOrders.securityOrderId A readable ID for the security order.
securityOrders.estimatedDollarAmount The estimated dollar amount of the security order just prior to execution.
securityOrders.estimatedShareAmount The estimated share amount of the security order just prior to execution.
securityOrders.filledDollarAmount The dollar amount that was filled during execution of the security order.
securityOrders.filledShareAmount The share amount that was filled during the execution of the security order.
securityOrders.stateReasonCode The reason code associated with the state of the security order. 0 unless there is a problem/cancel. See Current State Reasons for more information.
securityOrders.requestedDollarAmount The requested dollar amount to trade for this security. This should be used in conjunction with a dollar-based indicator.
securityOrders.requestedShareAmount The requested share amount to trade for this security. This should be used in conjunction with a share-based indicator.
securityOrders.limitPrice The limit price to execute at. This is only available for direct orders.
securityOrders.stopPrice The stop price to execute at. This is only available for direct orders.
securityOrders.dollarShareBasedIndicator

“S” – Share-based. Place this trade by specifying the amount of shares to buy/sell. This order type is only available for custom modify or direct orders and requires the usage of securityOrders.requestedShareAmount.
“D” – Dollar-based. Place this trade by specifying the amount of dollars to buy/sell. Not available for direct orders.

All security order dollarShareBasedIndicator should match the folioOrder dollarShareBasedIndicator.

securityOrders.taxLotSelections The list of tax lots to relieve with a sell.
securityOrders.taxLotSelections.taxLotId The ID of the tax lot.
securityOrders.taxLotSelections.shareQuantity The number of shares to relieve.
estimatedBuyDollarAmount The estimated buy amount just prior to execution of all underlying security orders.
estimatedSellDollarAmount The estimated sell amount just prior to execution of all underlying security orders.
filledBuyDollarAmount The filled/executed buy amount of all underlying security orders.
filledSellDollarAmount The filled/executed sell amount of all underlying security orders.
totalCommission
totalFee
stateReasonCode The reason code associated with the state of the folio order. 0 unless there is a problem/cancel. See Current State Reasons for more information.
modificationTimestamp The last time this order was updated.
tradeOriginatingMemberOid The unique ID of the member to originate the order.
scheduledWindowDatetime The window time this order is scheduled for.

Response Example


Status Code: 200 OK
Content-Type: application/json
Date: Wed, 18 Dec 2013 19:42:03 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
Transfer-Encoding: chunked
X-Powered-By: Servlet/2.

{
    "folioOrderOid": "6917529027779555108",
    "folioOrderId": "10441RP4",
    "folioOid": "648518346341520193",
    "folioNumber": "RA1234ABCD03",
    "accountNumber": "RA1234ABCD",
    "dollarShareBasedIndicator": "D",
    "orderType": "W",
    "orderSubType": "M",
    "term": null,
    "commission": "0.00",
    "state": "F",
    "creationDate": "2013-12-03T05:00:00.000+0000",
    "executionDate": "2013-12-03T05:00:00.000+0000",
    "buyLimitPercent": "2.00000000",
    "sellLimitPercent": "2.00000000",
    "discretionary": false,
    "solicited": false,
    "reasonForTrade": "NS",
    "securityOrders": [{
        "securityOrderOid": "9151314443395316966",
        "side": "2",
        "security": {
            "ticker": "JCI",
            "cusip": "478366107",
            "id": null
        },
        "estimatedPrice": "0.000000",
        "filledPrice": "49.907432",
        "requestedDollarAmount": "4000.00000",
        "requestedPrice": "49.870000",
        "secFee": "0.07",
        "commission": "0.00",
        "state": "F",
        "limitPrice": "0.000000",
        "stopPrice": "0.000000",
        "modificationTimestamp": "2013-12-13T04:52:15.812+0000",
        "creationTimestamp": "2013-12-03T15:52:31.143+0000",
        "executionTimestamp": "2013-12-03T16:09:53.236+0000",
        "marketMakerExecutionTimestamp": null,
        "quoteTimestamp": "2013-12-03T15:35:56.000+0000",
        "dollarShareBasedIndicator": "D",
        "taxLotSelections": null,
        "securityOrderId": "10H7LF76",
        "estimatedDollarAmount": "0.00000",
        "estimatedShareAmount": "0.00000",
        "filledDollarAmount": "4000.00000",
        "filledShareAmount": "80.14838",
        "requestedShareAmount": "4000.00000",
        "stateReasonCode": "0"
    }],
    "requestedBuyDollarAmount": "0.00000",
    "requestedSellDollarAmount": "4000.00000",
    "estimatedBuyDollarAmount": "0.00000",
    "estimatedSellDollarAmount": "3999.19791",
    "filledBuyDollarAmount": "0.00000",
    "filledSellDollarAmount": "4000.00000",
    "totalCommission": "0.00",
    "totalFee": "0.07",
    "stateReasonCode": "0",
    "modificationTimestamp": "2013-12-13T04:52:15.788+0000",
    "taxlotReliefMethod": "WLFS",
    "taxlotReliefMethodLongTermTaxRate": "10.00000000",
    "taxlotReliefMethodShortTermTaxRate": "40.00000000",
    "tradeOriginatingMemberOid": "5260204364768781948",
    "scheduledWindowDatetime": "2013-12-03T16:00:00.000+0000"
}

Getting Started

REST APIs

Resources

Developer Home