Skip to main content

Documentation Index

Fetch the complete documentation index at: https://swc-sdk.zeltros.dev/llms.txt

Use this file to discover all available pages before exploring further.

The client.faction resource provides access to faction data including membership rosters, budgets, stockholder lists, and credit transaction history.

faction.get()

Get faction by UID. Returns the FactionDetail object directly — not wrapped in a Page. Requires: FACTION_READ
uid
string
Faction UID. If omitted, defaults to the authenticated user’s primary faction.
// Get a specific faction
const faction = await client.faction.get({ uid: '20:123' });
console.log(faction.name); // access properties directly, not faction.data

// Get the authenticated user's faction
const myFaction = await client.faction.get();

faction.list()

List all factions (paginated) Requires: Authentication
item_count
**item\_count**: number
default:"50"
Number of items to retrieve. Default: 50
pageDelay
number
Milliseconds to wait before fetching each subsequent page. Helps avoid rate limits during auto-pagination.
start_index
**start\_index**: number
default:"1"
Starting position for pagination (1-based). Default: 1
const page = await client.faction.list();
console.log(page.total);
console.log(page.data[0]?.value);

// Iterate all pages:
for await (const faction of page) { console.log(faction); }

Budgets

faction.budgets.get()

Get a specific faction budget. Returns the Budget object directly — not wrapped in a Page.
budgetId
string
required
The budgetId parameter.
factionId
string
required
The factionId parameter.
const budget = await client.faction.budgets.get({ factionId: '20:123', budgetId: 'budget-uid' });
console.log(budget); // access properties directly, not budget.data

faction.budgets.list()

List faction budgets (paginated)
factionId
string
required
The factionId parameter.
item_count
number
The item_count parameter.
pageDelay
number
The pageDelay parameter.
start_index
number
The start_index parameter.
const page = await client.faction.budgets.list({ factionId: '20:123' });
console.log(page.data); // Budget[]
// Iterate all pages:
for await (const budget of page) { console.log(budget); }

Credit Log

faction.creditlog.list()

Get faction credit log (paginated)
factionId
string
required
Faction UID
item_count
number
default:"50"
Number of items to retrieve. Default: 50, Max: 1000
pageDelay
number
Milliseconds to wait before fetching each subsequent page. Helps avoid rate limits during auto-pagination.
start_id
number
Oldest transaction ID threshold (1 = oldest 1000, 0/default = newest 1000)
start_index
number
default:"1"
Starting position (1-based). Default: 1
const creditlog = await client.faction.creditlog.list({ factionId: '20:123' });
const moreLogs = await client.faction.creditlog.list({ factionId: '20:123', start_index: 51, item_count: 100 });
const oldestLogs = await client.faction.creditlog.list({ factionId: '20:123', start_id: 1 });
// Fetch up to 1000 credit log entries at once
const manyLogs = await client.faction.creditlog.list({ factionId: '20:123', item_count: 1000 });

Credits

faction.credits.get()

Get faction credit balance. Returns the FactionCredits object directly — not wrapped in a Page.
factionId
string
required
The factionId parameter.
const credits = await client.faction.credits.get({ factionId: '20:123' });
console.log(credits); // access properties directly, not credits.data

faction.credits.transfer()

Transfer faction credits
amount
number
required
The amount parameter.
budget
string
The budget parameter.
factionId
string
required
The factionId parameter.
reason
string
The reason parameter.
recipient
string
required
The recipient parameter.

Members

faction.members.list()

List faction members (paginated)
factionId
string
required
The factionId parameter.
item_count
number
The item_count parameter.
pageDelay
number
The pageDelay parameter.
start_index
number
The start_index parameter.
const page = await client.faction.members.list({ factionId: '20:123' });
console.log(page.data); // FactionMember[]
// Iterate all pages:
for await (const member of page) { console.log(member); }

faction.members.updateMemberInfo()

Update faction member info field
factionId
string
required
Faction UID
new_value
string
required
New value for the info field
property
'info1' \| 'info2' \| 'info3'
required
Which info field to update (info1, info2, or info3)
uid
string
required
Character UID to update

Stockholders

faction.stockholders.list()

List faction stockholders (paginated)
factionId
string
required
The factionId parameter.
item_count
number
The item_count parameter.
pageDelay
number
The pageDelay parameter.
start_index
number
The start_index parameter.
const page = await client.faction.stockholders.list({ factionId: '20:123' });
console.log(page.data); // Stockholder[]
// Iterate all pages:
for await (const stockholder of page) { console.log(stockholder); }

Faction-owned entities

Ships, vehicles, facilities, stations, cities, and other entities owned by a faction are listed through the Inventory resource — there is no client.faction.entities accessor. Pass the faction UID as the uid argument:
// All ships owned by faction 20:123
const ships = await client.inventory.entities.list({
  uid: '20:123',
  entityType: 'ships',
  assignType: 'owner',
});

// All facilities owned by the faction
const facilities = await client.inventory.entities.list({
  uid: '20:123',
  entityType: 'facilities',
  assignType: 'owner',
});

// Faction inventory summary
const summary = await client.inventory.get({ uid: '20:123' });
See the Inventory resource for the full list of supported entityType values, filtering options, and pagination.

Character

Access character profiles and their faction associations.

Inventory

List ships, facilities, and other entities owned by a faction.