Get IP Allowlist for Bound Users’ API Keys
Description
Query the current IP whitelist set for a specified API key. All target keys must be valid, and the associated user must have been bound to the current broker. If any target fails the requirement, the entire batch is rejected and partial results are not returned.
HTTP Request
- POST
/api/v3/broker/api-key/ips/query - Scope. Broker user relationship and API Key IP management.
- Authentication: Broker signature.
- Rate Limit: 10 times / S / Broker, exceeding the limit returns 1710106
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brokerAuth | object | Yes | Broker authentication object. |
brokerAuth.brokerId | string | Yes | Positive decimal Broker ID as a string, with no leading zeros. Maximum: 9223372036854775807. |
brokerAuth.timestamp | string | Yes | Unix timestamp in nanoseconds as a string. The default window is five seconds before or after server time. |
brokerAuth.nonce | string | Yes | Fresh 16–128 character nonce. Use letters, digits, underscores, or hyphens. |
brokerAuth.signature | string | Yes | Broker HMAC-SHA256 signature encoded as 64 hexadecimal characters. Covers the endpoint path and complete canonical request fields. |
apiKeys | array<string> | Yes | 1–20 distinct target API Keys. Each has 1–128 letters, digits, underscores, or hyphens. |
Response Parameters
| Field | Type | Description |
|---|---|---|
data.items | array<object> | IP settings returned in the same order as apiKeys. |
data.items[].apiKey | string | Target API Key. |
data.items[].ips | array<string> | Configured IP allowlist. An empty array means the API Key has no configured list. The API Key’s access rules still apply. |
The outer-level code, message, data, and extras fields are described in the integration guide. Business logic should be based on the code.
Request Example
POST /api/v3/broker/api-key/ips/query HTTP/1.1
Host: openapi.lbank.com
Content-Type: application/json
Accept: application/json
{
"brokerAuth": {
"brokerId": "123",
"timestamp": "TIMESTAMP_NANOSECONDS",
"nonce": "NONCE_FROM_CLIENT",
"signature": "BROKER_SIGNATURE_HEX"
},
"apiKeys": ["TARGET_KEY_A", "TARGET_KEY_B"]
}
Response Example
{
"code": 200,
"message": "success",
"data": {
"items": [
{ "apiKey": "TARGET_KEY_A", "ips": ["192.0.2.10", "192.0.2.11"] },
{ "apiKey": "TARGET_KEY_B", "ips": [] }
]
},
"extras": null
}