> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trdrs.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Conventions

> Learn the rules every route follows for times, missing values, quantities, timeframes and choosing an account.

These rules hold on every route, so you learn them once. Read this page before you parse your first
response.

## Times are epoch seconds

Timestamps are epoch seconds, not milliseconds, unless a field is marked `date-time`. If a
timestamp looks a thousand times too small, this is why.

## Null means unknown

A money field is a number or `null`, 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 takes `broker` and `account` query parameters. `broker` is the
provider's id, for example `paper` for the paper book. [Providers](/providers) lists every id, and
`GET /api/connect/providers` returns them.

| Routes | `broker` and `account` |
| - | - |
| Trading (`/api/trading/…`) and account (`/api/account/…`) | Optional. Leave them out to use your default account |
| Risk (`GET /api/risk`, `PUT /api/risk`, `POST /api/risk/unlock`) | `broker` is required |

A value that doesn't match one of your own accounts is refused with `400`, so a typo can never trade
the wrong account.
