Skip to main content

Create variable shift

POST 

/shifts/variable

For variable rate shifts, the settlement rate is determined when the user's deposit is received.

For shifts that return a depositMemo, the deposit transaction must include this memo, otherwise the deposit might be lost.

For shifts settling in coins where the network is included in the networksWithMemo array in the /v2/coins, integrations can specify a settleMemo field, for example "settleMemo": "123343245".

When defining non-native tokens like AXS and USDT for depositCoin and/or settleCoin, the depositNetwork and settleNetwork fields must also be specified. This also applies to native tokens like ETH that supports multiple networks. depositCoin can also be a token contract address for the selected depositNetwork when you need to target a specific token implementation.

info

When a shift is created with a contract address in depositCoin, the response will normalize depositCoin back to the canonical asset ticker, such as USDC.

Authentication is required: sign the request or send the legacy x-sideshift-secret header, found on the account page under the account secret.

warning

Authenticate by signing the request or with the legacy x-sideshift-secret header. Your Ed25519 secret key and your account secret each grant full access to your account. Never share them.

refundAddress and refundMemoare optional, if not defined, user will be prompted to enter a refund address manually on the SideShift.ai order page if the shift needs to be refunded.

commissionRate optional parameter can be used to adjust rates for your users. The default commission rate is 0.5%. Rates below the default offer better rates by reducing affiliate commission, while rates above the default are passed on to the user. The maximum commission rate is 2%.

info

Use the same commissionRate in the /v2/pair and /v2/pairs endpoints as when creating the shift/quotes to get an accurate rate information. See Monetization for detailed examples of how commission rates affect rates.

If the API requests are sent from the integration’s own server, the x-user-ip header must be set to the end-user IP address; otherwise, the requests will be blocked. See Permissions.

averageShiftSeconds represents the average time in seconds it takes for SideShift to process a shift once the user’s deposit is confirmed on the blockchain.

settleCoinNetworkFee represents the estimated sum of network fees charged for the shift denominated in settle coin.

networkFeeUsd represents the estimated sum of network fees charged for the shift denominated in USD.

externalId is an optional field that can be used to pass an integration's own ID to the API.

Request​

Header Parameters

    x-sideshift-key string

    Your Ed25519 public key, hex encoded. Required when signing the request. See Authentication.

    x-sideshift-timestamp string

    Current Unix time in milliseconds, the same value used in the signed message. Must be within 60 seconds of server time. Required when signing the request.

    x-sideshift-signature string

    Ed25519 signature of timestamp + METHOD + path + body, hex encoded. Required when signing the request. See Authentication.

    x-sideshift-secret string

    Legacy account secret. Not needed when the request is signed with the x-sideshift-key, x-sideshift-timestamp and x-sideshift-signature headers. See Authentication.

    x-user-ip string

    end-user IP address for integrations API requests

Body

    settleAddressstringrequired
    settleMemostring

    for coins where network is included in networksWithMemo array

    refundAddressstring
    refundMemostring
    depositCoinstringrequired

    ticker or token contract address for the selected depositNetwork

    settleCoinstringrequired
    depositNetworkstring

    required for non-native tokens (e.g. AXS, USDT) and multi-network native tokens (e.g. ETH).

    settleNetworkstring

    required for non-native tokens (e.g. AXS, USDT) and multi-network native tokens (e.g. ETH).

    affiliateIdstringrequired
    externalIdstring

    integration's own ID

Responses​

OK
Schema
    idstringrequired
    createdAtstringrequired
    depositCoinstringrequired
    settleCoinstringrequired
    depositNetworkstringrequired
    settleNetworkstringrequired
    depositAddressstringrequired
    depositMemostring
    settleAddressstringrequired
    settleMemostring
    depositMinstringrequired
    depositMaxstringrequired
    refundAddressstring
    refundMemostring
    typestringrequired
    expiresAtstringrequired
    statusstringrequired
    averageShiftSecondsstring
    externalIdstring
    settleCoinNetworkFeestringrequired
    networkFeeUsdstringrequired