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 hasMemo
is true
in the /coins
endpoint, API users are allowed to 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.
refundAddress
and refundMemo
are 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.
x-sideshift-secret
is your account's private key.
commissionRate
optional parameter can be used to offer a better rate for your users by reducing the affiliate commission paid by SideShift.
If the API requests are sent from the integrations 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 users deposit is confirmed in 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 with hasMemo is true
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).
integrations 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.005"
}
}
{
"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"
}
}