Update user's ApiKey

Rate limit: 5 every second

API Overview


HTTP method

POST

Path

/api/v2/apiKey

Summary

Change the ApiKey associated with the user's account. The current ApiKey must be provided as the value of the X-API-KEY HTTP header.

API description


HTTP Header

Field Type Required Description Example
X-API-KEY string Y ApiKey "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ
6B6DQ6THZWbvrAGxzEdulXQvOKLrRW
ZLnN"

Request parameters

Field Type Required Description Example
accountId integer Y AccountID 1
publicKeyX string Y public key X "13375450901292179417
15497484957179306991
15173547203971250276
33242680470075859"
publicKeyY string Y public key Y "13375450901292179417
15497484957179306991
15173547203971250276
33242680470075859"

Request example

HTTP
CURL
POST https://api.loopring.io/api/v2/apiKey HTTP/1.1
Host: api.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
Content-Type: application/json

{
    "accountId" : 1,
    "publicKeyX" : "13375450901292179417154974849571793069911517354720397125027633242680470075859",
    "publicKeyY" : "13375450901292179417154974849571793069911517354720397125027633242680470075859"
}
curl -X POST -H "X-API-KEY:sra1aavfa" -H "Content-Type:application/json" https://api.loopring.io/api/v2/apiKey -d \
'{
    "accountId" : 1,
    "publicKeyX" : "13375450901292179417154974849571793069911517354720397125027633242680470075859",
    "publicKeyY" : "13375450901292179417154974849571793069911517354720397125027633242680470075859"
}'

Response fields

Field Type Required Description Example
resultInfo ResultInfo Y Information returned by the API /
data string Y ApiKey "6BJaCehh0z4ta4TW5vwo
Kyo0yk5FdXkQxpt8AStG
49aU3dMNC9jid6syyWPE
MtTt"

Response example

{
    "resultInfo" : {
        "code" : 0,
        "message" : "SUCCESS"
    },
    "data" : "6BJaCehh0z4ta4TW5vwoKyo0yk5FdXkQxpt8AStG49aU3dMNC9jid6syyWPEMtTt"
}

Status code

Value Description
100000 Unknown error
101002 User not found
100001 Invalid argument
104001 Empty ApiKey
104002 Invalid ApiKey
104003 Invalid Account ID
104004 No signature information provided
104005 Wrong signature information

results matching ""

    No results matching ""