Base URLs

Frontend access will be needed for API key creation and some withdrawal address book management actions.

Production environment: Public order books with real deposits and withdrawals.

Production Frontend: https://trade.enclave.market

Production Backend: https://api.enclave.market

Server location: Virginia, United States

Development environment: Access can be granted by sending a member of the Enclave team a list of wallet addresses to whitelist. API is identical to production, but has separate order books. Runs using mainnet tokens.

Development Frontend: https://staging.enclavemarket.dev

Development Backend: https://api-staging.enclavemarket.dev

Server location: Virginia, United States

Sandbox environment: Allows for fake deposits so trading API integration can be testing without going through the real deposit flow. Real transfer related endpoints are disabled.

Sandbox Frontend: [<https://sandbox.enclave.market>](<https://sandbox.enclave.market>)

Sandbox Backend: https://api-sandbox.enclave.market

Server location: Virginia, United States

Generic Response:

All responses from the REST API are wrapped in a generic response, with the following potential fields.

Name Type Required
success bool false
result any true
error string true
error_code string true

Example Generic Response:

{
  "result": {
    <any>
  },
  "success": true
}

If success is true, result will be non-empty. If success is false, error and error_code will be non-empty.

Example error response:

When attempting to get a nonexistent order on spot

Name Type Description Example Required
error string explanation if the request was not successful "order not found: 2fa34a324, accountID: 3c53ff4e07" No
error_code string Enclave error code "order_not_found" No
success boolean whether the request was successful false Yes
{
	"error":"order not found: 2fa34a324, accountID: 3c53ff4e07",
	"error_code":"order_not_found",
  "success": false
}

HTTP response status codes: