Skip to main content
A market deployer is an isolated trading environment with its own smart contract set and collateral pool. When you register your account, Upside automatically enrolls you in the default (bootstrap) market deployer. If you want to trade contracts belonging to a different market deployer, or transfer collateral to one, you must explicitly enroll in it first using the enrollUserToMarketDeployer action. This action is idempotent: submitting it when you are already enrolled does not produce an error — the server simply returns enrolled: false to indicate no new enrollment was created. You can safely call it as a precondition check before any market-deployer-specific operation.
You must have a registered account before calling this action. If the signing wallet has not been registered, the server returns HTTP 400.

Prerequisites

  • A registered account (see registerAccount)
  • The numeric ID of the market deployer you want to join

Request

Action Fields

string
required
Must be the fixed string "enrollUserToMarketDeployer".
int32
required
The numeric identifier of the market deployer you want to enroll in. Contact the market deployer operator or query the read API to discover available IDs.

Response

Response Fields

int32
The market deployer the account is now enrolled in, echoing the requested ID.
boolean
true if this is the first time your account has enrolled in the specified market deployer. false if you were already enrolled — this is not an error; the operation is idempotent.
integer
A non-zero value indicates a business-level rejection. 0 or absent means success. Check this field even when status is "ok".
string
A human-readable description of the rejection when errorCode is non-zero. For example: "unknown marketDeployer" when the requested ID does not exist.
"status": "ok" confirms the request was received and processed by the server. It does not guarantee enrollment succeeded. Always inspect errorCode and errorMessage inside response.data to confirm the business outcome — for example, passing an unknown marketDeployerId returns status: "ok" with a non-zero errorCode.

Error Reference

Do not confuse a business rejection (errorCode != 0 inside the response body) with an HTTP error. The server returns HTTP 200 for both successful enrollments and unknown-deployer rejections. Your client must always read errorCode to determine the true outcome.

Next Steps

1

Verify enrollment

Check that enrolled: true (or enrolled: false if you expected to already be enrolled) and that errorCode is 0 or absent.
2

Lock collateral into the deployer

Use lockCollateral to deposit funds into the market deployer’s collateral pool before placing orders.
3

Start trading

With collateral locked, you can now place orders on contracts belonging to this market deployer using the order action.