Skip to main content

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

  1. A SideShift.ai account is automatically created in two ways:

    • When creating a shift on the site
    • When visiting the account page
  2. Copy your Private Key – used as x-sideshift-secret.

    warning

    Never share your Private Key with anyone. It grants full access to your account and should be kept secret.

  3. Copy your Account ID – passed as affiliateId.

    info

    Your account represents your integration, not your individual users. Use the same credentials for all shift requests. End users are identified by their shiftId — you do not need to create a separate account for each user.

.env
SIDESHIFT_SECRET=2d880aab08340f43c3803515f19a0ebf #REPLACE WITH YOUR SIDESHIFT ACCOUNT SECRET
AFFILIATE_ID=YQMi62XMb #REPLACE WITH YOUR SIDESHIFT ACCOUNT ID

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.

warning

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.

Relevant Resources