中文

API Documentation

Responses and errors

Learn the common envelope for single objects and collections, plus the error shape used across the API.

Open llm.txt

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

GET/api/v1/markets/{market}

Get one market

getMarket

StatusDescriptionSchema
200Market resourceMarketResponse
401UnauthorizedErrorResponse
404Resource not foundErrorResponse

MarketResponse

FieldTypeRequiredDescription
dataMarketYes
data.idMarketIdYes
data.namestringYes
linksSelfLinksYes
links.selfstringYes

Single-resource responses typically contain:

  • data for the business object itself
  • links for self or related navigation

Collection pattern

GET/api/v1/equities

List equities

listEquities

StatusDescriptionSchema
200Equity collectionInstrumentCollectionResponse
400Invalid request parametersErrorResponse
401UnauthorizedErrorResponse

InstrumentCollectionResponse

FieldTypeRequiredDescription
dataArray<Instrument>Yes
data[].idstringYes
data[].codestringYes
data[].exchangeMarketIdYes
data[].marketstringYes
data[].asset_classequity | index | fundYes
data[].boardstringYes
data[].namestringYes
metaMetaYes
meta.next_cursorstring | nullYes
linksSelfLinksYes
links.selfstringYes

Collection responses usually add:

  • meta for paging and size information
  • links for 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

FieldTypeRequiredDescription
errorobjectYes
error.codestringYes
error.messagestringYes
Typical error handlingts
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.