Trading

Get option order impact

post
https://api.snaptrade.com/api/v1/accounts/{accountId}/trading/options/impact

Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to https://snaptrade.notion.site/brokerages for more information on brokerage trading support.

Execute an API Request

Path
accountIdstring (format: uuid)required

Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.

Query
userIdstringrequired

SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.

userSecretstringrequired

SnapTrade User Secret. This is a randomly generated string and should be stored securely. If compromised, please rotate it via the rotate user secret endpoint.

Request Body
order_typestringrequired

The type of order to place.

time_in_forcestringrequired

The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values:

  • Day - Day. The order is valid only for the trading day on which it is placed.
  • GTC - Good Til Canceled. The order is valid until it is executed or canceled.
  • FOK - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely.
  • IOC - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
limit_pricestring (format: decimal) or null

The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.

stop_pricestring (format: decimal) or null

The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.

price_effectstring or null

The desired price_effect for LIMIT and STOP_LOSS_LIMIT orders. Values are CREDIT, DEBIT, EVEN

legsarray of objectsrequired
Authorization
Request
Installation
$
npm install snaptrade-typescript-sdk
1
Loading...

Response fields

object

Estimated cost and fees for an option order before it is placed.

estimated_coststring

Estimated option premium for the order (before fees).

estimated_transaction_feestring

Estimated transaction fees and commissions for the order.

1
{
2
"estimated_cost": "1.97",
3
"estimated_transaction_fee": "0.50"
4
}