Trading

Get option order impact

BETA
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 the brokerage trading support page for more information on which brokerages support this endpoint.

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 cash change and fees for an option order before it is placed.

estimated_cash_changestring

Estimated cash change for the order, before fees.

cash_change_directionstring or null

Direction of the cash change. CREDIT means cash is received, DEBIT means cash is paid out, EVEN means no cash changes hands. UNKNOWN if the direction cannot be determined from the request.

estimated_fee_totalstring

Estimated total transaction fees and commissions for the order.

1
{
2
"estimated_cash_change": "1.97",
3
"cash_change_direction": "CREDIT",
4
"estimated_fee_total": "0.50"
5
}