registerAccount action. A successful registration returns a unique accountId — a decimal integer that identifies your account across every subsequent API call. You only need to register once per wallet address.
Registration also enrolls the account in a Market Deployer in the same atomic operation, so there is no “registered but not enrolled” state and no separate enrollUserToMarketDeployer call is needed for that deployer:
marketDeployerIdomitted — the account joins the default Market Deployer. If the default Market Deployer does not exist yet, the account is registered without joining one andenrolledMarketDeployerIdis0.marketDeployerId= N (N > 0) — the account joins Market Deployer N. If it does not exist, the whole registration is rejected and no account is created.marketDeployerId=0— the account is registered without joining any Market Deployer.
Registration requires a valid single-use invitation code, on Mainnet and Devnet alike. Pass
inviteCode at the envelope top level — alongside action, signature, and nonce — not inside the action object. The invitation code is not included in the signed payload.Endpoint
Request
- Default Market Deployer
- Chosen Market Deployer
Action Fields
string
required
type (required) — Must be the fixed string "registerAccount".string
required
address (required) — The wallet address you are registering. Must be 0x-prefixed and contain exactly 40 lowercase hexadecimal characters (EIP-55 checksummed addresses are also accepted).int32
marketDeployerId — The Market Deployer to join at registration, a JSON number in [0, 2147483647]. Omit to join the default Market Deployer; 0 registers without joining one. A value outside the range returns 400 INVALID_PARAM. A string such as "1" cannot be encoded as uint32 for signing and returns 401 SIGNATURE_INVALID.Envelope-Level Fields
string
inviteCode — A 6-character alphanumeric invitation code. Required on Mainnet and Devnet. Do not include this field inside action — it must sit at the top level of the request body alongside action, signature, and nonce. It is not part of the signature.Response
accountId and enrolledMarketDeployerId sit directly under response; this action has no data object.
string
Your new account’s unique identifier, encoded as a decimal string representing an int64. Store this value — you will need it for collateral operations, order placement, and any action that references your account.
int
The Market Deployer the account joined in this registration.
0 means it joined none — either the request passed 0, or it omitted the field and the default Market Deployer does not exist yet.A new account starts with no balance. The account exists only after this action returns a successful response with an
accountId; funds sent to the address or its Market Deployer margin before then are not credited. Deposit funds on Mainnet (for Devnet funds, contact the UpsideMAX team), move chain-level funds into the Market Deployer with lockCollateral, and check userAccount until marginAvailableForOrder is non-zero before trading.Errors
Next Steps
1
Save your accountId
Store the returned
accountId securely in your application config or database. All collateral and position operations reference it.2
Enroll in other Market Deployers
Registration enrolls you in one Market Deployer (
enrolledMarketDeployerId). To trade contracts of another Market Deployer, call enrollUserToMarketDeployer.3
Confirm your margin
Poll
userAccount until margin is available in the Market Deployer you joined.4
Place your first order
Use the
order action to open a perpetual position.