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.
x-sideshift-secret header is required. It can be obtained from the account page under the account secret.
x-sideshift-secret is your account's private key. Never share it with anyone as it grants full access to your account and should be kept confidential.
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%.
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
end-user IP address for integrations API requests
- application/json
Body
for coins where network is included in networksWithMemo array
required for non-native tokens (e.g. AXS, USDT) and multi-network native tokens (e.g. ETH).
required for non-native tokens (e.g. AXS, USDT) and multi-network native tokens (e.g. ETH).
integration's own ID
Responses
- 201
- 400
- 401
- 403
- 404
- 500
- application/json
- Schema
- Example
Schema
{
"id": "71449070046fcfee010z",
"createdAt": "2024-01-31T01:04:14.978Z",
"depositCoin": "ETH",
"settleCoin": "USDT",
"depositNetwork": "ethereum",
"settleNetwork": "ethereum",
"depositAddress": "0x44642E63D5a50e872Df2d162d02f9A259b247350",
"settleAddress": "0xde2642b2120fd3011fe9659688f76e9E4676F472",
"depositMin": "0.021551429911",
"depositMax": "17.06368164",
"refundAddress": "0xde2642b2120fd3011fe9659688f76e9E4676F472",
"type": "variable",
"expiresAt": "2024-02-07T01:04:14.978Z",
"status": "waiting",
"averageShiftSeconds": "45.830392",
"externalId": "integration-1234",
"settleCoinNetworkFee": "4.210057",
"networkFeeUsd": "4.21"
}
- application/json
- Schema
- Example
Schema
error object
{
"error": {
"message": "Bad request: Invalid parameters: settleAddress"
}
}
{
"error": {
"message": "Unknown affiliateId"
}
}
{
"error": {
"message": "Invalid externalId"
}
}
{
"error": {
"message": "Invalid receiving address"
}
}
{
"error": {
"message": "Invalid refundDestination"
}
}
{
"error": {
"message": "This refund address belongs to SideShift.ai"
}
}
{
"error": {
"message": "Commission rate cannot be higher than 0.02"
}
}
{
"error": {
"message": "Invalid parameters: commissionRate: Must be a positive number"
}
}
- application/json
- Schema
- Example
Schema
error object
{
"error": {
"message": "Do not use the example affiliateId and x-sideshift-secret header from the documentation. Use your own from https://sideshift.ai/account"
}
}
- application/json
- Schema
- Example
Schema
error object
{
"error": {
"message": "Access denied. See https://sideshift.ai/access-denied"
}
}
- application/json
- Schema
- Example
Schema
error object
{
"error": {
"message": "Account not found"
}
}
- application/json
- Schema
- Example
Schema
error object
{
"error": {
"message": "Invalid coin"
}
}
{
"error": {
"message": "Invalid network"
}
}
{
"error": {
"message": "Memo is not supported for this deposit coin"
}
}