// use std::collections::BTreeMap; // use std::io::{Error, ErrorKind}; // use std::result::Result; // use async_trait::async_trait; // use rust_decimal::Decimal; // use rust_decimal_macros::dec; // use tracing::{warn}; // use crate::{Platform, ExchangeEnum, Account, Position, Ticker, Market, Order, OrderCommand}; // use exchanges::binance_spot_rest::BinanceSpotRest; // use global::trace_stack::TraceStack; // // #[allow(dead_code)] // #[derive(Clone)] // pub struct BinanceSpot { // exchange: ExchangeEnum, // symbol: String, // is_colo: bool, // params: BTreeMap, // request: BinanceSpotRest, // } // // impl BinanceSpot { // pub fn new(symbol: String, is_colo: bool, params: BTreeMap) -> BinanceSpot { // BinanceSpot { // exchange: ExchangeEnum::BinanceSpot, // symbol: symbol.to_uppercase(), // is_colo, // params: params.clone(), // request: BinanceSpotRest::new(is_colo, params.clone()), // } // } // } // // // #[async_trait] // impl Platform for BinanceSpot { // // 克隆方法 // fn clone_box(&self) -> Box { Box::new(self.clone()) } // // 获取交易所模式 // fn get_self_exchange(&self) -> ExchangeEnum { // ExchangeEnum::BinanceSpot // } // // 获取交易对 // fn get_self_symbol(&self) -> String { self.symbol.clone() } // // 获取是否使用高速通道 // fn get_self_is_colo(&self) -> bool { // self.is_colo // } // // 获取登录params信息 // fn get_self_params(&self) -> BTreeMap { // self.params.clone() // } // // fn get_self_market(&self) -> Market { // warn!("binance_spot:该交易所方法未实现"); // return Market::new(); // } // // fn get_request_delays(&self) -> Vec { // warn!("binance_spot:该交易所方法未实现"); // return vec![]; // } // // fn get_request_avg_delay(&self) -> Decimal { // warn!("binance_spot:该交易所方法未实现"); // return dec!(0); // } // // fn get_request_max_delay(&self) -> i64 { // warn!("binance_spot:该交易所方法未实现"); // return 0; // } // // async fn get_server_time(&mut self) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // // 获取账号信息 // async fn get_account(&mut self) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn get_spot_account(&mut self) -> Result, Error> { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // // 获取仓位信息 // async fn get_position(&mut self) -> Result, Error> { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn get_positions(&mut self) -> Result, Error> { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // // 获取市场行情 // async fn get_ticker(&mut self) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn get_ticker_symbol(&mut self, _symbol: String) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn get_market(&mut self) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn get_market_symbol(&mut self, _symbol: String) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn get_order_detail(&mut self, _order_id: &str, _custom_id: &str) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn get_orders_list(&mut self, _status: &str) -> Result, Error> { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn take_order(&mut self, _custom_id: &str, _origin_side: &str, _price: Decimal, _amount: Decimal) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn take_order_symbol(&mut self, _symbol: String, _ct_val: Decimal, _custom_id: &str, _origin_side: &str, _price: Decimal, _amount: Decimal) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn cancel_order(&mut self, _order_id: &str, _custom_id: &str) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn cancel_orders(&mut self) -> Result, Error> { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn cancel_orders_all(&mut self) -> Result, Error> { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn set_dual_mode(&mut self, _coin: &str, _is_dual_mode: bool) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn set_dual_leverage(&mut self, _leverage: &str) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn set_auto_deposit_status(&mut self, _status: bool) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn wallet_transfers(&mut self, _coin: &str, _from: &str, _to: &str, _amount: Decimal) -> Result { Err(Error::new(ErrorKind::NotFound, "binance_spot:该交易所方法未实现".to_string())) } // // async fn command_order(&mut self, _order_command: OrderCommand, _trace_stack: TraceStack) { warn!("binance_spot:该交易所方法未实现"); } // }