crypto_rest_client/exchanges/bitget/
bitget_spot.rs1use super::super::utils::http_get;
2use crate::error::Result;
3use std::collections::BTreeMap;
4
5const BASE_URL: &str = "https://api.bitget.com";
6
7pub struct BitgetSpotRestClient {
12 _api_key: Option<String>,
13 _api_secret: Option<String>,
14}
15
16impl BitgetSpotRestClient {
17 pub fn new(api_key: Option<String>, api_secret: Option<String>) -> Self {
18 BitgetSpotRestClient { _api_key: api_key, _api_secret: api_secret }
19 }
20
21 pub fn fetch_l2_snapshot(symbol: &str) -> Result<String> {
27 gen_api!(format!("/api/spot/v1/market/depth?symbol={symbol}&type=step0"))
28 }
29}