Bingex.User (Bingex v0.5.1)

Provides an interface to interact with the BingX User API.

Summary

Functions

The validity period is extended to 1 hour after this call, and it is recommended to send a ping every 30 minutes.

Generate Listen Key (used for WebSocket connection). Listen key Valid for 1 hour.

Query API Key information for a given UID.

Query whether the corresponding UID is an invited user under his or her name.

Query basic information of invited subordinate users.

Query Sub-account List (master account only).

Query Account UID.

Functions

extend_listen_key(listen_key, api_key)

The validity period is extended to 1 hour after this call, and it is recommended to send a ping every 30 minutes.

https://bingx-api.github.io/docs/#/en-us/common/authentication-interface.html#extend%20Listen%20Key%20Validity%20period

generate_listen_key(api_key)

@spec generate_listen_key(Bingex.Types.api_key()) ::
  Bingex.Types.request_result(
    Bingex.API.Reply.t(Bingex.User.Data.GenerateListenKey.t())
  )

Generate Listen Key (used for WebSocket connection). Listen key Valid for 1 hour.

https://bingx-api.github.io/docs/#/en-us/common/authentication-interface.html#generate%20Listen%20Key

get_api_key_info(user_id, api_key, secret_key, opts \\ [])

@spec get_api_key_info(
  Bingex.Types.user_id(),
  Bingex.Types.api_key(),
  Bingex.Types.secret_key(),
  opts :: [{:only_current?, boolean()}]
) ::
  Bingex.Types.request_result(
    Bingex.API.Reply.t(Bingex.User.Data.GetApiKeyInfo.t())
  )

Query API Key information for a given UID.

https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Sub-account%20Management/%20Query%20API%20Key%20Information

get_api_key_permissions(api_key, secret_key)

@spec get_api_key_permissions(Bingex.Types.api_key(), Bingex.Types.secret_key()) ::
  Bingex.Types.request_result(
    Bingex.API.Reply.t(Bingex.User.Data.GetApiKeyPermissions.t())
  )

Query API KEY permissions.

GET /openApi/v1/account/apiPermissions

get_referral(user_id, api_key, secret_key)

Query whether the corresponding UID is an invited user under his or her name.

https://bingx-api.github.io/docs/#/en-us/agent/agent-interface.html#Query%20agent%20user%20information

get_referrals(page_index, page_size, api_key, secret_key, opts \\ [])

@spec get_referrals(
  page_index :: pos_integer(),
  page_size :: pos_integer(),
  Bingex.Types.api_key(),
  Bingex.Types.secret_key(),
  opts :: [start_time: pos_integer(), end_time: pos_integer()]
) ::
  Bingex.Types.request_result(
    Bingex.API.Reply.t(Bingex.User.Data.GetReferrals.t())
  )

Query basic information of invited subordinate users.

https://bingx-api.github.io/docs/#/en-us/agent/agent-interface.html#Query%20Invited%20Users

get_sub_accounts(page, limit, api_key, secret_key, opts \\ [])

@spec get_sub_accounts(
  page :: pos_integer(),
  limit :: non_neg_integer(),
  Bingex.Types.api_key(),
  Bingex.Types.secret_key(),
  opts :: [
    sub_uid: Bingex.Types.user_id(),
    sub_account_string: binary(),
    is_feeze: boolean()
  ]
) ::
  Bingex.Types.request_result(
    Bingex.API.Reply.t(Bingex.User.Data.GetSubAccounts.t())
  )

Query Sub-account List (master account only).

https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Sub-account%20Management/%20Query%20Sub-account%20List

get_uid(api_key, secret_key)

Query Account UID.

https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Sub-account%20Management/%20Query%20Account%20UID