Get next storage ID
流量控制: 5 每 秒
摘要
HTTP 方法
GET
访问路径
/api/v3/storageId
功能
Fetches the next order id for a given sold token. If the need arises to repeatedly place orders in a short span of time, the order id can be initially fetched through the API and then managed locally. Each new order id can be derived from adding 2 to the last one
API 描述
HTTP头
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
X-API-KEY | string | 是 | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ 6B6DQ6THZWbvrAGxzEdulXQvOKLrRW ZLnN" |
请求参数
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
accountId | integer | 是 | Looprings account identifier | 1 |
sellTokenId | integer | 是 | The unique identifier of the token which the user wants to sell in the next order. | 0 |
maxNext | boolean | 否 | Return the max of the next available storageId, so any storageId > returned value is avaliable, to help user manage storageId by themselves. for example, if [20, 60, 100] is avaliable, all other ids < 100 is used before, user gets 20 if flag is false (and 60 in next run), but gets 100 if flag is true, so he can use 102, 104 freely | "0" |
请求示例
HTTP
CURL
GET https://api3.loopring.io/api/v3/storageId?accountId=1&sellTokenId=0&maxNext=0 HTTP/1.1
Host: api3.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
curl -H "X-API-KEY:sra1aavfa" https://api3.loopring.io/api/v3/storageId\?accountId\=1\&sellTokenId\=0\&maxNext\=0
响应字段
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
orderId | integer | 否 | Next storage ID for order request, must be even | 100 |
offchainId | integer | 否 | Next storage ID for offchain requests, i.e., transfer/withdraw/updateAccount, must be odd | 101 |
响应示例
{
"orderId" : 100,
"offchainId" : 101
}
状态码
状态码 | 描述 |
---|---|
100000 | Unknown error |
104001 | Empty ApiKey |
104002 | Invalid ApiKey |
104003 | Invalid Account ID |