Getting Started with Crypto Swaps
Leverage SideShift's trading infrastructure to add fast, direct-to-wallet shifts to your project. Our API lets you request quotes, create shifts, and support 200+ assets across multiple networks. Track your earnings and configure automatic withdrawals via your dashboard.
1. Create an Account
-
A SideShift.ai account is created in three ways:
- When creating a shift on the site
- When visiting the account page
- Programmatically via
POST /v2/create-account
-
Copy your Private Key – used as
x-sideshift-secret.warningNever share your Private Key with anyone. It grants full access to your account and should be kept secret.
-
Copy your Account ID – passed as
affiliateId.infoYour account represents your integration, not your individual users. Use the same credentials for all shift requests. End users are identified by their
shiftId. Create another account only to rotate credentials.
SIDESHIFT_SECRET=2d880aab08340f43c3803515f19a0ebf #REPLACE WITH YOUR SIDESHIFT ACCOUNT SECRET
AFFILIATE_ID=YQMi62XMb #REPLACE WITH YOUR SIDESHIFT ACCOUNT ID
SideShift does not issue API keys. Soft authentication is your account private key, sent as the x-sideshift-secret header.
2. Request a Quote
curl -L 'https://sideshift.ai/api/v2/quotes' \
-H 'Content-Type: application/json' \
-H 'x-sideshift-secret: $SIDESHIFT_SECRET' \
-d '{
"depositCoin": "eth",
"depositNetwork": "arbitrum",
"settleCoin": "eth",
"settleNetwork": "mainnet",
"depositAmount": "0.14364577",
"settleAmount": null,
"affiliateId": "$AFFILIATE_ID"
}'
Save the returned id as QUOTE_ID.
3. Create a Fixed Shift
curl -L 'https://sideshift.ai/api/v2/shifts/fixed' \
-H 'Content-Type: application/json' \
-H 'x-sideshift-secret: $SIDESHIFT_SECRET' \
-d '{
"settleAddress": "0xde2642b2120fd3011fe9659688f76e9E4676F472",
"affiliateId": "$AFFILIATE_ID",
"quoteId": "QUOTE_ID"
}'
Display the depositAddress to your user and poll /v2/shifts/{shiftId} to monitor the shift's status.
The returned shift id is sensitive data. The order page is reachable by ID alone, so anyone with the ID can open it and, if the refundAddress was not set at order creation, choose where a refund is sent or cancel the order.