Skip to content

Dry run: costs, tax estimate and checks for trades, and whether a second approval applies

POST
/v1/firms/{firmId}/proposals/check
curl -X POST "https://api.staging.idealx.com/v1/firms/frm_01937a1b2c3d4e5f6a7b8c9d0e1f2a3b/proposals/check" \
-H "Authorization: Bearer $IDEALX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"portfolioId": "ptf_01937c4e8a2b7d1f9e0c3b5a6d7e8fa1",
"items": [
{
"kind": "order",
"instrumentId": "XASX:EXS",
"side": "buy",
"type": "market"
}
],
"accountId": "acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90"
}'

Checks run against the advice policy and the client’s restrictions, data owned by compliance: inside the mandate, client restrictions, concentration, mix by kind, product suitability for the account type, cash after trades. Each says pass, warn or block, with the policy version. Writes nothing.

firmId
required
string
Media typeapplication/json
object
portfolioId
required
string
items
required
Array<object>
>= 1 items <= 20 items
object
kind
required
string
Allowed values: order
instrumentId
required
string
side
required
string
Allowed values: buy sell
type
required
string
Allowed values: market limit
quantity
string
limitPrice
string
amount

Instead of quantity: an amount in the investment’s currency

string
/^\d{1,12}(\.\d{1,8})?$/
accountId
required
string
purpose
string
Allowed values: proposal trade

OK

Media typeapplication/json
object
costs
required
object
currency
required
string
buys
required
string
sells
required
string
fees
required
string
fx
required
string
turnover
required
string
gain
required

Estimated realised gain (lots, oldest first); an estimate

string
gainLongTerm
required
string
gainEstimated
required
boolean
cashBefore
required
string
cashAfter
required
string
totalBefore
required
string
lines
required
Array<object>
object
instrumentId
required
string
symbol
required
string
name
required
string
assetClass
required
string
side
required
string
Allowed values: buy sell
quantity
required
string
price
required
string | null
priceCurrency
required
string
value
required
string
valueBase
required
string
fee
required
string
gain
required
string | null
nowBp
required
number
afterBp
required
number
held
required
string
checks
required

The firm’s own; null for the client

object
policyVersion
required
number | null
outcome
required
string
Allowed values: pass warn block
ranAt
required
string
results
required
Array<object>
object
key
required
string
outcome
required
string
Allowed values: pass warn block
label
required
string
detail
required
string
secondApproval
required
object
enabled
required
boolean
required
required
boolean
threshold
required
object
amount
required
string
currency
required
string

Example

{
"costs": {
"lines": [
{
"side": "buy"
}
]
},
"checks": {
"outcome": "pass",
"results": [
{
"outcome": "pass"
}
]
}
}

No mandate allows proposals here

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
requestId
required
string
details
object
key
additional properties

Example

{
"error": {
"code": "validation_failed"
}
}