Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,15 @@ response.saveToFile(Path.of("aapl.json")); // cache the raw body

Everything the SDK throws is a `MarketDataException`. It is a **sealed** hierarchy — the seven subtypes below are the complete set, so you can branch on them exhaustively and the compiler will tell you if a future major version adds one. Each exception carries support context: `getStatusCode()`, `getRequestId()`, `getRequestUrl()`, and `getSupportInfo()`.

| Subtype | When it's thrown |
|---|---|
| `AuthenticationError` | Missing or invalid token (HTTP 401) |
| `BadRequestError` | Invalid parameters (HTTP 4xx) |
| `NotFoundError` | The resource doesn't exist (HTTP 404) |
| `RateLimitError` | Quota exceeded (HTTP 429); see `getRetryAfter()` |
| `ServerError` | API-side failure (HTTP 5xx) |
| `NetworkError` | Connection failure or timeout |
| `ParseError` | The response could not be decoded |
| Subtype | When it's thrown |
|-----------------------|--------------------------------------------------|
| `AuthenticationError` | Missing or invalid token (HTTP 401) |
| `BadRequestError` | Invalid parameters (HTTP 4xx) |
| `NotFoundError` | The resource doesn't exist (HTTP 404) |
| `RateLimitError` | Quota exceeded (HTTP 429); see `getRetryAfter()` |
| `ServerError` | API-side failure (HTTP 5xx) |
| `NetworkError` | Connection failure or timeout |
| `ParseError` | The response could not be decoded |

Async calls surface the same exceptions through the `CompletableFuture` (wrapped in a `CompletionException`); the sync wrappers unwrap them so you catch the cause directly.

Expand Down
34 changes: 17 additions & 17 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ import com.marketdata.sdk.DateFormat;
client.stocks().dateFormat(DateFormat.TIMESTAMP);
```

| Value | Description |
|---|---|
| `UNIX` | Unix timestamp in seconds (e.g. `1609362000`) |
| `TIMESTAMP` | ISO-8601 timestamp (e.g. `2020-12-30 16:00:00 -05:00`) |
| `SPREADSHEET` | Excel/Sheets serial date number (e.g. `44195.66667`) |
| Value | Description |
|---------------|--------------------------------------------------------|
| `UNIX` | Unix timestamp in seconds (e.g. `1609362000`) |
| `TIMESTAMP` | ISO-8601 timestamp (e.g. `2020-12-30 16:00:00 -05:00`) |
| `SPREADSHEET` | Excel/Sheets serial date number (e.g. `44195.66667`) |

For more details, see the [API Date Format documentation](https://www.marketdata.app/docs/api/universal-parameters/date-format).

Expand All @@ -88,11 +88,11 @@ import com.marketdata.sdk.Mode;
client.stocks().mode(Mode.CACHED);
```

| Value | Description |
|---|---|
| `LIVE` | Real-time data (paid plans) |
| `DELAYED` | 15+ minute delayed data |
| `CACHED` | Cached data — lower cost per request |
| Value | Description |
|-----------|--------------------------------------|
| `LIVE` | Real-time data (paid plans) |
| `DELAYED` | 15+ minute delayed data |
| `CACHED` | Cached data — lower cost per request |

For more details, see the [API Data Mode documentation](https://www.marketdata.app/docs/api/universal-parameters/mode).

Expand Down Expand Up @@ -153,10 +153,10 @@ csv.saveToFile(Path.of("quotes.csv"))

## Environment Variables Reference

| Variable | Purpose | Default |
|--------------------------|-------------------------------|------------------------------|
| `MARKETDATA_TOKEN` | API authentication token | _(none)_ |
| `MARKETDATA_BASE_URL` | API base URL | `https://api.marketdata.app` |
| `MARKETDATA_API_VERSION` | API version | `v1` |
| `MARKETDATA_DATE_FORMAT` | Default date format | _(API default)_ |
| `MARKETDATA_LOGGING_LEVEL` | SDK logging level (`java.util.logging`) | _(consumer default)_ |
| Variable | Purpose | Default |
|----------------------------|-----------------------------------------|------------------------------|
| `MARKETDATA_TOKEN` | API authentication token | _(none)_ |
| `MARKETDATA_BASE_URL` | API base URL | `https://api.marketdata.app` |
| `MARKETDATA_API_VERSION` | API version | `v1` |
| `MARKETDATA_DATE_FORMAT` | Default date format | _(API default)_ |
| `MARKETDATA_LOGGING_LEVEL` | SDK logging level (`java.util.logging`) | _(consumer default)_ |
Loading