Query user information
Rate limit: 5 every second
API Overview
HTTP method
GET
Path
/api/v3/account
Summary
Returns data associated with the user's exchange account.
API description
HTTP Header
None
Request parameters
Field | Type | Required | Description | Example |
---|---|---|---|---|
owner | string | N | Ethereum address, either owner or accountId should be presented. | "0x123456" |
accountId | integer | N | AccountID, if owner is presented, it must be align with the owners accountId, otherwise an error occurs. | 10003 |
Request example
HTTP
CURL
GET https://api3.loopring.io/api/v3/account?owner=0x123456&accountId=10003 HTTP/1.1
Host: api3.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
curl https://api3.loopring.io/api/v3/account\?owner\=0x123456\&accountId\=10003
Response fields
Field | Type | Required | Description | Example |
---|---|---|---|---|
accountId | integer | Y | Account ID | 10 |
owner | string | Y | Ethereum address | "0xABCD" |
frozen | boolean | Y | The frozen state of the account, true stands for frozen, if the account is frozen, the user cant submit order. | "false" |
publicKey | Public Key |
Y | The user's public key | "{x:0x241707b cc6d7a4ccf10 304be248d343 a527e85f61b4 5d721544d027 cc1f2fb5f,y: 0x302f3a521d bdd1d0eb1944 c8323d4ac3b3 e9c9201f4aa4 3a2565054886 369d9c}" |
tags | string | N | Comma separated list of tags such as VIP levels, etc | "vip_1" |
nonce | integer | Y | field.DexAccountV3.nonce | 0 |
keyNonce | integer | Y | Nonce of users key change request, for backward compatible | 0 |
keySeed | string | Y | KeySeed of users L2 eddsaKey, the L2 key should be generated from this seed, i.e., L2_EDDSA_KEY=eth.sign(keySeed). Otherwise, user may meet error in login loopring DEX | "Sign this message to access Loopring Exchange: 0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd with key nonce: 103" |
Response example
{
"accountId" : 10,
"owner" : "0xABCD",
"frozen" : false,
"publicKey" : {
"x" : "0x241707bcc6d7a4ccf10304be248d343a527e85f61b45d721544d027cc1f2fb5f",
"y" : "0x302f3a521dbdd1d0eb1944c8323d4ac3b3e9c9201f4aa43a2565054886369d9c"
},
"tags" : "vip_1",
"nonce" : 0,
"keyNonce" : 0,
"keySeed" : "Sign this message to access Loopring Exchange: 0xbbbbca6a901c926f240b89eacb641d8aec7aeafd with key nonce: 103"
}
Status code
Value | Description |
---|---|
100000 | Unknown error |
101001 | The address was not found |
101002 | User not found |
Model
PublicKey
Describes the users public key which is a point of the selected eclipse curve.
Field | Type | Required | Description | Example |
---|---|---|---|---|
x | string | Y | The public keys x part. | "0x241707bcc6 d7a4ccf10304 be248d343a52 7e85f61b45d7 21544d027cc1 f2fb5f" |
y | string | Y | The public keys y part. | "0x302f3a521d bdd1d0eb1944 c8323d4ac3b3 e9c9201f4aa4 3a2565054886 369d9c" |