Getting Started
1. Create an Account
-
A SideShift.ai account is automatically created in two ways:
- When creating a shift on the site
- When visiting the account page
-
Copy your Private Key – used as
x-sideshift-secret
. -
Copy your Account ID – passed as
affiliateId
.
.env
SIDESHIFT_SECRET=7c9c7e02b9281fe34df3daf98425421f
AFFILIATE_ID=YQMi62XMb
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 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 shift's status.