Create fixed shift
POST/shifts/fixed
After requesting a quote, use the quoteId
to create a fixed rate shift with the quote. The affiliateId
must match the one used to request the quote.
For fixed rate shifts, a deposit of exactly the amount of depositAmount
must be made before the expiresAt
timestamp, otherwise the deposit will be refunded.
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"
.
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.
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
represent the average time in seconds it takes for SideShift to process a shift once the users deposit in confirmed in the blockchain
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 that hasMemo is true
affiliateId used to request the quote
integrations own ID
Responses
- 201
- 400
- 401
- 403
- 404
- 500
- application/json
- Schema
- Example
Schema
{
"id": "8c9ba87d02a801a2f254",
"createdAt": "2023-10-17T04:32:00.855Z",
"depositCoin": "ETH",
"settleCoin": "ETH",
"depositNetwork": "arbitrum",
"settleNetwork": "ethereum",
"depositAddress": "0xa20916158958168ff5668bF90C3753EcD333b0A2",
"settleAddress": "0xde2642b2120fd3011fe9659688f76e9E4676F472",
"depositMin": "1",
"depositMax": "1",
"refundAddress": "0xde2642b2120fd3011fe9659688f76e9E4676F472",
"type": "fixed",
"quoteId": "75cb6e56-a81b-45a9-8ab4-1f95bf92246g",
"depositAmount": "1",
"settleAmount": "0.98088036",
"expiresAt": "2023-10-17T04:36:47.050Z",
"status": "waiting",
"averageShiftSeconds": "44.526343",
"externalId": "integration-1234"
"rate": "0.98088036"
}
- application/json
- Schema
- Example
Schema
error object
{
"error": {
"message": "Bad request: Invalid parameters: quoteId"
}
}
{
"error": {
"message": "Quote has different affiliateId than input."
}
}
{
"error": {
"message": "Invalid receiving address"
}
}
{
"error": {
"message": "Invalid refundDestination"
}
}
{
"error": {
"message": "Invalid externalId"
}
}
- 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": "Quote has already been accepted. Request a new quote.",
"orderId": "8c9ba87d02a801a2f254"
}
}
{
"error": {
"message": "Internal Server Error"
}
}