Skip to main content

Bind Current User

Description​

Users establish a binding with the Broker through their own API Key for signature authorization. The binding user is derived from the user credential parsing. The client does not transmit the user ID. First-time binding does not require a pre-existing relationship. Upon repeated calls with new authentication parameters for the same binding, an idempotent success is returned.

HTTP Request​

  • POST /api/v3/broker/bind-user
  • Scope. Broker user relationship and API Key IP management.
  • Authentication: Broker signature + User signature
  • Rate Limit: 10 times / S / Broker, exceeding the limit returns 1710106

Request Parameters​

ParameterTypeRequiredDescription
brokerAuthobjectYesBroker authentication object.
brokerAuth.brokerIdstringYesPositive decimal Broker ID as a string, with no leading zeros. Maximum: 9223372036854775807.
brokerAuth.timestampstringYesUnix timestamp in nanoseconds as a string. The default window is five seconds before or after server time.
brokerAuth.noncestringYesFresh 16–128 character nonce. Use letters, digits, underscores, or hyphens.
brokerAuth.signaturestringYesBroker HMAC-SHA256 signature encoded as 64 hexadecimal characters. Covers the endpoint path and complete canonical request fields.
userAuthobjectYesProof of user authorization.
userAuth.apiKeystringYesUser API Key, 1–128 letters, digits, underscores, or hyphens.
userAuth.signatureMethodstringYesCase-sensitive HmacSHA256, SHA256withRSA, or RSASSA-PSS. Use the algorithm enabled for the user’s credential.
userAuth.signaturestringYesUser signature over the same input as the Broker signature. Hex for HMAC. Base64 for RSA and PSS.

Response Parameters​

FieldTypeDescription
data.boundbooleantrue when the user is bound to the Broker.

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/bind-user 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"
},
"userAuth": {
"apiKey": "USER_API_KEY",
"signatureMethod": "HmacSHA256",
"signature": "USER_SIGNATURE_HEX"
}
}

Response Example​

{
"code": 200,
"message": "success",
"data": { "bound": true },
"extras": null
}