Times are epoch seconds
Timestamps are epoch seconds, not milliseconds, unless a field is markeddate-time. If a
timestamp looks a thousand times too small, this is why.
Null means unknown
A money field is a number ornull, and null means the provider hasn’t reported it yet. trdrs
never turns an unknown value into 0, and your screens shouldn’t either: a trader who sees a $0
balance during a hiccup at the provider will act on it.
A few fields are null because the account has no such figure at all. An account on the paper
book (broker value paper) reports no buying power, so its buying-power fields are always
null. Its margin preview still gives you a verdict: sufficient says whether the account’s free
collateral covers the order.
Quantities are signed
A long position is positive and a short one negative. There’s no separate side field to check against.Timeframes follow a pattern
A timeframe is a count and a unit, written<N><unit>, with the units s, m, h, d, w, mo
and t: 1m, 4h, 1d or 100t. Any count within the published limits works, including ones
no preset offers, such as 45s or 250t. Call /api/market/config once to get the exact limits
trdrs checks against. A malformed timeframe is refused with 400.
Choose an account the same way everywhere
Every route that acts on one account takesbroker and account query parameters. broker is the
provider’s id, for example paper for the paper book. Providers lists every id, and
GET /api/connect/providers returns them.
A value that doesn’t match one of your own accounts is refused with
400, so a typo can never trade
the wrong account.