---
updatedAt: 2026-06-02T19:45:43.000Z
agentTools:
  projectIndex: https://docs.zerohash.com/llms.txt
---

# Unstake assets

Execute unstaking operation to withdraw staked assets. Funds will become available after the network-specific cooldown period.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "zerohash API",
    "description": "\n### Authentication\n\nzerohash Uses HMAC SHA-256 verification to ensure the authenticity of API requests, follow instructions by link [https://docs.zerohash.com/reference/api-authentication](https://docs.zerohash.com/reference/api-authentication)\n\n<a href=\"/zh-swagger.json\">Download zerohash OpenAPI Schema as JSON</a>\n",
    "version": "1.7.0"
  },
  "servers": [
    {
      "url": "https://api.cert.zerohash.com",
      "description": "Certification API server"
    }
  ],
  "x-readme": {
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Staking",
      "description": "Staking, Unstaking and associated Rewards Services"
    }
  ],
  "paths": {
    "/stakes/unstake": {
      "post": {
        "tags": [
          "Staking"
        ],
        "summary": "Unstake assets",
        "description": "Execute unstaking operation to withdraw staked assets. Funds will become available after the network-specific cooldown period.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Signature"
          },
          {
            "$ref": "#/components/parameters/Timestamp"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "description": "Unstaking request details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostUnstakeBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Unstake request successfully submitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostUnstakeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed, including a restricted jurisdiction (JURISDICTION_RESTRICTED) or an unsupported asset (UNSUPPORTED_ASSET), checked before any funds move. Disabled assets remain eligible for unstaking.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StakingValidationErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Code403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Code404"
                }
              }
            }
          },
          "500": {
            "description": "Staking is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StakingValidationErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Code503"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiKey": [],
      "apiPassphrase": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "description": "Your API public key. See the [Authentication guide](https://docs.zerohash.com/reference/api-authentication) for how to obtain keys.",
        "in": "header",
        "name": "X-SCX-API-KEY"
      },
      "apiPassphrase": {
        "type": "apiKey",
        "description": "The passphrase associated with your API key, set when the key was created.",
        "in": "header",
        "name": "X-SCX-PASSPHRASE"
      }
    },
    "parameters": {
      "Signature": {
        "name": "X-SCX-SIGNED",
        "in": "header",
        "description": "HMAC-SHA256 signature of the request, base64-encoded. See the [Authentication guide](https://docs.zerohash.com/reference/api-authentication) for the exact signing formula.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "Timestamp": {
        "name": "X-SCX-TIMESTAMP",
        "in": "header",
        "description": "Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.",
        "required": true,
        "schema": {
          "type": "string",
          "example": "1678901234"
        }
      },
      "RequestId": {
        "name": "X-Request-Id",
        "in": "header",
        "description": "Optional client-supplied request ID used for tracing and idempotency. Must be a [UUID v4](https://www.uuidtools.com/uuid-versions-explained#version-4). When omitted, zerohash generates one and returns it in the response `X-Request-Id` header.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "schemas": {
      "Code403": {
        "type": "object",
        "description": "Authentication or authorization failed. `error` is always `true`; `message` explains which check failed (missing API key, bad signature, insufficient permission, etc.).",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "This api key does not have write permission to this endpoint"
          }
        }
      },
      "Code404": {
        "type": "object",
        "description": "The requested resource does not exist or is not visible to the caller.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "Not Found"
          }
        }
      },
      "Code503": {
        "type": "object",
        "description": "A downstream dependency was unavailable, timed out, or returned a retryable error. Safe to retry; the response carries an `x-zh-allowretry: true` header. Every error response also carries an `x-zh-errorcode` header with a machine-readable error code (`unknown` when the failing service does not supply one).",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "example": "Service Unavailable"
          }
        }
      },
      "PostUnstakeBody": {
        "type": "object",
        "properties": {
          "participant_code": {
            "type": "string",
            "description": "Participant identifier",
            "example": "CUST01"
          },
          "account_label": {
            "type": "string",
            "description": "Settlement account label. The account must already exist for the participant.",
            "example": "general"
          },
          "asset": {
            "type": "string",
            "pattern": "^[A-Za-z0-9.]+$",
            "description": "Asset to unstake. Letters, digits and dots only. Case-insensitive: the symbol is converted to uppercase, so eth and ETH are the same asset.",
            "example": "ETH"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]+(\\.[0-9]+)?$",
            "description": "Amount to unstake, as a decimal string greater than zero (for example 1 or 0.5).",
            "example": "5.0"
          }
        },
        "required": [
          "participant_code",
          "account_label",
          "asset",
          "amount"
        ]
      },
      "PostUnstakeResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Request identifier",
            "example": "8bb7e203-13e0-4208-80bc-e9fdb7faa13e"
          },
          "message": {
            "type": "object",
            "properties": {
              "unstake_id": {
                "type": "string",
                "description": "The unique identifier of the unstake request",
                "example": "c761fc96-5c44-40d4-8eb2-3fcd5d06757d"
              },
              "participant_code": {
                "type": "string",
                "description": "Participant identifier",
                "example": "CUST01"
              },
              "asset": {
                "type": "string",
                "description": "Asset being unstaked",
                "example": "ETH"
              },
              "account_group": {
                "type": "string",
                "description": "Account group (usually the platform code)",
                "example": "CUST01"
              },
              "account_label": {
                "type": "string",
                "description": "Settlement account label",
                "example": "general"
              },
              "amount": {
                "type": "string",
                "description": "Amount being unstaked",
                "example": "5.0"
              },
              "status": {
                "type": "string",
                "description": "Status of the unstake request",
                "enum": [
                  "submitted",
                  "queued",
                  "canceled",
                  "broadcasted",
                  "confirmed",
                  "unstaked",
                  "failed"
                ],
                "example": "submitted"
              },
              "cooldown_period_days": {
                "type": "integer",
                "deprecated": true,
                "description": "Number of days for cooldown period. Deprecated: use `estimated_available_at`.",
                "example": 8
              },
              "estimated_available_at": {
                "type": "string",
                "format": "date-time",
                "description": "Estimated time when funds will be available",
                "example": "2025-09-03T16:00:00Z"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when unstake was created",
                "example": "2025-08-24T16:00:00Z"
              }
            }
          }
        }
      },
      "StakingValidationErrorResponse": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Error code",
            "example": "VALIDATION_FAILED"
          },
          "message": {
            "type": "string",
            "description": "Error message",
            "example": "Staking validation failed"
          },
          "details": {
            "type": "object",
            "properties": {
              "participant_code": {
                "type": "string",
                "example": "XXXXXX"
              },
              "stake_id": {
                "type": "string",
                "example": "c761fc96-5c44-40d4-8eb2-3fcd5d06754e"
              },
              "asset": {
                "type": "string",
                "example": "ETH"
              },
              "validation_checks": {
                "type": "object",
                "properties": {
                  "jurisdiction_allowed": {
                    "type": "boolean",
                    "example": true
                  },
                  "terms_accepted": {
                    "type": "boolean",
                    "example": false
                  },
                  "platform_restrictions": {
                    "type": "string",
                    "example": "none"
                  },
                  "sufficient_balance": {
                    "type": "boolean",
                    "example": true
                  }
                }
              }
            }
          },
          "user_message": {
            "type": "string",
            "description": "User-friendly error message",
            "example": "Please accept terms and conditions to proceed"
          },
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "Request identifier, echoes the X-Request-Id request header",
            "example": "8bb7e203-13e0-4208-80bc-e9fdb7faa13e"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the error occurred",
            "example": "2026-09-22T16:00:00Z"
          }
        }
      }
    }
  }
}
```