Skip to main content
GET
Get latest intent action

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-organization-id
string<uuid> | null

Organization ID required for service-account credentials

Path Parameters

intent_id
string<uuid>
required

Intent ID

Query Parameters

trading_account_id
string<uuid>

Trading account the intent must belong to

Response

Latest intent action retrieved

An intent action together with how far its dispatch has got.

The action record is the immutable thing that was asked for; the state is the newest entry in its outbox lineage, so it moves as the action is picked up and published. They live in separate tables (the action is appended once, the state is appended per transition) and are joined here rather than leaving callers to correlate two endpoints.

state is None when no outbox row exists yet for the action. That is a real and momentary condition: the action and its first outbox row are written in one transaction, so it only shows up for a read racing that commit, and it is not the same as Pending.

runtime_status is the other half of the answer, and the one callers usually want: state says how far the platform got in handing the order to a broker, and stays SENT forever afterwards. It says nothing about whether the order filled. runtime_status is what the broker reports back.

account_id
string<uuid>
required
action_type
enum<string>
required
Available options:
CREATE,
REPLACE,
CANCEL
created_at
string<date-time>
required
intent_id
string<uuid>
required
order_side
enum<string>
required
Available options:
UNSPECIFIED,
BUY,
SELL,
SELL_SHORT
order_type
enum<string>
required
Available options:
UNSPECIFIED,
LIMIT,
MARKET,
FILL_OR_KILL,
LIMIT_ON_OPEN,
LIMIT_ON_CLOSE,
MARKET_ON_OPEN,
MARKET_ON_CLOSE,
STOP,
STOP_LIMIT,
TRAILING_STOP
organization_id
string<uuid>
required
principal_id
string
required
principal_type
enum<string>
required

Class of credential behind an instruction.

An order placed with an organization's API key, one placed by a person signed in to the dashboard, and one placed by an Anthid service acting on the organization's behalf are three different claims once an order is disputed. Recording only the organization cannot tell them apart.

Available options:
API_KEY,
USER,
SERVICE
quantity
string
required
received_at
string<date-time>
required
request_id
string
required
route_strategy
enum<string>
required
Available options:
UNSPECIFIED,
SMART,
AMEX,
ARCA,
BATS,
BATY,
EDGA,
EDGX,
NSDQ,
NYSE
seq
integer<int64>
required
symbol
string
required
client_reference_id
string | null
idempotency_key
string | null
limit_price
null | string
source_ip
string | null
stop_price
null | string
time_in_force
null | enum<string>
Available options:
UNSPECIFIED,
DAY,
IMMEDIATE_OR_CANCEL,
GOOD_TILL_CANCEL,
AT_OPEN,
AT_CLOSE,
FILL_OR_KILL,
EXT
principal_name
string | null

Who placed it, by name, as it read when the action was taken.

A sibling of the action rather than a field on it, for the same reason state is: IntentActionRecord is the payload dispatched to the broker path, and which person pressed the button is no part of an order. This is the supervisory read, and the only place the name is wanted.

None is the ordinary case for an API key or a service, neither of which has a person to name, and for anything recorded before the name was captured. Callers fall back to the credential class rather than inventing a label.

runtime_status
null | enum<string>

Where the intent stands at the broker.

Per intent rather than per action: an intent has one live order at a time, and a replace does not give the superseded action its own outcome. Every action in a chain therefore reports the same value, which is the truthful rendering of "what became of what I asked for".

None means the broker has not reported on it yet. That covers an order accepted moments ago and still in flight, and it is deliberately not collapsed into PENDING: a null says the platform has heard nothing, where PENDING is the broker saying it has the order and has not worked it. Callers that need one value can treat null as pending; ones that are watching for a stuck order need to tell them apart.

Available options:
PENDING,
OPEN,
PARTIALLY_FILLED,
FILLED,
CANCELLED,
REJECTED
state
null | enum<string>

Latest dispatch state for this action, newest outbox entry first.

Available options:
PENDING,
PROCESSING,
SENT,
FAILED