Profile Listings
How to retrieve a user's NFT listings from the Wayup Marketplace
Introduction
Requirements
API Request Structure
Configuration
// API endpoint for Wayup Marketplace
const BASE_URL = "https://prod.api.ada-anvil.app/marketplace/api";
// Wallet address to query listings for
const WALLET_ADDRESS = "addr1qx33ycd2ymg02dxh6vnnf8dsk54l8ranr9cfjk9qrlj3309c69jc4n8h3uvnczncaqu2sm03pl99h99n75uvtl3mhv0q3z8s8m";Type Definitions
interface ProfileListingsRequest {
address: string;
limit?: number;
cursor?: string;
policyId?: string;
term?: string;
}
interface AssetResult {
name: string;
policyId: string;
assetName: string;
media: string;
listing: {
txHashIndex: string;
price: string;
priceCurrency: string;
scriptHash: string;
bundleSize?: number;
isProcessing: boolean;
type: string;
version: string;
fees: {
service: {
pct: number;
};
royalty: {
minLovelace: number;
pct: number;
addr: string;
} | null;
};
};
collection?: {
policyId: string;
name: string;
image?: string;
royaltyPct?: number;
royaltyAddress?: string;
};
// Additional fields omitted for brevity
}
interface ProfileListingsResponse {
results: AssetResult[];
pageState: string | null;
}Implementation
Step 1: Build the Request URL
Step 2: Execute the Request
Step 3: Process the Response
Step 4: Display the Results
Step 5: Handle Pagination
Running the Example
Example Output
The Complete File
Best Practices
End-to-End Flow
Last updated
Was this helpful?

