Skip to content
Trading Password and Unlock

Submit SMS Verification for Trade Unlock

Completes SMS second-factor verification for trade unlock. After Verify Trade Password returns need_two_factors: true, send a trade-unlock SMS verification code to the Client by calling POST /v1/auth/send_code with type = trade_auth_2fa and check it with POST /v1/member/check_mobile, and then submit the code with the same trade password. On success, returns the trade token: data.token.token maps to tradeToken and data.token.refresh_token maps to tradeRefreshToken of updateTradeToken.

If tfa_switch is provided, this call also changes whether later trade unlocks for the Client require an SMS verification code. If verification fails, show message and let the Client re-enter the code or request a new one.

Password fields carry the MD5 digest of the 6-digit trade password as a 32-character lowercase hexadecimal string. Never send the plaintext password.

This operation obtains the trade token, so do not set requiresTradeToken to true when you call it through WhaleCore requestService().

POSThttps://api.lbkrs.com/v1/member/trade/auth_two_factors

Request body application/json

codestringrequired

SMS verification code received by the Client

trade_passwordstringrequired

MD5 digest of the trade password, identical to the value submitted to Verify Trade Password

tfa_switchstring

Changes the SMS verification requirement for later trade unlocks. Omit it to keep the current setting. Offer this choice only when Verify Trade Password returns tfa_guide: true:

  • close - Require SMS verification for this unlock only; later trade unlocks no longer require an SMS code
  • open - Later trade unlocks continue to require an SMS code
Values
open
close
verify_credentialsstring

Verification credential returned after the SMS code is checked. Pass it when the code has already been checked separately

Responses

HTTP 200The request succeeded. The response body contains the result of the “Submit SMS Verification for Trade Unlock” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
tokenobject

Trade token and its refresh token, issued per account

Child attributes
tokenstring

Trade token. Pass it as tradeToken to WhaleCoreService.updateTradeToken(...)

refresh_tokenstring

Refresh token. Pass it as tradeRefreshToken to updateTradeToken; it is also the input of POST /v1/member/trade/refresh_token

refresh_token_expiresinteger

Lifetime of the refresh token, in seconds, counted from issuance

Whale Docs