Skip to main content
PUT
TypeScript

Authorizations

Authorization
string
header
required

The Trading API key (trdrs_sk_…), for market data, orders and account state on the accounts its owner holds. Use it server-to-server, and keep it on your server. Its scope is named trading in the API.

Path Parameters

id
string
required

The bracket's id.

Query Parameters

provider
string

The provider the account is at, such as rithmic or paper. Omit it to use your default provider. An unknown value is refused with 400, never replaced with another provider.

account
string

The account number at that provider. It must be one of your own accounts, or the call is refused with 400.

Body

application/json

The bracket's ladders as they should be.

exits
object
required

The take profits and stop losses. A leg that keeps its place in its ladder keeps its id. Distances are measured from the entry.

Example:

Response

The change is made, or refused and undone: refused is the provider's reason where it refused a pair, and the bracket is as it was. stuck counts orders that would not cancel and still rest; the bracket keeps them, so the account stream shows them.

A bracket after a protection, a change or a withdrawal.

bracket
object
required

The bracket.

Example:
refused
string | null
required

The provider's reason where it refused a pair, or null. A change of a bracket the provider refuses leaves the bracket as it was. On a protection, the refused pair's part of the position shows as unprotected and the other pairs rest.

stuck
integer
required

How many orders the change meant to cancel that would not cancel and still rest. The bracket keeps them, so the account stream shows them.

entryOrderId
string

On a protection of a resting entry, and on a change or a withdrawal of a bracket waiting on one: the order the entry rests as afterwards. The paper book replaces the entry with itself to change the pairs it carries, so there the entry rests under a new id. Every other provider keeps the entry's id. Absent on every other answer.

Example:

"protect-entry-esu6-1787581560"