Account Structure
A wallet owner can register an account on Orderly for each builder that is supported. Each wallet owner could thus have multiple accounts (that are not interlinked with each other) registered with Orderly.Account ID
Each account is identified by an account id, which can be calculated by1
Converting the wallet address to bytes
2
Converting the keccak256 hash of the `brokerId` string to bytes
3
ABI encoding (1) and (2)
4
Converting back to Hex String, the keccak256 hash of the result of (3)
Account Registration
Follow the following steps to register an account on Orderly:1
Choose a valid chain/builder to register the account on
List of chains can be found here and supported builders through Get list of builders API.
2
3
Obtain a registration nonce
Get a nonce from Get Registration Nonce API.
Example code
Example code
4
Obtain a signature from EIP-712
Sign a message from the wallet in the following format using the EIP-712 standard and obtain the signature.where:
Name | Type | Required | Description |
---|---|---|---|
brokerId | string | Y | Builder ID |
chainId | int | Y | Chain ID of registering chain (within those that are supported by the Network) |
timestamp | timestamp | Y | timestamp in UNIX milliseconds |
registrationNonce | string | Y | Valid nonce from Get Registration Nonce |
Example code
Example code
5
Register account
Send all the necessary information via Register account API.
Example code
Example code