1use crate::payload;
17use crate::proto::common::*;
18use crate::{client::Client, error::Error};
19
20impl Client {
21 pub async fn asset_list(
34 &self,
35 ctid_trader_account_id: i64,
36 ) -> Result<ProtoOaSymbolsListRes, Error> {
37 let req = ProtoOaAssetListReq {
38 ctid_trader_account_id,
39 payload_type: Some(payload::OA_ASSET_LIST_REQ as i32),
40 };
41
42 self.command(payload::OA_ASSET_LIST_REQ, req, payload::OA_ASSET_LIST_RES)
43 .await
44 }
45
46 pub async fn asset_class_list(
59 &self,
60 ctid_trader_account_id: i64,
61 ) -> Result<ProtoOaAssetClassListRes, Error> {
62 let req = ProtoOaAssetClassListReq {
63 ctid_trader_account_id,
64 payload_type: Some(payload::OA_ASSET_CLASS_LIST_REQ as i32),
65 };
66
67 self.command(
68 payload::OA_ASSET_CLASS_LIST_REQ,
69 req,
70 payload::OA_ASSET_CLASS_LIST_RES,
71 )
72 .await
73 }
74}
75
76#[cfg(test)]
77mod tests {
78
79 #[async_std::test]
80 async fn test() {}
81}