Integration Guide
Base URL:
https://pusher-cdp.x.ubtk.devSwagger UI: https://pusher-cdp.x.ubtk.dev/api-docs TypeScript SDK: @crosscurve/sdk General Documentation: https://docs.crosscurve.fi
Table of Contents
Integration Overview
Minimum Flow
Example: Swap CRV (Arbitrum) → CRV (Ethereum)
Example for understanding the flow. Verify current addresses via
/tokenlist.
Important: Addresses must be in checksum format (EIP-55). Use
ethers.utils.getAddress(address)for conversion.
Test Examples
Arbitrum (42161)
Ethereum (1)
CRV
CRV
Optimism (10)
Arbitrum (42161)
USDC
USDC
Arbitrum (42161)
Polygon (137)
USDT
USDT
Get token addresses from
/tokenlist.
If No Route Found
If /routing/scan returns an empty array []:
Check that tokens have the
can_swaptagTry changing the amount (too small/large)
Try a different token pair
Route requires liquidity in supported pools
cURL Examples for Quick Testing
Test the API without writing code:
TypeScript SDK
Alternative to direct API calls — TypeScript SDK with type safety and built-in auto-recovery.
Installation
Quick Example
Key Methods
init()
Load chains and tokens
getQuote()
Get quote
executeQuote()
Execute swap
trackTransaction()
Track status
recover()
Manual recovery
Supported Providers
ViemAdapter (recommended)
EthersV6Adapter
EthersV5Adapter
Web3Adapter
Integration Architecture
Cross-Chain Swap Stages
1. Discovery
Get reference data
GET /networks, GET /tokenlist
2. Routing
Find available routes (includes signature)
POST /routing/scan
3. Transaction
Build calldata
POST /tx/create
4. Approval
Allow token spending
token.approve() (ERC-20)
5. Execution
Send transaction
signer.sendTransaction()
6. Lookup
Get requestId
GET /search?search={txHash}
7. Tracking
Track status
GET /transaction/{requestId}
Supported Networks
Get current list via GET /networks. Examples:
Ethereum
1
ethereum
Arbitrum
42161
arbitrum
Optimism
10
optimism
Polygon
137
polygon
BSC
56
bsc
20+ EVM networks supported. See
/networksfor current list.
Reference Data
GET /networks
Get list of supported blockchain networks.
Query Parameters:
type
number
Filter: 0 - mainnet, 1 - testnet
Example Request:
Example Response:
Important: Keys are network names (
ethereum), not chainId.
GET /tokenlist
Get list of tokens.
Example Request:
Example Response:
Important: Keys are network names. For swaps, check that token has
can_swaptag.
Main Token Tags:
can_swap
Available for cross-chain swap
stable
Stablecoin
native
Native network token (ETH, BNB...)
wrapped_native
Wrapped version (WETH, WBNB...)
curve_lp
Curve LP token
GET /prices/{token}
Get token price in USD.
Path Parameters:
token
string
Token address (checksum)
Important: Use token address, not symbol. Symbols (USDC, CRV) are not supported. Recommended to use
/prices/{token}/{chainId}for unambiguity.
Example:
GET /prices/{token}/{chainId}
Get token price in specific network.
Example:
Example Response: 0.999827 (number, price in USD)
POST /prices
Batch get prices for multiple tokens.
Request Body:
Response:
Executing Cross-Chain Swaps
POST /routing/scan
Find available routes for swap.
Headers:
Content-Type
Yes
application/json
api-key
No
Partner API key (Free or Standard). When provided, response includes feeShare, feeShareRecipient, feeShareToken fields. Standard keys also allow setting feeShareBps
Request Body:
Parameters:
params.chainIdIn
number
Yes
Source chain ID
params.chainIdOut
number
Yes
Target chain ID
params.tokenIn
string
Yes
Source token address
params.tokenOut
string
Yes
Target token address
params.amountIn
string
Yes
Amount in smallest units
slippage
number
Yes
Allowed slippage (%)
feeFromAmount
boolean
No
Deduct fee from input amount
feeToken
string
No
Token address to pay fees in
from
string
No
User wallet address (for gas estimation)
feeShareBps
number
No
Integrator commission in basis points (e.g., 50 = 0.5%). Only works with Standard API keys
providers
string[]
No
Filter routing providers (e.g., ["AXELAR", "LAYER_ZERO"])
Response:
Additional Response Fields:
sourceFee
Fee on source chain (token, amount, usd)
deliveryFee
Delivery fee (token, amount, usd)
feeShare
Partner fee share (only with api-key)
feeShareRecipient
Partner fee recipient address
feeShareToken
Partner fee token
consumptions
Gas consumption breakdown by bridge
signature
Route signature (for CDP API)
Response structure: Array of objects where each object is a separate route. Select one route and pass it entirely to
/tx/create. Theroutefield inside the object is an array of steps for that route.
Empty array
[]— no route found. See If No Route Found.
POST /estimate
DEPRECATED: This endpoint is no longer supported. The signature is now included directly in the
/routing/scanresponse. Use the route from/routing/scandirectly in/tx/create.
Get operation estimate with signature for execution.
Request Body: Entire route object from /routing/scan (pass whole object, not individual fields)
Response:
POST /tx/create
Build transaction data for blockchain submission.
Request Body:
Parameters:
from
string
Yes
Sender address
recipient
string
Yes
Recipient address
routing
object
Yes
Entire object of route from /routing/scan (includes signature)
estimate
object
No
DEPRECATED — not required, signature is already included in routing
permit
object
No
EIP-2612 permit signature
buildCalldata
boolean
No
Build calldata
Note: The
estimatefield is no longer required — signature is already included in theroutingobject from/routing/scan.
Response (with buildCalldata: true): — recommended
Ready for sendTransaction({ to, data, value }).
Response (without buildCalldata):
Requires call via ethers.Contract.
Token Approval
Before executing a swap, you must allow the CrossCurve contract to use your tokens.
Where to get spenderAddress? Use
txData.tofrom/tx/createresponse — this is the contract address that will spend your tokens.
Standard Approve (ERC-20)
Permit (EIP-2612) - Approve via Signature
If token supports EIP-2612 (permit: true field in tokenlist), you can use a signature instead of approve transaction.
Transaction Tracking
GET /transaction/{requestId}
Get cross-chain transaction status.
Parameters:
requestId
string
Unique operation ID
Response:
Possible Statuses:
in progress
Operation in progress
completed
Successfully completed
failed
Execution error
reverted
Reverted (requires inconsistency)
retry
Ready for retry via alternative bridge
canceled
Canceled
Status Handling Algorithm:
Extended Response with bridgeState:
GET /search
Search transactions by hash or requestId.
Parameters:
search
string
Yes
Transaction hash or requestId
limit
number
No
Results limit
offset
number
No
Offset
Example:
GET /history
User transaction history.
Parameters:
address
string
Yes
Wallet address
Example:
Error Handling
Scenarios
status: "completed"
Operation completed ✅
destination.status: "retry"
Call /tx/create/retry for retry via alternative bridge
destination.emergency: true
Call /tx/create/emergency for recovery
inconsistency: true
Call /inconsistency for refund
GET /inconsistency/{requestId}
Get parameters for refund on inconsistency.
Example:
POST /inconsistency
Create refund transaction.
Flow:
Call
GET /inconsistency/{requestId}— get parameters (tokenIn, tokenOut, chainIdIn, chainIdOut, amountIn)Sign refund data with user wallet (EIP-712 or personal_sign)
Pass signature and original route to this endpoint
Request Body:
Parameters:
requestId
string
Yes
Operation ID with inconsistency
signature
string
Yes
User signature (65 bytes hex)
routing
object
Yes
Original route from /routing/scan
permit
object
No
EIP-2612 permit (if token supports)
POST /tx/create/emergency
Emergency recovery of locked funds.
When to use: When
destination.emergency: truein transaction status — funds are locked on destination chain and require manual recovery.
Request Body:
Parameters:
requestId
string
Yes
Locked operation ID
signature
string
Yes
User signature (65 bytes hex)
Response: Returns transaction data for fund recovery.
POST /tx/create/retry
Retry delivery via alternative bridge.
When to use: When
destination.status: "retry"— delivery via one bridge failed, but alternative bridges are available.
Request Body:
Parameters:
requestId
string
Yes
Operation ID for retry
signature
string
Yes
User signature (65 bytes hex)
Response:
Usage Example:
Creating Signature for Emergency/Inconsistency/Retry
For /tx/create/emergency and /inconsistency endpoints, a signature confirming wallet ownership is required.
Common API Errors
Can't find receiveRequest
requestId not found
Verify requestId
Can't find paymentTx
Transaction not found
Verify requestId
Routing signature not valid
Route expired or changed
Repeat /routing/scan
Already completed
Transaction completed
No action required
Not an emergency
Emergency conditions not met
Wait or check status
Uncorrect user address
Signature not from owner
Sign with wallet from from
invalid signature string
Invalid signature format
Verify 65-byte hex signature
Retry is not supported for single bridge
Only one bridge available
Use emergency instead of retry
No remaining bridges available
All bridges already used
Use emergency
API Reference
Endpoint List
Reference Data
GET
/networks
List of networks
GET
/tokenlist
List of tokens
GET
/validators
Validator status
GET
/ready
Service readiness
GET
/prices/{token}
Token price
GET
/prices/{token}/{chainId}
Price in network
POST
/prices
Batch prices
Routing and Swap
POST
/routing/scan
Find routes (includes signature)
POST
/estimate
DEPRECATED — Operation estimate
POST
/tx/create
Create transaction
Monitoring
GET
/transaction/{requestId}
Transaction status
GET
/search
Search transactions
GET
/history
User history
GET
/transactions
Transaction list
Error Handling
GET
/inconsistency/{requestId}
Refund parameters
POST
/inconsistency
Refund transaction
POST
/tx/create/emergency
Emergency recovery
POST
/tx/create/retry
Retry via alternative bridge
Supply and Statistics
Values are dynamic, examples current at time of testing.
GET
/supply/eywa/ts
Total Supply EYWA
number
GET
/supply/eywa/ms
Max Supply EYWA
number
GET
/supply/eywa/cmc
Data for CoinMarketCap
number
GET
/supply/eywa/cg
Data for CoinGecko
{"result":"..."}
GET
/points/multipliers
Points multipliers
object
NFT Operations
GET
/nft/rarity
NFT rarity
tokens (query, string) ⚠️
POST
/nft/estimate
NFT operation estimate
wallet, tokenIds (array of numbers)
POST
/nft/tx
Create NFT transaction
wallet, tokenIds, estimate
POST
/nft/emergency
NFT emergency operation
requestId, signature
⚠️ Known bug:
GET /nft/raritydoes not parsetokensquery parameter. Endpoint temporarily unavailable.
NFT Operations Flow:
Code Examples
Main flow in Integration Overview section.
TypeScript: Types and Polling
JavaScript: Getting Networks and Tokens
Python: Finding Route
Route Operation Codes
A
Add liquidity
S
Swap
R
Remove liquidity
LM
Lock/Mint
BU
Burn/Unlock
BM
Burn/Mint
Uw
Unwrap (unwrap native token)
W
Wrap (wrap native token)
M
Emergency Mint
U
Emergency Unlock
Rate Limits and Best Practices
API Keys
Two types of API keys are available:
Key Type
Requests/Minute
Commission
feeShareBps
Free
20
0%
Not available
Standard
60
From feeShareBps param
1–10000 bps
Pass the key in the api-key header:
API is accessible without a key, but a key is required for higher rate limits and commission earning.
Test keys for development:
Free:
test-sdk-test-sdk-test-sdk-freeStandard:
test-sdk-test-sdk-test-sdk-standard
To get a production API key, contact BD: @Eywa_BDLead / [email protected]
Rate Limits
/networks, /tokenlist
Cache locally
/routing/scan
On user request
/tx/create
After route selection
/transaction/{id}
Polling with interval
/prices
Cache when needed
Best Practices
Cache
/networksand/tokenlist— data changes rarelyChecksum addresses — EIP-55 format recommended for compatibility
Check
can_swapbefore calling/routing/scanCheck route freshness — routes have limited validity period
Polling — 5-10 sec interval, handle
inconsistencyandemergencySave requestId — store after sending transaction for tracking and recovery
Slippage — use appropriate values (0.5-1% for stables, 1-3% for volatile)
Use correct wallet for recovery signatures — must match
fromof original transactionAccount for token decimals — not all tokens have 18 decimals
Limitations
Minimum amount
Depends on token pair and liquidity
Maximum amount
Limited by pool liquidity
Slippage
Specified in percent when calling /routing/scan
Execution time
Depends on networks and oracle network load
Contract Addresses
Contract addresses available via /networks:
Portal
Entry point for cross-chain operations
portal
Synthesis
Synthetic token contract
synthesis
Router
Swap router
router
Fee Structure
Fee information is returned in /routing/scan response:
dex
DEX/pool fee
In each route step
bridge
Bridge fee
In bridgeIn/bridgeOut steps
aggregation
Aggregation fee
Total CrossCurve fee
total
Total fee
totalFee in route
FAQ
General Questions
Q: Is an API key required? A: The API is accessible without a key, but with limited rate (20 req/min). Two key types are available: Free (20 req/min, no commission) and Standard (60 req/min, commission via feeShareBps). See API Keys.
Q: Are there rate limits? A: Free keys — 20 requests/minute, Standard keys — 60 requests/minute. Cache reference data and avoid frequent requests.
Q: Which networks are supported? A: Current list available via GET /networks. EVM-compatible networks are supported.
Q: Why does /routing/scan return an empty array? A: No route found. See If No Route Found.
Technical Questions
Q: How to get requestId after sending transaction? A: RequestId is emitted in Portal contract events. Use GET /search?search={txHash} to find it.
Q: What to do with inconsistency: true? A: Refund required:
Call
GET /inconsistency/{requestId}— get parameters for signatureSign data with user wallet
Call
POST /inconsistencywithrequestId,signatureand originalrouting
Q: What to do with emergency: true? A: Fund recovery required. Call POST /tx/create/emergency with requestId and signature (user signature).
Q: How does permit (EIP-2612) work? A: If token supports permit (permit: true in tokenlist), you can sign permission offchain instead of separate approve transaction. Pass signature {v, r, s} to /tx/create.
Glossary
Portal
Entry point contract for cross-chain operations
Synthesis
Contract for minting/burning synthetic tokens
Router
Swap routing contract
RequestId
Unique identifier for cross-chain operation
Inconsistency
State requiring fund refund
Emergency
State requiring fund recovery
Retry
Retry delivery via alternative bridge
can_swap
Token tag indicating cross-chain swap capability
Synth
Synthetic token representing asset from another network
bridgeIn
Token lock operation on source chain
bridgeOut
Token unlock operation on destination chain
Oracle
CrossCurve validator network
Slippage
Allowed deviation from expected price
sourceFee
Fee on source chain
deliveryFee
Fee for delivery to target chain
feeShare
Partner fee share (when using api-key)
bridgeState
Delivery state for each bridge (AXELAR, LAYER_ZERO)
Changelog
API change history. Follow updates in Swagger UI.
2025-01
BREAKING: /estimate endpoint deprecated — signature now included in /routing/scan. Updated flow: routing/scan → tx/create → send TX
2025-01
Added: CDP API URL, api-key for partners, new routing params (feeFromAmount, feeToken, providers), sourceFee/deliveryFee/feeShare in response, /tx/create/retry endpoint, retry status, bridgeState
2025-12
Documentation created: Quick Start, API Reference, code examples
—
For current API changes, see Swagger UI
Support
Swagger UI: https://api.crosscurve.fi/api-docs/
Documentation: https://docs.crosscurve.fi
Twitter/X: @crosscurvefi
Partnership and API Keys
To receive a partner API key (fee sharing), contact BD:
Email: [email protected]
Telegram: @Eywa_BDLead
Last updated

