-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Context
The ShapeShift affiliate revenue API aggregates fee data from multiple swap providers. CowSwap (CoW Protocol) is a DEX aggregator that ShapeShift integrates with. Adding CowSwap tracking increases revenue visibility.
Repository: shapeshift/unchained
Location: node/proxy/api/src/affiliateRevenue/
CowSwap Integration Details
API Base URL: https://api.cow.fi
How ShapeShift tracks affiliate: CowSwap uses appData - a hash that encodes metadata including the referrer/affiliate. Need to research how ShapeShift's appData is generated and how to query orders by appData.
Acceptance Criteria
- Research CowSwap API for order history endpoints
- Identify how to filter orders by ShapeShift affiliate (appData or other mechanism)
- Create
cowswap.tstracker following existing patterns - Handle pagination if the API requires it
- Extract fee data from order responses
- Add 'cowswap' to services array in
models.ts - Import and call cowswap tracker in
index.ts
Files to Create/Modify
node/proxy/api/src/affiliateRevenue/cowswap.ts(new file)node/proxy/api/src/affiliateRevenue/index.ts(add import and integrate)node/proxy/api/src/models.ts(add 'cowswap' to services array)
Research Required
- CowSwap order history API: https://api.cow.fi/docs
- How appData works for affiliate tracking
- Whether there's a direct way to query by affiliate/partner
Reference
- CowSwap API docs: https://api.cow.fi/docs
- Main app CowSwap integration:
packages/swapper/src/swappers/CowSwapper/(in shapeshift/web repo)
coderabbitai
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog