pub struct UserClient { /* private fields */ }Implementations§
Source§impl UserClient
impl UserClient
pub fn new(client: RestClient) -> Self
Sourcepub async fn create_sub_member(
&self,
username: &str,
member_type: i32,
password: Option<&str>,
note: Option<&str>,
switch_option: Option<i32>,
is_uta: Option<bool>,
) -> Result<ServerResponse<Value>>
pub async fn create_sub_member( &self, username: &str, member_type: i32, password: Option<&str>, note: Option<&str>, switch_option: Option<i32>, is_uta: Option<bool>, ) -> Result<ServerResponse<Value>>
Create a new sub user
API: POST /v5/user/create-sub-member https://bybit-exchange.github.io/docs/v5/user/create-subuid
Sourcepub async fn create_sub_api(
&self,
sub_uid: i64,
note: Option<&str>,
read_only: i32,
permissions: Value,
ips: Option<Vec<String>>,
) -> Result<ServerResponse<Value>>
pub async fn create_sub_api( &self, sub_uid: i64, note: Option<&str>, read_only: i32, permissions: Value, ips: Option<Vec<String>>, ) -> Result<ServerResponse<Value>>
Create sub UID API key
API: POST /v5/user/create-sub-api https://bybit-exchange.github.io/docs/v5/user/create-subuid-apikey
Sourcepub async fn query_sub_members(
&self,
page_size: Option<i32>,
page: Option<i32>,
) -> Result<ServerResponse<Value>>
pub async fn query_sub_members( &self, page_size: Option<i32>, page: Option<i32>, ) -> Result<ServerResponse<Value>>
Get sub UID list
API: GET /v5/user/query-sub-members https://bybit-exchange.github.io/docs/v5/user/subuid-list
Sourcepub async fn get_sub_members(
&self,
uid: Option<&str>,
) -> Result<ServerResponse<Value>>
pub async fn get_sub_members( &self, uid: Option<&str>, ) -> Result<ServerResponse<Value>>
Get all sub UID list (Alternative method)
API: GET /v5/user/submembers https://bybit-exchange.github.io/docs/v5/user/subuid-list-all
Sourcepub async fn query_api(&self) -> Result<ServerResponse<Value>>
pub async fn query_api(&self) -> Result<ServerResponse<Value>>
Get API key information
API: GET /v5/user/query-api https://bybit-exchange.github.io/docs/v5/user/apikey-info
Sourcepub async fn get_sub_api_keys(
&self,
sub_member_id: &str,
limit: Option<i32>,
cursor: Option<&str>,
) -> Result<ServerResponse<Value>>
pub async fn get_sub_api_keys( &self, sub_member_id: &str, limit: Option<i32>, cursor: Option<&str>, ) -> Result<ServerResponse<Value>>
Get sub account API keys
API: GET /v5/user/sub-apikeys https://bybit-exchange.github.io/docs/v5/user/sub-apikey-list
Sourcepub async fn get_member_type(&self) -> Result<ServerResponse<Value>>
pub async fn get_member_type(&self) -> Result<ServerResponse<Value>>
Get user account type
API: GET /v5/user/get-member-type https://bybit-exchange.github.io/docs/v5/user/account-type
Sourcepub async fn get_affiliate_customer_info(
&self,
uid: &str,
) -> Result<ServerResponse<Value>>
pub async fn get_affiliate_customer_info( &self, uid: &str, ) -> Result<ServerResponse<Value>>
Get affiliate user info
API: GET /v5/user/aff-customer-info https://bybit-exchange.github.io/docs/v5/user/affiliate-info
Sourcepub async fn freeze_sub_member(
&self,
sub_uid: i64,
frozen: i32,
) -> Result<ServerResponse<Value>>
pub async fn freeze_sub_member( &self, sub_uid: i64, frozen: i32, ) -> Result<ServerResponse<Value>>
Freeze sub UID
API: POST /v5/user/frozen-sub-member https://bybit-exchange.github.io/docs/v5/user/frozen-subuid
Sourcepub async fn delete_sub_member(
&self,
sub_member_id: &str,
) -> Result<ServerResponse<Value>>
pub async fn delete_sub_member( &self, sub_member_id: &str, ) -> Result<ServerResponse<Value>>
Delete sub member
API: POST /v5/user/del-submember https://bybit-exchange.github.io/docs/v5/user/del-submember
Sourcepub async fn update_api(
&self,
read_only: Option<i32>,
ips: Option<Vec<String>>,
permissions: Option<Value>,
) -> Result<ServerResponse<Value>>
pub async fn update_api( &self, read_only: Option<i32>, ips: Option<Vec<String>>, permissions: Option<Value>, ) -> Result<ServerResponse<Value>>
Modify master API key
API: POST /v5/user/update-api https://bybit-exchange.github.io/docs/v5/user/modify-master-apikey
Sourcepub async fn delete_api(&self) -> Result<ServerResponse<Value>>
pub async fn delete_api(&self) -> Result<ServerResponse<Value>>
Delete master API key
API: POST /v5/user/delete-api https://bybit-exchange.github.io/docs/v5/user/rm-master-apikey
Sourcepub async fn update_sub_api(
&self,
api_key: &str,
read_only: Option<i32>,
ips: Option<Vec<String>>,
permissions: Option<Value>,
) -> Result<ServerResponse<Value>>
pub async fn update_sub_api( &self, api_key: &str, read_only: Option<i32>, ips: Option<Vec<String>>, permissions: Option<Value>, ) -> Result<ServerResponse<Value>>
Modify sub API key
API: POST /v5/user/update-sub-api https://bybit-exchange.github.io/docs/v5/user/modify-sub-apikey
Sourcepub async fn delete_sub_api(
&self,
api_key: &str,
) -> Result<ServerResponse<Value>>
pub async fn delete_sub_api( &self, api_key: &str, ) -> Result<ServerResponse<Value>>
Delete sub API key
API: POST /v5/user/delete-sub-api https://bybit-exchange.github.io/docs/v5/user/rm-sub-apikey
Trait Implementations§
Source§impl Clone for UserClient
impl Clone for UserClient
Source§fn clone(&self) -> UserClient
fn clone(&self) -> UserClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more