Skip to Content

History

Paginated order and trade history for authenticated users.

Endpoints

MethodPathDescription
GET/api/history/ordersOrder history
GET/api/history/tradesTrade history

Order history

GET /api/history/orders

Returns paginated order history for the authenticated user.

Request

import axios from 'axios'; const response = await axios.get('https://api.loafmarkets.com/api/history/orders', { headers: { Authorization: `Bearer ${process.env.LOAF_PRIVY_JWT}` }, }); console.log(response.data);

Parameters

ParameterTypeRequiredDescription
pagenumberNo(query) Page number (1-based). Default: 1.
pageSizenumberNo(query) Results per page (1–100). Default: 20.

Response

// See @loafmarkets/shared-types for the response type type Response = Record<string, unknown>;

Example response:

{ "success": true }

Errors

StatusCodeDescription
400validation_errorRequest failed schema validation.
401unauthorizedMissing or invalid authentication.
404not_foundResource not found (where applicable).
500internal_errorUnexpected server error.

Requires Privy JWT authentication.


Trade history

GET /api/history/trades

Returns paginated trade history for the authenticated user.

Request

import axios from 'axios'; const response = await axios.get('https://api.loafmarkets.com/api/history/trades', { headers: { Authorization: `Bearer ${process.env.LOAF_PRIVY_JWT}` }, }); console.log(response.data);

Parameters

ParameterTypeRequiredDescription
pagenumberNo(query) Page number (1-based). Default: 1.
pageSizenumberNo(query) Results per page (1–100). Default: 20.

Response

// See @loafmarkets/shared-types for the response type type Response = Record<string, unknown>;

Example response:

{ "success": true }

Errors

StatusCodeDescription
400validation_errorRequest failed schema validation.
401unauthorizedMissing or invalid authentication.
404not_foundResource not found (where applicable).
500internal_errorUnexpected server error.

Requires Privy JWT authentication.

Last updated on