registerAccount enrolls you in one Market Deployer — the default one, or the one named in its marketDeployerId. 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
type (required) — Must be the fixed string "enrollUserToMarketDeployer".int32
required
marketDeployerId (required) — The numeric identifier of the market deployer you want to enroll in. Contact the market deployer operator or query the Info 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 request enrolled your account in the specified Market Deployer for the first time. false if you were already enrolled — not an error; the operation is idempotent — or if the request was rejected, in which case errorCode is present and non-zero. Read errorCode to tell the two apart.number
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.Errors
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.