Offerings
Primary offerings (IPOs): browse active offerings and subscribe with wholesale KYC.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/offerings/ | List offerings |
GET | /api/offerings/:tokenName | Offering detail |
POST | /api/offerings/subscribe | Subscribe to offering |
List offerings
GET /api/offerings/
Returns all active IPO offerings.
Request
import axios from 'axios';
const response = await axios.get('https://api.loafmarkets.com/api/offerings/', {
});
console.log(response.data);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| None | - | No | No parameters for this endpoint. |
Response
// See @loafmarkets/shared-types for the response type
type Response = Record<string, unknown>;Example response:
{
"success": true
}Errors
| Status | Code | Description |
|---|---|---|
400 | validation_error | Request failed schema validation. |
401 | unauthorized | Missing or invalid authentication. |
404 | not_found | Resource not found (where applicable). |
500 | internal_error | Unexpected server error. |
Offering detail
GET /api/offerings/:tokenName
Returns detail for a single IPO by token name.
Request
import axios from 'axios';
const response = await axios.get('https://api.loafmarkets.com/api/offerings/:tokenName', {
});
console.log(response.data);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenName | string | Yes | (path) Lowercase IPO token symbol. |
Response
// See @loafmarkets/shared-types for the response type
type Response = Record<string, unknown>;Example response:
{
"success": true
}Errors
| Status | Code | Description |
|---|---|---|
400 | validation_error | Request failed schema validation. |
401 | unauthorized | Missing or invalid authentication. |
404 | not_found | Resource not found (where applicable). |
500 | internal_error | Unexpected server error. |
Subscribe to offering
POST /api/offerings/subscribe
Creates an IPO subscription order for a wholesale-verified user.
Request body
Type: IpoSubscribeRequestBody (@loafmarkets/shared-types)
interface IpoSubscribeRequestBody {
ipoId: number;
quantity: number;
deadline: number;
nonce: string;
allowPartial?: boolean;
}Request
import axios from 'axios';
import type { IpoSubscribeRequestBody } from '@loafmarkets/shared-types';
const body: IpoSubscribeRequestBody = {
ipoId: 7,
quantity: 100,
deadline: 1893456000,
nonce: 'b2c3d4e5f6789012345678901234abcd',
allowPartial: true,
};
const response = await axios.post('https://api.loafmarkets.com/api/offerings/subscribe', body, {
headers: { Authorization: `Bearer ${process.env.LOAF_PRIVY_JWT}` },
});
console.log(response.data);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ipoId | number | Yes | (body) IPO record ID. |
quantity | number | Yes | (body) Whole-number units to subscribe for. |
deadline | number | Yes | (body) Unix timestamp (seconds) order deadline. |
nonce | string | Yes | (body) 32-character hex nonce. |
allowPartial | boolean | No | (body) Allow partial fill when remaining supply is insufficient. Defaults to true. |
Response
// See @loafmarkets/shared-types for the response type
type Response = Record<string, unknown>;Example response:
{
"success": true
}Errors
| Status | Code | Description |
|---|---|---|
400 | validation_error | Request failed schema validation. |
401 | unauthorized | Missing or invalid authentication. |
404 | not_found | Resource not found (where applicable). |
500 | internal_error | Unexpected server error. |
Requires Privy JWT authentication.
Last updated on