Parameters
Path
Protected routes live under /p/{projectSlug}/....
Dynamic segments use {paramName} templates from the directory:
await client.marketplace.callEndpoint({
projectSlug: "demo-api",
pathTemplate: "/tokens/{mint}/price",
pathParams: { mint: "So111..." },
method: "GET",
});
Body
For POST / PUT / PATCH, pass JSON-serializable data as body:
await client.marketplace.call({
path: "/p/demo-api/summarize",
method: "POST",
body: {
text: "Long article...",
maxSentences: 3,
},
});
Query strings
Include query parameters in the path string:
await client.marketplace.call({
path: "/p/demo-api/search?q=solana&limit=10",
method: "GET",
});
Headers
Pass additional headers when the endpoint documents them. Do not set X-PAYMENT yourself — the SDK adds it after payment.
Follow each API’s published examples from Discover endpoints.