|
|
@@ -71,11 +71,7 @@ impl BitMartSwapRest {
|
|
|
}
|
|
|
|
|
|
//深度
|
|
|
- pub async fn get_depth(&mut self, symbol: String) -> ResponseData {
|
|
|
- let params = json!({
|
|
|
- "symbol":symbol
|
|
|
- });
|
|
|
-
|
|
|
+ pub async fn get_depth(&mut self, params: Value) -> ResponseData {
|
|
|
let data = self.request("GET".to_string(),
|
|
|
"/contract".to_string(),
|
|
|
format!("/public/depth"),
|
|
|
@@ -86,10 +82,7 @@ impl BitMartSwapRest {
|
|
|
}
|
|
|
|
|
|
//获取所有合约详情
|
|
|
- pub async fn get_market(&mut self, symbol: String) -> ResponseData {
|
|
|
- let params = json!({
|
|
|
- "symbol":symbol
|
|
|
- });
|
|
|
+ pub async fn get_market(&mut self, params: Value) -> ResponseData {
|
|
|
let data = self.request("GET".to_string(),
|
|
|
"/contract".to_string(),
|
|
|
format!("/public/details"),
|
|
|
@@ -112,10 +105,7 @@ impl BitMartSwapRest {
|
|
|
}
|
|
|
|
|
|
//用户仓位列表(查询仓位详情 (KEYED))
|
|
|
- pub async fn get_user_position(&mut self, symbol: String) -> ResponseData {
|
|
|
- let params = json!({
|
|
|
- "symbol":symbol
|
|
|
- });
|
|
|
+ pub async fn get_user_position(&mut self, params: Value) -> ResponseData {
|
|
|
let data = self.request("GET".to_string(),
|
|
|
"/contract".to_string(),
|
|
|
format!("/private/position"),
|