|
|
@@ -4,8 +4,8 @@ use rust_decimal::prelude::FromPrimitive;
|
|
|
use tracing::{error};
|
|
|
use exchanges::response_base::ResponseData;
|
|
|
use crate::exchange::ExchangeEnum;
|
|
|
-use crate::{binance_swap_handle, gate_swap_handle, bybit_swap_handle, bitget_swap_handle, coinex_swap_handle, htx_swap_handle, bingx_swap_handle, mexc_swap_handle, okx_swap_handle, bitmart_swap_handle, kucoin_swap_handle, coinsph_swap_handle, phemex_swap_handle, woo_swap_handle, cointr_swap_handle, gate_spot_handle, ForceOrder};
|
|
|
-use crate::{Record, Ticker, Trade, Depth};
|
|
|
+use crate::{binance_swap_handle, gate_swap_handle, bybit_swap_handle, bitget_swap_handle, coinex_swap_handle, htx_swap_handle, bingx_swap_handle, mexc_swap_handle, okx_swap_handle, bitmart_swap_handle, kucoin_swap_handle, coinsph_swap_handle, phemex_swap_handle, woo_swap_handle, cointr_swap_handle, gate_spot_handle, ForceOrder, BookTicker};
|
|
|
+use crate::{Record, Trade, Depth};
|
|
|
use crate::{Account, OrderBook, Position, SpecialOrder};
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
@@ -147,9 +147,12 @@ impl ExchangeStructHandler {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 处理Ticker信息
|
|
|
- pub fn book_ticker_handle(exchange: ExchangeEnum, _res_data: &ResponseData) -> Ticker {
|
|
|
+ // 处理BookTicker信息
|
|
|
+ pub fn book_ticker_handle(exchange: ExchangeEnum, res_data: &ResponseData) -> BookTicker {
|
|
|
match exchange {
|
|
|
+ ExchangeEnum::GateSwap => {
|
|
|
+ gate_swap_handle::format_book_ticker(&res_data)
|
|
|
+ }
|
|
|
_ => {
|
|
|
error!("未找到该交易所!book_ticker_handle: {:?}", exchange);
|
|
|
panic!("未找到该交易所!book_ticker_handle: {:?}", exchange);
|