Reconfirm Order
postAccountsAccountNumberOrdersIdReconfirm/accounts/{account_number}/orders/{id}/reconfirmMoney-movingMoney-moving. Dry-run first, send an ext-client-order-id, and confirm before submitting. See Idempotency & retries.
Base URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Reconfirms an order.
Code samples
curl -X POST 'https://api.cert.tastyworks.com/accounts/5WX01234/orders/1/reconfirm' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0'import requests
url = "https://api.cert.tastyworks.com/accounts/5WX01234/orders/1/reconfirm"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
}
resp = requests.post(url, headers=headers)
print(resp.status_code, resp.json())const resp = await fetch("https://api.cert.tastyworks.com/accounts/5WX01234/orders/1/reconfirm", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
},
})
const data = await resp.json()
console.log(resp.status, data)package main
import (
"net/http"
"io"
"fmt"
)
func main() {
req, _ := http.NewRequest("POST", "https://api.cert.tastyworks.com/accounts/5WX01234/orders/1/reconfirm", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("User-Agent", "tastytrade-docs-example/1.0")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(out))
}import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.cert.tastyworks.com/accounts/5WX01234/orders/1/reconfirm"))
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("User-Agent", "tastytrade-docs-example/1.0")
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> resp = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(resp.statusCode() + " " + resp.body());Parameters
| Name | In | Type | Description |
|---|---|---|---|
| account_number* | path | string | e.g. "5WX01234" |
| id* | path | integer | e.g. 1 |
Responses
Example response
{
"data": {
"id": "771043",
"account-number": "5WX01234",
"cancel-user-id": "abc123",
"cancel-username": "string",
"cancellable": true,
"cancelled-at": "2024-07-31T16:50:23.417+00:00",
"complex-order-id": "2000010530",
"complex-order-tag": "OTOCO::order",
"confirmation-status": "string",
"contingent-status": "Pending Order",
"editable": true,
"edited": false,
"external-identifier": "string",
"global-request-id": "abc123",
"gtc-date": "2024-01-15",
"in-flight-at": "2024-01-15T14:30:00.000Z",
"liquidity-pool-instrument-type": "Equity",
"live-at": "2024-01-15T14:30:00.000Z",
"max-value-per-liquidity-allocation-fill": "100.00",
"order-type": "Limit",
"preflight-id": "abc123",
"price": "150.25",
"price-effect": "Debit",
"received-at": "2024-10-01T18:26:52.513+00:00",
"reject-reason": "You cannot buy for a credit.",
"replaces-order-id": "771043",
"replacing-order-id": "771044",
"size": "1",
"source": "string",
"status": "Live",
"stop-trigger": "150.0",
"terminal-at": "2024-07-31T16:50:23.417+00:00",
"time-in-force": "Day",
"underlying-instrument-type": "Equity",
"underlying-symbol": "AAPL",
"updated-at": "2024-01-15T14:30:00.000Z",
"user-id": "abc123",
"username": "string",
"value": "10.0",
"value-effect": "Debit",
"legs": [
{
"action": "string",
"instrument-type": "Equity",
"quantity": "1",
"remaining-quantity": "1",
"symbol": "AAPL",
"fills": [
{
"destination-venue": "string",
"ext-exec-id": "abc123",
"ext-group-fill-id": "abc123",
"fill-id": "abc123",
"fill-price": "100.00",
"filled-at": "2024-01-15T14:30:00.000Z",
"quantity": "1"
}
]
}
],
"order-rule": {
"cancel-at": "2024-01-15T14:30:00.000Z",
"cancelled-at": "2024-01-15T14:30:00.000Z",
"route-after": "2024-01-15T14:30:00.000Z",
"routed-at": "2024-01-15T14:30:00.000Z",
"order-conditions": [
{
"id": "abc123",
"action": "string",
"comparator": "string",
"indicator": "string",
"instrument-type": "Equity",
"is-threshold-based-on-notional": true,
"symbol": "AAPL",
"threshold": "string",
"triggered-at": "2024-01-15T14:30:00.000Z",
"triggered-value": "100.00",
"price-components": [
{}
]
}
]
}
},
"context": "/accounts/{account_number}/orders/{id}/reconfirm"
}Schema
datarequiredobject (Order)A single order in the tastytrade system. Submission-time fields such as `order-type`, `time-in-force`, `price`, and `legs` describe the order, while post-submission fields such as `status`, `cancellable`, `editable`, and `legs.fills` track its progress through the submission, working, and terminal phases.
idstringThe unique identifier of the order. Use it to fetch, replace, or cancel the order.
example:
"771043"account-numberstringThe account number the order belongs to.
example:
"5WX01234"cancel-user-idstringcancel-usernamestringcancellablebooleanWhether the order can currently be cancelled. True while the order is in a working status, false once it is terminal or a cancel has been requested.
example:
truecancelled-atstring <date-time>Timestamp when the order was cancelled, if applicable.
example:
"2024-07-31T16:50:23.417+00:00"complex-order-idstringThe id of the parent complex order, if this order is a component of one.
example:
"2000010530"complex-order-tagstringThe role of this order within its complex order, for example `OTOCO::trigger-order` or `OCO::order`.
example:
"OTOCO::order"confirmation-statusstringcontingent-statusstringThe contingency state of a complex-order component awaiting its trigger, for example `Pending Order`.
example:
"Pending Order"editablebooleanWhether the order can currently be edited or replaced.
example:
trueeditedbooleanWhether this order is the result of an edit/replacement of a prior order.
example:
falseexternal-identifierstringglobal-request-idstringgtc-datestring <date>in-flight-atstring <date-time>liquidity-pool-instrument-typestringlive-atstring <date-time>max-value-per-liquidity-allocation-fillstringorder-typestringThe order type with respect to pricing: `Limit`, `Market`, `Stop`, `Stop Limit`, `Notional Market`, `Marketable Limit`, or `Liquidity Allocation`.
example:
"Limit"preflight-idstringpricestring <decimal>The limit price of the order, applicable to Limit and Stop Limit orders. Serialized as a JSON string decimal. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"150.25"price-effectstringThe direction of the price relative to the account: `Debit` (paying) or `Credit` (receiving).
example:
"Debit"received-atstring <date-time>Timestamp when tastytrade received the order.
example:
"2024-10-01T18:26:52.513+00:00"reject-reasonstringThe reason the order was rejected, if its status is `Rejected`.
example:
"You cannot buy for a credit."replaces-order-idstringThe id of the order that this order replaces, for cancel-replace orders.
example:
"771043"replacing-order-idstringThe id of the order that is replacing this order, for orders being cancel-replaced.
example:
"771044"sizestringThe total quantity of the order across its legs, as a string.
example:
"1"sourcestringstatusstringThe current order status, for example `Received`, `Routed`, `Live`, `Cancel Requested`, `Filled`, `Cancelled`, `Expired`, or `Rejected`.
example:
"Live"stop-triggerstringThe trigger price at which a Stop or Stop Limit order activates, as a string.
example:
"150.0"terminal-atstring <date-time>Timestamp when the order reached a terminal status.
example:
"2024-07-31T16:50:23.417+00:00"time-in-forcestringHow long the order remains working before it expires: `Day`, `GTC`, `GTD`, `Ext`, `IOC`, and related values.
example:
"Day"underlying-instrument-typestringThe instrument type of the underlying, for example `Equity` or `Future`.
example:
"Equity"underlying-symbolstringThe underlying symbol the order trades, for example `AAPL`.
example:
"AAPL"updated-atstringuser-idstringusernamestringvaluestring <decimal>The notional dollar value of the order, applicable to Notional Market orders. Serialized as a JSON string decimal. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"10.0"value-effectstringThe direction of the notional value relative to the account: `Debit` or `Credit`.
example:
"Debit"legsarray<object>{6 fields}order-ruleobject{5 fields}
contextrequiredstringexample:
"/accounts/{account_number}/orders/{id}/reconfirm"
Example response
{
"error": {
"code": "unauthorized",
"message": "No valid access token was provided; access tokens expire after 15 minutes."
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "not_permitted",
"message": "User not permitted access"
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "string",
"message": "string",
"errors": [
{
"code": "string",
"message": "string",
"domain": "string"
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "preflight_check_failure",
"message": "One or more preflight checks failed",
"errors": [
{
"code": "preflight_check_failure",
"message": "A specific validation failed for this order."
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "string",
"message": "string",
"errors": [
{
"code": "string",
"message": "string",
"domain": "string"
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Related
- Rate-limit class:
destructive· not idempotent — Rate limits & backoff - Idempotency & retries — safe retries for order placement
- Error reference — codes, causes, and fixes
Agents: this page is also Markdown (with the embedded OpenAPI definition) — append .md or send Accept: text/markdown. Index at /llms.txt.