Skip to main content

P2P Trades

GET /api/public/v1/p2p-trades

Returns completed collector-to-collector trades.

Use this when you want to show accepted trades between DYLI users: who traded, which items moved on each side, whether USDC.e was part of the trade, and which P2P trading contract version was used.

Only accepted trades are public. Open, declined, and canceled trade offers stay out of this endpoint.

Query Parameters

NameDescription
participantDYLI username or wallet on either side of the trade. Example: alex.
usernameAlias for participant.
walletAlias for participant when you want to be explicit.
fromUsername or wallet for the sender side.
toUsername or wallet for the receiver side.
fromUsername, toUsernameUsername aliases for directional filters.
fromWallet, toWalletWallet aliases for directional filters.
contractVersionnew or legacy. Alias: contract_version.
acceptedAfterISO timestamp lower bound. Aliases: createdAfter, fromDate.
acceptedBeforeISO timestamp upper bound. Aliases: createdBefore, toDate.
page, pageSizePagination. Defaults to 25; pageSize max is 100.

Row Fields

Rows include trade_id, order_id, status, accepted_at, created_at, contract_version, contract_address, from, to, from_usdc, to_usdc, from_items, and to_items.

User objects include username, pfp, wallet, and a generated profile_url.

Item objects include token_id, quantity, product_id, name, url, metadata_url, metadata_advanced_url, image, brand, category, subcategory, and cert when available.

Examples

curl "https://www.dyli.io/api/public/v1/p2p-trades?participant=alex&page=1&pageSize=25" \
-H "x-api-key: $DYLI_API_KEY"
curl --get "https://www.dyli.io/api/public/v1/p2p-trades" \
-H "x-api-key: $DYLI_API_KEY" \
--data-urlencode "fromUsername=alex" \
--data-urlencode "contractVersion=new" \
--data-urlencode "acceptedAfter=2026-01-01T00:00:00.000Z"

The same request as a URL:

/api/public/v1/p2p-trades?fromUsername=alex&contractVersion=new&acceptedAfter=2026-01-01T00%3A00%3A00.000Z

/api/public/v1/p2p-trading also works as an alias.