Skip to Content
API ReferenceOfferings

Offerings

Primary offerings (IPOs): browse active offerings and subscribe with wholesale KYC.

Endpoints

MethodPathDescription
GET/api/offerings/List offerings
GET/api/offerings/:tokenNameOffering detail
POST/api/offerings/subscribeSubscribe 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

ParameterTypeRequiredDescription
None-NoNo parameters for this endpoint.

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.

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

ParameterTypeRequiredDescription
tokenNamestringYes(path) Lowercase IPO token symbol.

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.

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

ParameterTypeRequiredDescription
ipoIdnumberYes(body) IPO record ID.
quantitynumberYes(body) Whole-number units to subscribe for.
deadlinenumberYes(body) Unix timestamp (seconds) order deadline.
noncestringYes(body) 32-character hex nonce.
allowPartialbooleanNo(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

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