Profile Offers
How to retrieve a user's NFT offers 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 offers for
const WALLET_ADDRESS = "addr1qx33ycd2ymg02dxh6vnnf8dsk54l8ranr9cfjk9qrlj3309c69jc4n8h3uvnczncaqu2sm03pl99h99n75uvtl3mhv0q3z8s8m";Type Definitions
interface ProfileOffersRequest {
address: string;
limit?: number;
cursor?: string;
}
interface AssetWithUnit {
policyId: string;
name: string;
assetName: string;
onChainAssetName: string;
image: string;
media?: string;
unit: string;
}
interface Offer {
policyId: string;
assetName: string;
offerAmount: string;
txHash: string;
outputIndex: number;
ownerAddress: string;
ownerStakeKeyhash: string;
createdAt: string;
asset?: AssetWithUnit | null;
}
interface ProfileOffersResponse {
results: Offer[];
pageState: string | null;
}Implementation
Step 1: Prepare the Request Parameters
Available Parameters
Parameter
Type
Required
Description
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?

