Axiora does not return bare arrays as the primary response shape. The API consistently wraps results with data, and collection endpoints add meta and links.
Shared response envelope
/api/v1/markets/{market}Get one market
getMarket
| Status | Description | Schema |
|---|---|---|
| 200 | Market resource | MarketResponse |
| 401 | Unauthorized | ErrorResponse |
| 404 | Resource not found | ErrorResponse |
MarketResponse
| Field | Type | Required | Description |
|---|---|---|---|
| data | Market | Yes | — |
| data.id | MarketId | Yes | — |
| data.name | string | Yes | — |
| links | SelfLinks | Yes | — |
| links.self | string | Yes | — |
Single-resource responses typically contain:
datafor the business object itselflinksfor self or related navigation
Collection pattern
/api/v1/equitiesList equities
listEquities
| Status | Description | Schema |
|---|---|---|
| 200 | Equity collection | InstrumentCollectionResponse |
| 400 | Invalid request parameters | ErrorResponse |
| 401 | Unauthorized | ErrorResponse |
InstrumentCollectionResponse
| Field | Type | Required | Description |
|---|---|---|---|
| data | Array<Instrument> | Yes | — |
| data[].id | string | Yes | — |
| data[].code | string | Yes | — |
| data[].exchange | MarketId | Yes | — |
| data[].market | string | Yes | — |
| data[].asset_class | equity | index | fund | Yes | — |
| data[].board | string | Yes | — |
| data[].name | string | Yes | — |
| meta | Meta | Yes | — |
| meta.next_cursor | string | null | Yes | — |
| links | SelfLinks | Yes | — |
| links.self | string | Yes | — |
Collection responses usually add:
metafor paging and size informationlinksfor navigation or self references
Error responses
Unauthorized, not found, and invalid argument responses are modeled explicitly in the OpenAPI contract. Clients should branch on these instead of treating all non-200 responses generically.
ErrorResponse
| Field | Type | Required | Description |
|---|---|---|---|
| error | object | Yes | — |
| error.code | string | Yes | — |
| error.message | string | Yes | — |
const response = await fetch(url, options);
if (!response.ok) {
const payload = await response.json();
throw new Error(payload.error?.message ?? "Unknown API error");
}
const payload = await response.json();Do not parse success and failure the same way
Even when two endpoints live in the same domain and look similar, handle the HTTP status first. Only parse business fields after the response has been confirmed as successful.