Skip to content

Commit 498ddb0

Browse files
Create coinbase.rs
1 parent 456633f commit 498ddb0

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//! Coinbase Exchange Connector (placeholder)
2+
3+
use crate::OrderBookService;
4+
use aggregator_core::{PriceLevelUpdate, Result};
5+
use async_trait::async_trait;
6+
use tokio::sync::mpsc::Sender;
7+
use tokio::task::JoinHandle;
8+
9+
pub struct Coinbase;
10+
11+
impl Coinbase {
12+
pub fn new() -> Self {
13+
Coinbase
14+
}
15+
}
16+
17+
#[async_trait]
18+
impl OrderBookService for Coinbase {
19+
async fn spawn_order_book_service(
20+
&self,
21+
_pair: [&str; 2],
22+
_order_book_depth: usize,
23+
_exchange_stream_buffer: usize,
24+
_price_level_tx: Sender<PriceLevelUpdate>,
25+
) -> Result<Vec<JoinHandle<Result<()>>>> {
26+
// TODO: Implement Coinbase WebSocket connection
27+
Ok(vec![])
28+
}
29+
}
30+
31+
impl Default for Coinbase {
32+
fn default() -> Self {
33+
Self::new()
34+
}
35+
}

0 commit comments

Comments
 (0)