Skip to main content
The client.market resource provides access to the Star Wars Combine in-game marketplace. Vendors are the sellers on the market — characters or factions that list assets for sale. You can list all vendors to browse the marketplace or fetch a specific vendor by UID to inspect their listings in detail.

Listing vendors

market.vendors.list()

Returns a paginated list of all active market vendors.
start_index
number
default:"1"
1-based index of the first vendor to return.
item_count
number
default:"50"
Number of vendors per page.
const vendors = await client.market.vendors.list();

console.log(vendors.total); // Total number of active vendors

for await (const vendor of vendors) {
  console.log(vendor.name, vendor.uid);
}

Getting a single vendor

market.vendors.get()

Retrieves a specific vendor and their listings by UID.
uid
string
required
The vendor UID in "type:id" format.
const vendor = await client.market.vendors.get({ uid: '12:456' });

console.log(vendor.name);
console.log(vendor.listings);

Full example

import { SWCombine } from 'swcombine-sdk';

const client = new SWCombine({ token: process.env.SWC_ACCESS_TOKEN! });

// Browse the first page of vendors
const firstPage = await client.market.vendors.list({ item_count: 25 });

console.log(`${firstPage.total} vendors on the market`);

// Get details for the first vendor
if (firstPage.data.length > 0) {
  const vendor = await client.market.vendors.get({
    uid: firstPage.data[0].uid,
  });
  console.log(`Vendor: ${vendor.name}`);
}

// Auto-paginate through all vendors
for await (const vendor of await client.market.vendors.list()) {
  console.log(vendor.name, vendor.uid);
}
The market can have many vendors. If you need to find a specific seller, paginate through vendors.list() and filter client-side, or fetch by UID directly if you already know it.

Inventory

List the assets a character owns that could be listed for sale.

Character

Transfer credits after completing a trade.

Types

Look up entity type definitions for items listed on the market.

Pagination

Learn how Page<T> works and how to auto-paginate vendor lists.